A minimal MCP server for financial data tools
Two tools with basic descriptions and minimal parameter documentation. lookup_stock_symbol has a 10-char description (below 20-char threshold); fetch_stock_data has 60 chars. Neither tool documents output schema. Parameters lack type constraints (e.g., period should be an enum). No error handling guidance. lookup_stock_symbol exposes a hardcoded API key placeholder in the code, violating secret injection. fetch_stock_data returns unstructured pformat() output instead of typed JSON. No pagination, no result limits documented. Naming is acceptable (verb_noun), but schema and error handling are severely deficient.
Fetches comprehensive stock data for a given symbol.
Converts a company name to its stock symbol using a financial API.
lookup_stock_symbol description is 10 characters ('Converts a company name to its stock symbol using a financial API.'), below 20-char minimum.
No output schema documented for either tool. fetch_stock_data returns pformat(dict), unstructured string. LLMs cannot parse or chain results.
Hardcoded API key placeholder in lookup_stock_symbol: 'apikey': 'your_alphavantage_api_key'. Credentials must never appear as tool parameters or in code. Use server-side secret injection via environment variables.
period parameter in fetch_stock_data lacks enum constraint. Description says 'e.g. 1mo, 3mo, 1y' but does not enforce valid values. LLMs will hallucinate invalid periods like '2weeks' or '6months'. Use enum: ['1mo', '3mo', '6mo', '1y', '5y'].
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 46 | <=2025-11-25 | v2 |
No error handling guidance. fetch_stock_data catches exceptions and returns {'error': ...} string, but does not tell LLM what to do next (retry? ask user? fatal?).