AWS ECS-based MCP server sample with AI agent that integrates multiple MCP services for mathematical operations and AWS API access
This server implements 5 basic arithmetic tools with minimal documentation. All tools have descriptions and input schemas, but descriptions are trivially short (10-40 chars), parameter descriptions lack actionable context, and there is no output schema documentation. The tools exhibit naming quality (verb_noun form: add, subtract, divide, multiply, mod) but descriptions do not explain when to use each tool or what they return. Parameter descriptions exist but are generic ('First number', 'Dividend') without format constraints, range info, or error guidance. No error handling documentation. The implementation in FastMCP is clean, but the MCP interface definition lacks depth expected for production agents.
Add two integers
Divide two integers
Modulo operation on two integers
Multiply two integers
Subtract two integers
Tool descriptions are extremely short (10-40 chars) and lack actionable context. 'Add two integers', 'Subtract two integers', etc. do not explain when to use each tool, what it returns, or whether it has side effects. Descriptions should be 50-200 chars and answer: what does it do, when to use it, what does it return.
No output schema documented. LLMs cannot plan downstream tool calls or extract returned data if they don't know the response structure. All tools should document their return type and structure (e.g., 'Returns: integer result of the operation').
divide() function has a critical bug: dividing by zero returns a string ('Cannot divide by zero') but the function signature declares return type int. This causes type mismatch and will confuse LLMs expecting an integer. The tool should raise an exception or return a structured error.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-21 | D | 54 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 14 | - | v1 |
Parameter descriptions are generic and lack validation constraints. 'First number' and 'Dividend' do not specify: range (unbounded integers?), whether null is allowed, what happens on overflow, or expected precision. LLMs cannot infer these constraints and will pass invalid inputs.
No error handling guidance. If divide() is called with b=0, LLMs receive a string response instead of an integer and cannot recover. Tools should return structured errors with actionable messages, e.g., 'Invalid input: divisor cannot be zero. Use a non-zero divisor.'
mod() tool will fail silently if b=0 (Python raises ZeroDivisionError). No pre-validation or error message. The server will crash the request. This violates error-handling patterns.