A Java-based MCP server using Spring Boot and Spring AI that provides tools for weather information, number operations, and DeepSeek API balance queries
This is a minimalist demo server with 4 tools. All tools have descriptions and basic input schemas, but quality gaps are significant: (1) Descriptions are terse (10-37 chars), below the baseline of 194 chars, and lack actionable context. (2) Parameter descriptions are present but minimal (e.g., '城市名字' is just 'city name', no format guidance, no examples of valid inputs). (3) Input schemas are present but lack depth: integer ranges unbounded, strings unconstrained. (4) No output schema documentation, LLMs cannot plan downstream calls or understand return structure. (5) No error handling guidance, tools can fail silently or return cryptic messages without recovery hints. (6) getBalance() has empty input schema {} yet calls an external API with credentials, this is a security red flag and violates the requirement to document what parameters control. (7) Tool names follow verb_noun pattern (good), but descriptions are in Chinese only, limiting discoverability for non-Chinese-speaking agents. (8) No pagination, batching, or composition guidance, tools operate in isolation. This is functional for a demo but would not pass production code review.
获取DeepSeek平台的余额信息
获取城市的温度
判断一个数是奇数还是偶数
判断一个数是不是素数
All tool descriptions are under 40 characters and lack actionable context. The rubric baseline is 194 chars (p10=34, p90=392). Current descriptions are: getWeather (10 chars), judgeEvenNumber (20 chars), judgePrimeNumber (18 chars), getBalance (18 chars). None explain when to use each tool, what they return, or prerequisites.
No output schemas documented for any tool. LLMs cannot reason about return types or plan downstream calls. E.g., judgeEvenNumber returns a string like '5是奇数', but agents do not know this without reading code. All tools should document return structure.
Input parameters lack validation constraints. judgeEvenNumber and judgePrimeNumber accept unbounded integers, agents could pass 0, negative numbers, or 10^100, causing logic errors or infinite loops. Add min/max bounds in schema and descriptions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 42 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 35 | - | v1 |
getWeather parameter 'city' accepts free-form strings with no validation. No enum of valid cities, no format specification. Agents will hallucinate city names (e.g., 'XyzonAlpha') and receive valid-looking but misleading results (random temperature for any string).
getBalance has EMPTY input schema {} and no parameter documentation. Although credentials are injected server-side (secure), the schema communicates nothing about what controls the call. Per HARD SCORING RULE, this receives schema score of 0.
No error handling guidance for any tool. Tools can fail (network errors, invalid input, API rate limits) but descriptions do not explain: Is it retryable? Should the agent ask the user? What should it try next? E.g., getBalance calls an external API but no error message guides recovery.
All descriptions are in Chinese only. Tool names are English, but descriptions are not. This limits discoverability for non-Chinese-speaking LLM clients and violates accessibility norms. Descriptions should be in English (or English + Chinese).
getBalance returns unstructured string output ('DeepSeek平台的余额信息为:\n - 当前账户是否有余额...'). Should return structured JSON object with fields: is_available (boolean), currency (string), total_balance (number), granted_balance (number), topped_up_balance (number). Unstructured output forces LLM parsing and wastes tokens.