MCP server for accessing Tehran Stock Exchange (TSE) market data, including stock search, current prices, and historical data
Three tools with reasonable naming (verb-first) and basic descriptions, but critical gaps in schema completeness, parameter documentation, and error guidance. Tools are READ_ONLY and simple, but descriptions lack the precision needed for reliable LLM invocation. Parameter descriptions are minimal; output schemas are undocumented. Error handling is present but generic. This server is typical of community tools: functional but not production-ready.
Retrieve historical stock data for the given ticker symbol.
Retrieve latest stock information for the given ticker symbol. Returns the latest closing price and optionally historical data.
Search for stock names in Tehran stock market. Use this tool first to find the correct stock symbol before fetching data. The AI should present the results to the user and ask them to confirm which stock they want.
Output schemas completely undocumented. Tools return complex nested objects (trading_data, volume_data sub-objects; formatted_results list) with no schema specification. LLMs cannot reliably extract or chain results.
Parameter descriptions are too minimal. 'query' in search_stock: 'Stock name or symbol to search for' lacks guidance on format, length, or examples. 'symbol' in get_stock_info: 'Ticker symbol in Persian (e.g. خودرو)' buries the example in description text rather than using schema constraints; LLMs may reuse the example literally.
Days parameter in get_stock_history accepts integer with default 30 and max 365, but constraints are documented only in the docstring, not in the schema. JSON Schema should include minimum: 1, maximum: 365. LLMs cannot read docstring constraints reliably.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 52 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 54 | - | v1 |
Error messages are generic and lack recovery guidance. Example from get_stock_info: 'Stock not found in cache. Please search for the stock first using search_stock tool.' This tells the agent what to do next, which is good, but does not explain WHY the cache was empty or what conditions trigger the error. Errors should categorize as retryable vs. user-fixable.
Return value structure is inconsistent. search_stock returns a wrapper with isSuccess, data, message. get_stock_info returns the same wrapper but with nested trading_data and volume_data objects. No TypedDict or Pydantic model enforces the structure; output schema is only in code comments, not in tool registration.
No pagination or result limits documented for search_stock. The code returns top_results = instruments[:10], but this limit is hardcoded and invisible to the caller. If search results ever exceed 10, LLMs will have no way to fetch more. Tool description should state 'Returns up to 10 matches; use refine the query to narrow results.'
Tool descriptions mention Persian symbols (خودرو) as examples but do not explain the script context. English users may not know if they should pass Persian text, Latin transliteration, or both. The description should clarify: 'Symbol must be in Persian script. If unsure, use search_stock() with an English company name first.'