An MCP server demonstrating math and weather tools integration with LangChain and LangGraph
This is a minimal demonstration server with significant quality gaps across all definition dimensions. Tool names are adequately action-oriented (add, multiply, get_weather), but descriptions are critically underdeveloped. The math tools have descriptions under 30 characters ("Add two numbers", "Multiply two numbers"), far below the 194-char baseline for production tools. The weather tool description is similarly sparse ("Get the weather location"). Parameter descriptions exist but are generic ("First number", "The location to get weather for") and lack context about valid ranges, formats, or use cases. No output schemas are documented, callers cannot anticipate return types or plan downstream tool composition. No error handling guidance is present; tools will fail silently or with uncaught exceptions. The math tools coerce integer inputs via Pydantic validation, but this behavior is undocumented and could surprise agents. The weather tool is async but returns a hardcoded string, masking real API complexity. Overall, this reads as a quick proof-of-concept, not production-ready tooling.
Add two numbers
Get the weather location
Multiply two numbers
Tool descriptions are critically short (under 30 chars) and provide no context for LLM selection. "Add two numbers" does not explain when to use this vs alternatives, prerequisites, or side effects.
No output schema documentation. Callers cannot anticipate what add() and multiply() return (are they int, float, object?) or plan downstream composition. The weather tool description doesn't state the return type or format.
Parameter descriptions are generic and lack actionable constraints. "First number" does not specify valid range, precision, or edge cases (negative, zero, very large). "The location to get weather for" lacks format guidance (city name? coordinates? ISO region code?).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 5 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 32 | - | v1 |
No error handling or recovery guidance. If add() receives non-integer input, the Pydantic validator silently coerces it; if that fails, the exception is unhandled. Agents see a generic error with no guidance on how to retry or what constraint was violated.
The get_weather tool is async but returns a hardcoded mock string ("It's always raining in California") regardless of input, masking the actual behavior and API integration. This is acceptable for a demo but misleading for production use.
Integer coercion behavior in math tools is undocumented. The Pydantic validator silently converts string inputs to integers; LLMs may not realize this is happening and could pass invalid types expecting clear error messages instead.