A multi-server MCP agent that connects to news and stock data servers, using LangChain and LangGraph to orchestrate tool calls across multiple MCP servers
Four tools with basic verb-noun naming (fetch_*) and minimal descriptions. All tools have input schemas with type and description, but output schemas are undocumented. Descriptions are terse (10-40 chars), below the 50-200 char LLM-optimized baseline. No error handling guidance, no parameter constraints (enums), no pagination support despite financial data tools returning DataFrames. fetch_stock_info and fetch_quarterly_financials/fetch_annual_financials lack clarity on what distinguishes them. No security annotations or audit logging visible.
Get stock annual financials.
Get news articles related to the query.
Get stock quarterly financials.
Get Company's general information.
Descriptions are critically short (10-40 chars). LLM cannot determine when to select fetch_stock_info vs fetch_quarterly_financials vs fetch_annual_financials. Expand to 50-200 chars explaining what each returns and when to use it.
Output schemas are undocumented. fetch_stock_info returns Dict[str, Any] (opaque), fetch_quarterly_financials and fetch_annual_financials return DataFrame (unstructured). LLM cannot plan downstream calls or extract fields. Document return types with field names and types.
No error handling guidance. If NewsAPI fails or yfinance returns no data, agent receives raw exception. Add recovery hints: 'If query returns no results, try a broader search term' or 'If symbol not found, verify ticker format (e.g., AAPL).'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 50 | <=2025-11-25 | v2 |
No input validation or constraints. 'query' and 'symbol' parameters accept any string. Add enums for symbol (if known), regex patterns, or length limits. Validate early and return actionable errors like 'Invalid symbol: must be 1-5 uppercase letters.'
Financial data tools (fetch_quarterly_financials, fetch_annual_financials) return DataFrames with no pagination or result limits. Large datasets blow context window. Cap results, add limit/offset params, and document in descriptions.