MCP server for integrating with the Open Supply Hub API to search, fetch, create, and update production location data, as well as manage moderation events.
This server has critical gaps across definition quality. While tool names follow verb-noun conventions (search_, fetch_, create_, update_, list_, merge_), parameter and output schemas are incompletely visible in the source excerpt. Critical problems: (1) Input schemas show only partial structure, most tools define parameters as simple type/description pairs without full JSON Schema validation (e.g., 'location_data' is typed 'object' with only a description, no properties or required fields defined). (2) No output schemas documented anywhere, tools return dict[str, Any] with no indication of fields, structure, or what the LLM should expect. (3) Parameter descriptions are minimal and lack guidance on format, constraints, or when to use each tool vs. alternatives. (4) No error handling documentation visible, tools raise RuntimeError, PermissionError, ValueError with messages, but no pattern guidance for LLM recovery (e.g., 'if 404, try search first'). (5) WRITE operations (create_production_location, update_production_location, merge_moderation_into_facility) lack any confirmation/dry-run pattern to prevent agent-induced data corruption. (6) The initialize() method references deprecated/non-standard patterns (stateful _initialized flag, initialize returning capabilities instead of stateless per-request _meta).
Create a new production location in Open Supply Hub.
Fetch detailed information for a specific production location by OS ID.
Fetch a list of moderation events from the Open Supply Hub API.
Merge contributed data from a moderation event into an existing facility (os_id).
Search production location data from Open Supply Hub API.
Update information for an existing production location using its OS ID.
No output schemas documented for any tool. All tools return dict[str, Any] with no specification of fields, types, or structure. LLMs cannot predict what data is available or plan downstream tool calls without knowing the response shape.
Input parameters lack proper JSON Schema structure. 'location_data' is typed as 'object' with only a description, but has no 'properties' or 'required' fields defined. 'update_data' similarly lacks schema detail. This makes validation impossible and leaves LLMs guessing at the structure.
Parameter descriptions are too brief and lack actionable guidance. E.g., 'query' is described only as 'Search query for production locations', no mention of format, length limits, examples of valid queries, or when to use this tool vs. fetch_production_location_by_id. Descriptions should be 50 - 200 characters and include usage context.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 39 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
No error guidance in tool descriptions or implementations. Error messages exist in code (e.g., 'Forbidden. User may not be confirmed.'), but no documentation of what errors LLMs should expect or how to recover. Tools should include error recovery guidance like 'If 404, the resource may not exist, call search_* first.'
WRITE operations (create_production_location, update_production_location, merge_moderation_into_facility) lack any confirmation, dry-run, or reversibility pattern. An agent could inadvertently corrupt data. Consider adding a 'dry_run' parameter or requiring a confirmation step.
No input validation or field-level constraints visible. E.g., 'limit' in list_moderation_events has no min/max bounds, an LLM could request limit=10000 and blow up memory or timeouts. Add explicit numeric bounds to all constrained parameters.
API key is injected via environment variable but not documented as a requirement in any tool's schema or description. If the API_KEY is missing at startup, the server fails with a cryptic ValueError. Document this clearly in server-level metadata or in tool descriptions.
Tool descriptions do not indicate which tools are READ-only vs. WRITE (stateful). Based on risk annotations: search_, fetch_, list_ are READ_ONLY; create_, update_, merge_ are WRITE. But descriptions lack any mention of side effects or state mutation. E.g., create_production_location should say 'Creates a NEW production location (not reversible).'
No pagination guidance in tool descriptions. list_moderation_events accepts 'limit' and 'search_after', but the description does not explain how pagination works or what 'search_after' contains. This forces LLMs to guess or reverse-engineer from API responses.
Tool response may include irrelevant API metadata (timestamps, internal audit fields, full nested objects). No evidence of response shaping to strip verbose or chatbot-irrelevant fields. Including 500+ char JSON responses wastes context tokens and increases hallucination risk.