A Python-based search client for interfacing with GenPark Autopilot Search API, providing dynamic payload construction, ranking logic, response sanitization, and automatic exponential backoff retries.
Single search tool with partially defined schema and reasonable description. Tool name is action-oriented ('search') but generic. Input schema is fully visible with typed parameters and descriptions. Output schema is documented in code but not formally declared in MCP interface. No tool annotations present. Error handling exists (custom GenParkSearchError) but error responses lack actionable recovery guidance for LLMs. Mock mode enables testing but raises concerns about production readiness when real API key is absent.
Queries the GenPark indexing service, resolves results, and generates structural citations.
Tool description is adequate but lacks WHEN to use it and recovery guidance. Does not state it queries GenPark indexing service vs other search backends, when domain filtering is necessary, or what prerequisites exist (API key setup). LLM cannot reason about when to select this tool vs alternatives.
Output schema ('ranked_results' and 'citations' structure) is documented only in code comments and example usage, not in formal tool definition visible to MCP protocol. LLMs cannot inspect return type before calling.
No tool annotations present (readOnlyHint, destructiveHint, idempotentHint). While 'search' is obviously read-only, explicit annotations would improve protocol compliance and agent reasoning.
Error handling returns GenParkSearchError but error messages lack actionable guidance. 'GenPark API search failed after 3 attempts: ...' tells LLM nothing about why failure occurred or how to recover. Should categorize as retryable vs permanent and suggest remediation.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 50 | 2026-07-28+ | v2 |
Parameter 'filter_domain' lacks constraints. Description says 'optional domain filter' but does not specify format (bare domain vs full URL), validation rules, or examples. LLMs may pass invalid formats like 'http://example.com' when 'example.com' is required.
Mock mode silently activates when GENPARK_API_KEY is absent, printing to stdout. In production agents, this defeats monitoring and causes silent failures. Tools should fail fast with clear error messages, not degrade gracefully to simulated data without explicit opt-in.