MCP RAG Server - Model Context Protocol (MCP)に準拠したRAG機能を持つPythonサーバー
The server defines 2 RAG tools with complete JSON Schema input definitions and descriptions in Japanese. However, significant gaps reduce quality: (1) schemas lack output documentation, no return type or result structure is documented; (2) parameter descriptions are minimal (avg ~40 chars) and many parameters lack context about dependencies and valid ranges; (3) no error recovery guidance, handlers return bare error text without actionable next steps; (4) required parameter logic is inconsistent (search requires 'query' only, yet handlers fail if 'user_id' or 'notebook_id' are missing, contradicting the schema); (5) no tool annotations (readOnlyHint, destructiveHint) despite both being read-only operations; (6) descriptions are in Japanese, reducing LLM utility for English-dominant clients. Both tools are explicitly registered with names and schemas (not inferred), so full per-tool scoring applies. Average of per-tool scores: (58 + 46) / 2 = 52.
インデックス内のドキュメント数を取得します
ベクトル検索を行います
Output schemas completely absent for both tools. No documented return structure, field types, or success/failure format.
Required parameter mismatch: schemas declare required=[] or required=['query'] only, but code validates user_id and notebook_id as mandatory, returning errors if absent. LLM cannot determine which params are truly required.
All descriptions written in Japanese; English descriptions missing. LLM clients trained primarily on English cannot reliably interpret intent and use cases.
No error recovery guidance. Error handlers return bare text ('エラー: user_id が指定されていません') without suggesting next steps. Per pattern:recovery-guide, errors should guide LLM recovery.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 34 | 2024-11-05+ | v1 |
No parameter constraints (enums, min/max, regex patterns) despite complex parameters. E.g., 'tenant' and 'notebook' accept free-form strings with no validation; 'limit' and 'context_size' accept unbounded integers; 'include_global' has complex string-to-boolean coercion logic in code but no schema validation.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Both tools are read-only and idempotent; marking them as such would help LLMs reason about safety and caching.
'search' tool naming lacks specificity: does not indicate vector/semantic search vs. keyword search.
Parameter 'include_global' description is vague: 'グローバル棚(library)を含める場合は true' (include library shelf if true). What is a 'library'? When should it be included? No guidance.
Parameters 'user_id' and 'notebook_id' are marked required in code logic but not in schema (required array). Documentation in descriptions says '必須' (required) but schema doesn't enforce it. This creates a contract violation.