Python framework for building MCP servers with a layered architecture and REST compatibility
restmcp provides 7 tools with complete input schemas and descriptions. Naming follows verb_noun convention (check_battery, export_readings, get_device, purge_readings, recalibrate_fleet, whoami). Descriptions are present and contextual (avg ~120 chars), exceeding the 10-char minimum but below the 194-char production baseline. All parameters have type definitions and descriptions. However, output schemas are not explicitly documented in the tool definitions, descriptions mention return structure (e.g., 'Returns: a map of battery status -> list of device ids') but formal JSON Schema output specs are absent. Error handling is minimal; no recovery guidance or actionable error messages visible. Parameter constraints (e.g., device_id range 1-5) are mentioned in descriptions but not enforced via JSON Schema minima/maxima. No tool annotations (readOnlyHint, destructiveHint) despite clear risk classifications in metadata.
Group devices by battery status within a time window. Returns: a map of battery status -> list of device ids (e.g. {"healthy": [...], "degraded": [...], "critical": [...]}).
Download one device's readings as a CSV file.
Fleet-wide battery rollup (cached for 30s). Returns: aggregate battery stats for the selected devices — device_count, avg_battery_pct, and a min/max range.
Latest telemetry reading for one device. Returns: the device's most recent reading (battery %, voltage, recorded_at as ISO 8601) plus a derived `status` field.
Discard the in-memory readings of one device.
Accept a fleet recalibration job; poll for the outcome.
Identify the API key that authenticated this call. Returns: {"who": key name or null, "scopes": sorted scope list} — both empty when authentication is disabled.
Output schemas not formally documented. Tool descriptions mention return structure in prose (e.g., 'Returns: a map of battery status -> list of device ids') but no JSON Schema output specs are visible. LLMs cannot reliably parse unstructured prose returns or plan downstream tool chains.
Tool annotations missing. Risk metadata (READ_ONLY, DESTRUCTIVE, WRITE) is present in the evaluation but not exposed as MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint). Agents cannot distinguish safe-to-retry operations from irreversible ones.
Parameter constraints not enforced via JSON Schema. device_id is described as '1-5' but no minimum/maximum properties in schema. days_window has a default but no min/max bounds. LLMs may pass invalid values; validation must happen server-side with actionable error messages.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | <=2025-11-25 | v2 |
Error handling and recovery guidance absent. No visible error responses, retry logic, or actionable error messages. If a device_id is invalid or a recalibration job fails, the LLM has no guidance on what to do next.
Descriptions lack dependency hints and selection context. 'export_readings' does not explain when to call it vs 'get_device'. 'recalibrate_fleet' does not clarify the polling model or expected job duration. LLMs cannot distinguish between similar tools or plan multi-step workflows.