Skip to main content
Glama

browse

Read-onlyIdempotent

ดึงรายการค่าที่ใช้กรองได้จริงและสถิติคลัง — เรียกก่อน search_law/deka_by_section เมื่อไม่แน่ใจว่าจะใส่ค่า filter อะไร (แทนการเดาชื่อสาขา/ประเภท/ตัวย่อกฎหมาย) หรือเมื่อผู้ใช้ถามว่าคลังครอบคลุมแค่ไหน. ไม่นับโควตา · อ่านอย่างเดียว · คืนครบทั้งรายการในครั้งเดียว (ไม่มีแบ่งหน้า)

kind → ใช้ต่อที่ไหน: law_types → search_law(law_type=...) · subjects → search_law(subject=...) (จำแนกจากชื่อกฎหมาย อัตโนมัติ บางฉบับไม่มีสาขา) · law_abbreviations → deka_by_section(law=...) เรียงตามจำนวนครั้งที่ฎีกาอ้าง · coverage_stats → จำนวนเอกสารต่อคลัง + ช่วงปี (ตอบคำถามเรื่องความครอบคลุม; ยังไม่พร้อมชั่วคราวได้ ให้ลองใหม่) · law_abbreviations ว่าง + reason="temporarily_unavailable" = บริการฎีกาปิดชั่วคราว ไม่ใช่ไม่มีตัวย่อ

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kind": "<kind>"
    },
    "name": "browse"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYesหนึ่งใน "law_types" | "subjects" | "law_abbreviations" | "coverage_stats" (สะกดตรงตัว) — law_types/subjects: ค่าพร้อมจำนวนเอกสาร (corpus=law) · law_abbreviations: ตัวย่อกฎหมาย (เช่น "ป.อ.") ที่ฎีกาอ้างจริงพร้อมจำนวนครั้ง เรียงมาก→น้อย · coverage_stats: จำนวนเอกสารต่อคลัง + ช่วงปีที่ครอบคลุม

Output Schema

NameRequiredDescriptionDefault
lawNo
dekaNo
kindNo
reasonNo
corporaNo
gazetteNo
opinionNo
subjectsNo
law_typesNo
disclaimerNo
attributionNo
generatedAtNo
law_abbreviationsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / kind / description
      Previous value: -"\"law_types\" | \"subjects\" | \"law_abbreviations\" | \"coverage_stats\" — law_types: ประเภทตัวบทกฎหมาย (พระราชบัญญัติ/ประมวลกฎหมาย/...) + count — กรองใน search_law | subjects: สาขาตัวบทกฎหมาย (แพ่ง/อาญา/ภาษี/ที่ดิน/แรงงาน/...) + count — กรองใน search_law (หมวดมาจากการจำแนกชื่อกฎหมายอัตโนมัติ — best-effort; บางฉบับไม่ถูกจัดสาขา) | law_abbreviations: ตัวย่อกฎหมาย (เช่น \"ป.อ.\") ที่คำพิพากษาฎีกาอ้างจริง + จำนวนครั้งเรียงมาก→น้อย — ใช้เลือกค่าไปกรองใน deka_by_section(law=...) แทนการเดา/parse doctitle เอง | coverage_stats: จำนวนเอกสารรวมต่อ corpus + ช่วงปีที่ครอบคลุม (ราชกิจจาฯ)"New value: +"หนึ่งใน \"law_types\" | \"subjects\" | \"law_abbreviations\" | \"coverage_stats\" (สะกดตรงตัว) — law_types/subjects: ค่าพร้อมจำนวนเอกสาร (corpus=law) · law_abbreviations: ตัวย่อกฎหมาย (เช่น \"ป.อ.\") ที่ฎีกาอ้างจริงพร้อมจำนวนครั้ง เรียงมาก→น้อย · coverage_stats: จำนวนเอกสารต่อคลัง + ช่วงปีที่ครอบคลุม"
  2. Changed1 schema field changed
    • addedInput schema / properties / kind / maxLength
      Added value: +200
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only/idempotent/closed-world, but the description adds material context beyond them: no quota consumption, single-call full return with no pagination, and a documented degraded state (empty law_abbreviations + reason="temporarily_unavailable" means the deka service is down, not that no abbreviations exist). That last detail prevents a serious misreading of an empty result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the primary directive, then a compact per-kind routing table, then edge cases. Dense and mostly waste-free, though 'อ่านอย่างเดียว' partly restates the readOnlyHint annotation and the coverage/temporary-unavailable caveats are stated twice.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return shapes need not be described, and the description still covers the two things an agent cannot infer: what to do with each result set next, and how to interpret an empty or degraded response. Nothing needed for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the kind parameter is already well documented there, so the description need not repeat it. It still adds value by mapping each kind to the downstream call site and by explaining the ordering semantics (sorted by citation count) and the caveat that some law documents have no subject.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: fetch the actually-usable filter values and corpus statistics. It explicitly distinguishes itself from search_law and deka_by_section by positioning itself as the prerequisite lookup step rather than a search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit trigger conditions ('call before search_law/deka_by_section when unsure which filter value to use', 'when the user asks about coverage') and names the exact alternative being avoided (guessing branch/type/abbreviation). Each kind is then routed to its downstream tool with argument syntax.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources