A simple MCP server that provides stock price information
Three tools with clear verb-noun naming (get_*, compare_*) and basic descriptions. All tools have input schemas with type definitions and parameter descriptions. However, descriptions are generic and lack LLM-optimization guidance (e.g., no 'when to use' context, no dependency hints). Output schemas are undocumented, LLMs cannot infer what fields to expect from responses. Error handling returns unstructured strings rather than actionable recovery guidance. No parameter constraints (enums, ranges) despite accepting free-form strings like 'period' that should be constrained. Tools lack tool annotations (readOnlyHint present in metadata but not in schema). Average description length ~150 chars (within baseline 194), but lacks specificity on valid inputs and error cases.
Compare the current stock prices of two ticker symbols. Returns a formatted message comparing the two stock prices. Parameters: symbol1: The first stock ticker symbol. symbol2: The second stock ticker symbol.
Retrieve historical data for a stock given a ticker symbol and a period. Returns the historical data as a CSV formatted string. Parameters: symbol: The stock ticker symbol. period: The period over which to retrieve historical data (e.g., '1mo', '3mo', '1y').
Retrieve the current stock price for the given ticker symbol. Returns the latest closing price as a float.
Output schemas undocumented. Tools return float, string, string but LLMs cannot infer field structure or downstream chaining. get_stock_price returns -1.0 on error (magic value) instead of structured error object.
Parameter 'period' in get_stock_history accepts free-form strings but should be constrained to enum (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max). Current description lists examples but LLMs may hallucinate invalid values like '2weeks'.
Error handling returns bare strings ('Error: Could not retrieve...') without recovery guidance. LLMs cannot determine if error is retryable, user-fixable, or fatal. No actionable next steps provided.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 52 | 2026-07-28+ | v2 |
Tool descriptions lack 'when to use' context and dependency hints. E.g., compare_stocks does not explain when to call it vs calling get_stock_price twice. No guidance on prerequisites or common workflows.
Tool annotations (readOnlyHint) present in metadata but not exposed in schema. LLMs cannot see that tools are read-only and safe to retry. Schema should include 'readOnly': true in tool definition.