Demo educativo de servidor MCP usando Spring AI para consultas de datos financieros (acciones y criptomonedas)
This Spring AI MCP server implements three financial tools (getCryptoPrice, getStockPrice, getMarketSummary) with basic descriptions and input schemas visible in the source code. However, significant gaps limit production readiness. Tool names follow verb_noun convention and are reasonably clear. Descriptions are present but lack depth and actionability, they read as feature lists rather than LLM-optimized guidance. Parameter schemas are defined but incomplete: only 'cryptoId' and 'symbol' have explicit type and description; 'getMarketSummary' takes no parameters. Output schemas are entirely undocumented, the source code does not show what fields clients should expect from responses (e.g., does getCryptoPrice return { price, marketCap, volume, ... }?). Error handling is absent from the visible code, no guidance for scenarios like invalid ticker symbols or API failures. Security appears sound (no secrets in params, read-only operations) but is not explicitly documented. Tool composition is appropriate (each tool has a single responsibility), but chaining metadata is missing (e.g., do responses include IDs needed for downstream calls?). The code references services (CryptoService, impl not shown) that likely contain business logic, but tool-level definitions are shallow.
Obtiene el precio actual y datos de mercado de una criptomoneda. Proporciona información como precio en USD, capitalización de mercado, volumen de trading 24h, cambio porcentual y ranking. Ejemplos de IDs: bitcoin, ethereum, cardano, solana, dogecoin.
Obtiene un resumen rápido del mercado con precios de activos populares. Incluye acciones tecnológicas principales (AAPL, GOOGL, MSFT) y criptomonedas principales (Bitcoin, Ethereum). Útil para obtener una vista general del mercado.
Obtiene el precio actual y datos de mercado de una acción. Proporciona información como precio actual, cambio porcentual, volumen y precios máximo/mínimo del día. Ejemplos de símbolos: AAPL (Apple), GOOGL (Google), MSFT (Microsoft), TSLA (Tesla).
Output schemas are not documented. Source code does not show what fields the tools return. LLMs cannot plan downstream calls or extract data without knowing response structure.
Descriptions lack actionable context. 'Obtiene el precio actual...' lists features but does not explain WHEN to use this tool, what makes it different from others, or what format the response is in. Descriptions should be 50-200 chars and LLM-optimized.
Parameter descriptions are generic and lack format guidance. 'El identificador de la criptomoneda' does not specify format (lowercase? uppercase? with hyphens?). Should state: 'Crypto ID in lowercase (e.g., bitcoin, ethereum). Accepts CoinGecko IDs.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 31 | - | v1 |
getMarketSummary accepts no parameters but description references 'populares' (popular assets) without explaining how the set is chosen or documented. If the asset list is fixed, list them in the description.
No error handling guidance visible. What happens if 'bitcoin' is misspelled, or if the API is unavailable? Tool should document retryable vs fatal errors and suggest recovery steps.
Descriptions include example identifiers (e.g., 'bitcoin, ethereum, AAPL, GOOGL, MSFT, TSLA') in free text rather than as constraint metadata. LLMs may treat examples as the only valid inputs. Use enum constraints or regex patterns instead.