This server has only 2 tools with minimal schemas and descriptions. Both tools are READ_ONLY data export utilities (tushare_fetch_to_csv, alphavantage_fetch_to_json) with generic, short descriptions that fail to guide LLM selection. Schemas are present but skeletal: input parameters lack type constraints, enums are missing for the 'api_name' and 'function' parameters (which accept only specific values), and output schemas are completely undocumented. No error handling guidance is visible. The tool names are compound and could be simplified (e.g., 'export_tushare_data' vs 'tushare_fetch_to_csv'). Parameter descriptions are minimal (7-15 chars for kwargs/extra_params), violating the 10-1024 char guideline. No pagination, rate limiting, or composition patterns are evident. The server reads external financial APIs but provides no defensive documentation for common failure modes (API rate limits, invalid ticker symbols, missing data).
Parameter descriptions are too short (7-15 characters). 'Optional keyword arguments for the Tushare API call' and 'Optional extra parameters for the Alpha Vantage API call' provide no guidance on what values or structures are valid. LLMs cannot infer parameter semantics from vague descriptions.
No enum constraints on 'api_name' and 'function' parameters. These parameters accept only a fixed set of Tushare/AlphaVantage API function names, but are declared as bare strings with no enum list. LLMs will hallucinate invalid API names, causing silent failures or rate-limit penalties.
No output schema documentation. Callers have no way to know the shape of CSV or JSON output, required fields, or how to parse results. LLMs must guess downstream field names, risking extraction errors.
tushare_fetch_to_csvalphavantage_fetch_to_json
Recommendations
Expand tool descriptions from 34-50 characters to 150-250 characters each. For tushare_fetch_to_csv, add: 'Fetch Chinese stock market data (prices, fundamentals, technical analysis) from Tushare API. Requires Tushare token. Returns tabular CSV format. Common api_names: get_stock_basic, daily, weekly. Use for historical price data or company fundamentals. Rate limited to 200 calls/min; returns HTTP 40X if rate-limited.'
Expand tool descriptions for alphavantage_fetch_to_json to clarify: 'Fetch real-time and historical stock, ETF, forex, or crypto quotes from Alpha Vantage. Requires API key. Returns JSON. Common functions: TIME_SERIES_INTRADAY, TIME_SERIES_DAILY, CURRENCY_EXCHANGE_RATE, CRYPTO_RATING. Free tier rate-limited to 5 calls/min; paid tiers available. Returns JSON error code if rate-limited or symbol invalid.'
Replace 'api_name' parameter with an enum listing all supported Tushare API endpoints (get_stock_basic, daily, weekly, monthly, etc.). Provide 5-10 most common values as enum choices. Add description: 'The Tushare API function name (e.g., get_stock_basic for company list, daily for OHLCV, weekly for weekly bars). Full list at https://tushare.pro/document/2. Must match exact case.'
Replace 'function' parameter with an enum listing Alpha Vantage functions: TIME_SERIES_INTRADAY, TIME_SERIES_DAILY, TIME_SERIES_WEEKLY, TIME_SERIES_MONTHLY, GLOBAL_QUOTE, CURRENCY_EXCHANGE_RATE, etc. Add description: 'The Alpha Vantage function (e.g., TIME_SERIES_DAILY for historical closes, GLOBAL_QUOTE for real-time quote, CURRENCY_EXCHANGE_RATE for FX). See https://www.alphavantage.co/documentation/'
No error handling or recovery guidance. External API calls (Tushare, Alpha Vantage) commonly fail due to rate limits, invalid symbols, or service outages. Descriptions mention no retryable vs fatal error categories, no guidance on what to do if a ticker symbol is invalid, and no suggestions for fallback tools or partial results.
Tool descriptions are generic and do not clearly differentiate the two tools or explain when to use each. 'Export raw Tushare tabular data for code runtime as CSV' vs 'Export raw Alpha Vantage JSON data for code runtime' both sound like generic data export, no hint that one is for Chinese stock data, the other for US equities/forex/crypto. LLMs may pick the wrong tool.
Compound/action verb naming is weak. 'tushare_fetch_to_csv' mixes 'fetch' with 'to_csv' format. Simpler name like 'export_tushare_data' or 'get_tushare_stock_data' would be clearer. 'alphavantage_fetch_to_json' similarly uses 'fetch_to' which is less idiomatic than 'export_alphavantage' or 'get_alphavantage_quote'.
No parameter-level defaults or constraints documented. 'kwargs' and 'extra_params' are open-ended object types with no schema, LLMs have no way to know what fields are valid, which are required, or what types they should be. This invites malformed API calls.
tushare_fetch_to_csvalphavantage_fetch_to_json
Document the 'symbol' parameter for alphavantage_fetch_to_json with constraints: 'Stock ticker (e.g., AAPL, MSFT), ETF symbol, or currency pair (e.g., EUR/USD, BTC/USD). Alpha Vantage supports US stocks, ETFs, forex, and cryptocurrencies. Use the standard ticker or pair symbol. Invalid symbols return an API error; try search_alphavantage_symbol() first if unsure.'
Add output schema documentation for both tools. For tushare_fetch_to_csv, document: 'Returns CSV string with columns depending on api_name (e.g., ts_code, trade_date, open, high, low, close, vol, amount for daily bars). Fields vary by endpoint; see Tushare docs for your specific api_name. Parse as pandas.read_csv(StringIO(result)).'
Add output schema for alphavantage_fetch_to_json: 'Returns JSON with meta field (symbol, interval, etc.) and data field (array of OHLCV bars or single quote). On success: { "Meta Data": {...}, "Time Series (Daily)": {...} or "Global Quote": {...} }. On error: { "Error Message": "..." } or { "Note": "Thank you for using Alpha Vantage! Our standard API call frequency is 5 calls per minute..." }.'
Add error handling guidance to both descriptions. For tushare_fetch_to_csv: 'If api_name is invalid, returns API error; verify against supported list. If token is invalid/expired, returns 401. If rate-limited, returns 429 and message "Request too frequent"; wait 60s and retry. If data not available for date/symbol, returns empty CSV or error message.'
Add error handling for alphavantage_fetch_to_json: 'If function or symbol is invalid, returns { "Error Message": "Invalid API call" }. If rate-limited (free tier: 5/min, premium varies), returns { "Note": "Thank you..." }; wait per-limit duration and retry. If symbol not found, returns empty data or { "Error Message": "Invalid API call" }. Retry logic: exponential backoff 2s, 4s, 8s.'
Constrain 'kwargs' and 'extra_params' objects by documenting common valid fields. For tushare: 'A dict of optional filters. Common keys: ts_code (e.g., "0000001.SZ"), trade_date (YYYYMMDD format), start_date, end_date, limit (max 5000). Invalid keys are ignored by Tushare. See api_name endpoint docs for all supported fields.'
Constrain 'extra_params' for alphavantage: 'A dict of optional fields. Valid keys depend on function: interval (e.g., "1min", "5min", "60min" for INTRADAY), time_period, series_type (close, open, high, low), outputsize ("compact" for 100 rows, "full" for all). See function docs at alphavantage.co for valid keys per function.'
Rename tools for clarity: tushare_fetch_to_csv → 'export_tushare_stock_data' or 'get_tushare_quotes'; alphavantage_fetch_to_json → 'get_alphavantage_quotes' or 'export_alphavantage_data'. Use canonical verb-noun form so LLMs recognize the intent immediately.
Add a 'symbol' or 'ticker' parameter to tushare_fetch_to_csv for common use cases (e.g., get daily bars for a single stock), with description: 'Optional single stock ticker (e.g., "0000001.SZ" for China). If provided, filters results to this symbol only. Omit to fetch all symbols for the date (slower, larger result). Format: ts_code in Tushare notation.'
Document pagination/limits for both tools: 'Results are limited to 5000 rows for Tushare (use date ranges to page) and 100-500 for Alpha Vantage (use outputsize="full" for more). If you need multi-year data, split into date ranges and call multiple times. Pagination is not cursor-based; use date boundaries instead.'
Add retry and timeout guidance to descriptions: 'External API calls may timeout after 30 seconds. If timeout occurs, retry with the same parameters after a 5-second delay. Up to 3 automatic retries are recommended. If all retries fail, the data may be temporarily unavailable; ask the user to try again later.'