Semantic PR search for AI coding agents — ingest, index, and retrieve merged-PR precedents via MCP
search_prs_v1 has a well-structured schema with proper types, descriptions, and constraints. The tool name is action-oriented (search_*) and the description is comprehensive (180+ chars, explains WHAT/WHEN/HOW). Input parameters are typed and described: query (string, required), repos (array of strings, optional with SEARCH-03 reference), limit (integer, clamped to 20), debug (boolean). Output schema is documented as SearchResponseV1 (Pydantic, MCP-02 outputSchema) with dual structured+text response. Error handling includes credential redaction (D-06) and generic ToolError messages to client. However, the description could be more concise for LLM parsing, and the output schema structure (SearchResponseV1 fields) is not fully visible in the source excerpt, preventing full validation of response field naming alignment with input parameters.
Search indexed pull requests for precedents matching `query`. Returns a dual structured+text response with structuredContent: SearchResponseV1 (validated Pydantic dict, MCP-02 outputSchema) and content[0]: Human-readable text block with calibrated confidence labels
Output schema SearchResponseV1 structure not fully visible in source; cannot verify response field naming matches input parameter names (e.g., if input has 'repos', does output include 'repos' or 'repositories'?). This risks LLM confusion when chaining tools.
Tool description is 180+ chars but could be tightened for faster LLM parsing. Current: 'Search indexed pull requests for precedents matching `query`. Returns a dual structured+text response...' Consider: 'Search indexed PRs for precedents matching a query. Returns structured results with confidence scores and optional debug info.'
No explicit error recovery guidance in tool description. When search returns zero results or low confidence, the description does not hint at fallback strategies (e.g., 'Try broadening repos or lowering confidence threshold'). This forces the LLM to guess recovery steps.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 68 | 2026-07-28+ | v2 |
The 'limit' parameter defaults to 'config top_n' but the description does not state the actual default value or the clamping behavior clearly. LLMs benefit from explicit defaults: 'Default: 5 (clamped to max 20).'