MCP server for interacting with Zerodha stock market trading platform, enabling stock orders, holdings retrieval, and mutual fund management
The server has 6 tools with varying quality, but exhibits critical gaps across naming, descriptions, and error handling. While input schemas are present for most tools (using Zod), descriptions are inconsistent, some exceed 1024 characters and contain procedural instructions better suited to internal documentation rather than LLM-optimized docstrings. The naming convention mixes verb_noun (place-stock-order, get-zerodha-holdings) with noun-only variants (zerodha-mf-holdings), creating inconsistency. No output schemas are documented. Error handling is minimal, most tools return JSON stringified data or generic error messages without actionable recovery guidance. Security concerns exist: the login/token flow exposes authentication state in tool descriptions and returns success/failure messages without guidance. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are used despite the place-stock-order tool being explicitly destructive. The server lacks pagination, rate limiting, and structured error responses. Three read-only tools have empty input schemas (get-zerodha-holdings, get-zerodha-mutual-fund-sips, zerodha-mf-holdings), which is correct, but their descriptions do not explain what structure they return or when to call them.
Get the Stock Market holdings of the user on Zerodha
Get the Mutual Fund SIPs of the user on Zerodha
This tool is used to login to Zerodha, you will return the login URL to the user, so that they can login to Zerodha, after that you will call set-zerodha-tokens to set the tokens, user will provide you the request token in URL, you will then call another tool for it and pass the request token get the access token and save the values in the config file that function
Places an order related to stocks on the real Indian Stock Market through Zerodha
This tool is used to set the tokens for Zerodha. You will get the request token from the user (might be in a URL), then call another function to generate the access token, save both tokens to the config file, and return a success message if the tokens are set successfully.
Descriptions are procedural instructions, not LLM-optimized tool documentation. Examples: login-to-zerodha and set-zerodha-tokens contain imperative language ('you will return...', 'you will call...') that teaches agents how to use the tool chain rather than what each tool does.
No output schemas documented for any tool. LLMs cannot predict downstream field availability, forcing them to guess or make extra calls. Example: place-stock-order returns JSON but structure is undocumented.
Tool annotations (destructiveHint, readOnlyHint, idempotentHint) are not used. place-stock-order is explicitly destructive (modifies broker state) but has no annotation; read-only tools (get-*) lack readOnlyHint. This prevents LLMs from reasoning about retry semantics and side effects.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 32 | - | v1 |
Get the mutual fund holdings of the user on Zerodha
Inconsistent naming convention. Most tools use verb_noun (place-stock-order, get-zerodha-holdings), but zerodha-mf-holdings uses noun-only. LLMs conflate similarly-named tools, this inconsistency degrades tool selection.
zerodha-mf-holdings has a TODO comment in code ('This tool is not working, need to fix it'). The tool should not be exposed until functional. Broken tools damage agent reliability.
Error handling is minimal and non-actionable. Most tools return generic error messages (e.g., 'An error occurred while setting tokens') or raw stringified error objects. No recovery guidance, error classification, or input validation feedback.
No pagination or result limits. get-zerodha-holdings calls kc.getHoldings() without documented limits. If a user has thousands of holdings, the response will be massive, exhausting context and increasing hallucination risk. No limit parameter, no offset/page support.
Credentials and tokens are handled insecurely. The login/token flow exposes authentication state in tool descriptions and does not document how tokens are stored or transmitted. set-zerodha-tokens accepts request_token as a string parameter (acceptable), but no guidance on token expiry, rotation, or secure storage.
API keys are read from environment (API_KEY, API_SECRET) in KiteConfig.ts and passed to axios.get() in getMFSIPs, but these are not validated or protected from logging. If an error occurs, the full request (including credentials) could appear in logs.
No distinction between read-only and destructive operations at the tool level. place-stock-order modifies real broker state, but there is no confirmation mechanism, dry-run option, or reversibility guidance. Agents could place unintended orders.