Thai Legal Search MCP Server - เรียกค้นมาตรากฎหมายไทยจาก ChromaDB ผ่าน MCP Protocol
Two tools with basic verb-noun naming (search_law, list_laws) and Thai-language descriptions. Both have input schemas with types and defaults. However, descriptions are minimal (under 100 chars), lack WHEN/WHY context, and parameter descriptions are sparse. No output schema documentation. No error handling guidance. Schemas present but incomplete, missing validation constraints, ranges, and recovery hints. Follows ~20% of the 54 patterns.
แสดงรายชื่อกฎหมายทั้งหมดที่มีในระบบ พร้อมจำนวนมาตรา
ค้นหามาตรากฎหมายไทยที่เกี่ยวข้องกับคำถาม
Descriptions lack actionable context. 'ค้นหามาตรากฎหมายไทยที่เกี่ยวข้องกับคำถาม' (search Thai law related to question) does not explain WHEN to use this vs list_laws, what format query should be, or what score means. LLMs cannot disambiguate without WHEN/WHY guidance.
No output schema documented. search_law returns list[dict] with fields 'section', 'law_name', 'text', 'score', but this is inferred from code, not declared in tool definition. LLMs cannot plan downstream calls without knowing return structure.
Parameter 'query' lacks format/constraint description. No guidance on language (Thai only?), length limits, or example patterns. Parameter 'n_results' has default=5 but no min/max bounds, LLM could pass 10000, causing performance issues.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | 2026-07-28+ | v2 |
No error handling or recovery guidance. If ChromaDB is unavailable, query fails silently. If query is empty or malformed, no actionable error message. LLM has no guidance on retry strategy or fallback.
Thai-language descriptions may not be parsed correctly by English-trained LLMs. Descriptions should be in English for maximum LLM compatibility, or dual-language with English primary.