kiwoom-mcp is a STDIO-only Korean stock trading API wrapper with 8 tools. All tools are READ_ONLY. Tool naming follows verb_noun convention (get_*), which is good. However, descriptions lack depth and context. Most critically: (1) Parameter descriptions are minimal and often omit format/constraint details. (2) Output schemas are completely absent from the visible code, tools return JSON via text content but no formal schema documentation is provided. (3) Error handling is minimal, no recovery guidance or categorization. (4) No input validation examples visible. The server passes credentials via environment variables (good), but lacks tool annotations, security scopes, and error classification. Average description length is adequate (~60-80 chars per tool), but parameter documentation is sparse. Overall, this is a basic API wrapper lacking the depth expected of production-grade agent tools.
No output schemas documented. Tools return JSON stringified text (JSON.stringify(...)) but no formal response schema is provided to LLMs. LLMs cannot plan downstream tool calls or structure extraction without knowing the response format.
Parameter descriptions are minimal and lack constraint details. E.g., 'stockCode' has description '종목코드 (6자리, 예: 005930)' with an example embedded and length constraint, but no statement of what format is expected beyond length. LLMs cannot validate inputs reliably without explicit min/max, regex patterns, or enum constraints in descriptions.
Document output schemas for all 8 tools. Define the structure of each response (fields, types, required/optional). For example, get_stock_price should document: {stockCode, stockName, currentPrice, changeRate, per, pbr, ...} with types and whether each field is always present.
Enhance parameter descriptions with explicit constraints. Replace '종목코드 (6자리, 예: 005930)' with 'Stock code: 6-digit numeric string (e.g., 005930). Must be a valid Korean stock code. No spaces or special characters.' Make constraints machine-parseable.
Add error recovery guidance. Wrap API errors with actionable messages. E.g., if stockCode is invalid, return: 'Invalid stock code: 005930. Stock not found. Try search_stocks() to find a valid code, or check the Kiwoom API documentation for supported codes.'
Implement tool annotations. Register each tool with readOnlyHint=true to signal to LLMs that calls are safe to retry and have no side effects. Use server.tool(..., {...}, toolAnnotations={readOnlyHint: true}).
Add pagination parameters. Introduce limit (default 20 - 50) and offset or cursor parameters to get_filled_orders, get_investor_trend, and get_account_balance. Document the maximum result set size and how to retrieve the next page.
Provide English descriptions and parameter docs. Translate all Korean text to English so LLMs trained on English corpora can reliably discover and reason about tools. Keep Korean descriptions in code comments if needed for maintainers.
Declare security scopes. Add tool metadata declaring which Kiwoom API permissions each tool requires. E.g., get_account_balance requires 'read:account', get_filled_orders requires 'read:orders'. This enables least-privilege token configuration.
No error handling guidance. Tools throw exceptions (KiwoomApiError) with codes and messages, but no recovery instructions are returned to the LLM. When a call fails, the LLM has no actionable next steps (retry, call a discovery tool, ask the user, etc.).
No tool annotations. Tools do not declare readOnlyHint, destructiveHint, or idempotentHint. All 8 tools are READ_ONLY per the metadata, but this is not communicated via MCP tool annotations, forcing LLMs to infer safety from descriptions alone.
No pagination or result limits. Tools like get_investor_trend document a 100-item limit via API constraint, and get_filled_orders accepts optional stockCode filter, but no limit, offset, or cursor parameters exist to cap response sizes. Large result sets risk context window exhaustion.
Descriptions use Korean language. Tool and parameter descriptions are in Korean (e.g., '주식 현재가 조회', '종목코드'), making them inaccessible to LLMs trained primarily on English text and reducing discovery and reasoning quality.
No scope or permission declarations. Tools do not declare what permissions they require (e.g., 'read:account', 'read:orders'). This prevents least-privilege agent configuration and clear audit trails.
Add validation error examples. In the client.ts or index.ts error handling, show concrete examples of what happens when invalid inputs are passed (e.g., wrong stockCode length, invalid date format). This informs both LLMs and future maintainers.
Document API rate limits. If Kiwoom enforces rate limits, state them in tool descriptions (e.g., 'Max 1000 calls/hour'). This prevents LLMs from running retry loops that exhaust quotas.
Consider batch operations. If the user often wants to fetch prices for multiple stocks, offer a get_stock_prices (plural) that accepts an array of codes and returns an array of results. This reduces token overhead vs. N sequential calls.