Skip to main content
Glama

research_dossier

Read-onlyIdempotent

รวบรวม "สำนวนวิจัย" ของประเด็นเดียวในคำเรียกเดียว: มาตราตัวบท + คำพิพากษาฎีกา + ความเห็นกฤษฎีกา (+ คำวินิจฉัยชี้ขาดอำนาจหน้าที่ระหว่างศาล เฉพาะแพ็กเกจ Pro) — ทางลัดแทนการเรียก search_law หลายรอบแล้ว deka_by_section ทีละมาตราเอง (ไม่มี ranking ของตัวเอง). ใช้ search_law แทนเมื่อต้องกรอง category/ปี/subject/law_type หรือต้องการแหล่งเดียว (dossier ไม่มี filter และไม่ค้นราชกิจจาฯ)

ต้นทุน: นับโควตา 1 ครั้งต่อการเรียก (เท่า search_law แม้รันการค้นย่อยหลายรอบ) · อ่านอย่างเดียว · ใช้เวลาได้ถึง ~60 วินาที · รับงานพร้อมกันได้จำกัด — คิวเต็มปฏิเสธโดยไม่หักโควตา แต่ error หมดเวลา เกิดหลังหักโควตาแล้วและไม่คืน (ลองใหม่ = หักอีกครั้ง ควรแคบคำถามก่อน)

อ่านผล:

  • case_law_by_section = ฎีกาที่ยืนยันแล้วว่าอ้างอิงมาตราใน statute_sections (pivot แบบ deterministic ของ 3 มาตราแรก เฉพาะ ป.อ./ป.พ.พ./ป.วิ.อ./ป.วิ.พ. · กฎหมายอื่นได้ว่างเสมอ ดู case_law_by_semantic_search · มีแค่ข้อมูลสรุป ไม่มี full_text)

  • case_law_by_semantic_search = ฎีกาที่จับคู่เชิงความหมายกับ query เท่านั้น ไม่ได้ตรวจว่าอ้างมาตราเหล่านั้น — ห้ามให้น้ำหนักหลักฐานเท่า case_law_by_section

  • ไม่จัดฎีกาเป็น "สนับสนุน/คัดค้าน" จุดยืนใด — verdict/department/doctitle เป็นข้อมูลดิบให้ตีความเอง

  • evidence_gaps.notes ไม่ว่าง (บางส่วนล้ม/ถูกตัดเพราะเวลา/เจอมาตราแต่ไม่เจอฎีกาที่อ้าง) → บอกผู้ใช้ตามข้อความ ห้ามสรุปว่า "ไม่มี" · note ที่มีวลี "ขั้นค้นทำงานครบ" = ส่วนนั้นไม่ขาด แต่ version_count อาจต่ำกว่าจริง

  • related_court_rulings (เฉพาะแพ็กเกจ Pro; ผู้ใช้อื่นไม่มี key นี้) = คำวินิจฉัยชี้ขาดอำนาจหน้าที่ระหว่างศาล จากคลังเล็กที่เป็นเรื่องอำนาจหน้าที่ระหว่างศาลเป็นหลัก — ส่งกลับทุก query แต่เกี่ยวข้องเฉพาะเมื่อประเด็นคือ "ศาลไหนมีอำนาจ"; ประเด็นอื่นห้ามอ้าง · แต่ละรายการมี via: "section" = อ้างมาตราของตัวบทที่เจอ · "semantic" = ใกล้ query เชิงความหมาย · "law" = อ้างกฎหมายเดียวกันแต่ไม่พบ ว่าอ้างมาตราที่เจอ (อาจอ้างมาตราอื่นหรือไม่ระบุมาตรา — ฉบับใหม่สุด ไม่ใช่ที่ใกล้ query) · ลำดับ: section 1 รายการ → semantic → section ที่เหลือ → law (เติมช่องที่เหลือ) · relation_origins (มีเฉพาะรายการที่ค้นเจอจากกฎหมาย/มาตราของตัวบทด้วย) = ที่มาของความสัมพันธ์นั้น ("source" = ระบบต้นทางระบุ) — บอกที่มาเท่านั้น ระดับมาตราดูจาก via: "section" = อ้างมาตราตรง · "semantic"/"law" ไม่ได้ยืนยันว่าอ้างมาตรานั้น

  • court_rulings_note (Pro) = ขอบเขตข้อมูลของ related_court_rulings (คำวินิจฉัยส่วนใหญ่ไม่ระบุมาตรา) — เมื่อไม่เป็น null ให้บอกผู้ใช้ ทุกครั้งที่ตอบเรื่องคำวินิจฉัยที่อ้างกฎหมาย/มาตรา และห้ามสรุปว่าไม่มีคำวินิจฉัยที่อ้างมาตรานั้น

  • quota.notice, law_freshness_note, deka_privacy_note ใช้แบบเดียวกับ search_law

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": {
      "query": "<query>"
    },
    "name": "research_dossier"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesคำค้นภาษาไทย เช่น "ค่าไถ่การเรียกร้องประกันตัว" (≤2,000 ตัวอักษร — ข้อเท็จจริงยาว ให้สรุปเป็นประเด็นกฎหมายสั้นๆ ก่อน)
top_k_opinionsNoจำนวนความเห็นกฤษฎีกาสูงสุด (ค่าเริ่มต้น 3, สูงสุด 20)
top_k_statutesNoจำนวนมาตราตัวบทสูงสุด (ค่าเริ่มต้น 5, สูงสุด 20)
top_k_court_rulingsNoจำนวนคำวินิจฉัยชี้ขาดอำนาจหน้าที่ระหว่างศาลสูงสุด (ค่าเริ่มต้น 3, สูงสุด 20; เฉพาะแพ็กเกจ Pro — ผู้ใช้อื่นไม่มีผลต่อการเรียก)
top_k_deka_semanticNoจำนวนคำพิพากษาฎีกา (ค้นเชิงความหมาย) สูงสุด (ค่าเริ่มต้น 5, สูงสุด 20)

Output Schema

NameRequiredDescriptionDefault
queryYes
quotaYes
disclaimerYes
attributionYes
evidence_gapsYes
related_opinionsYes
statute_sectionsYes
deka_privacy_noteYes
court_rulings_noteNo
law_freshness_noteYes
case_law_by_sectionYes
related_court_rulingsNo
case_law_by_semantic_searchYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / court_rulings_note
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Court Rulings Note"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / top_k_court_rulings
      Added value: +{
      +  "default": 3,
      +  "description": "จำนวนคำวินิจฉัยชี้ขาดอำนาจหน้าที่ระหว่างศาลสูงสุด (ค่าเริ่มต้น 3, สูงสุด 20; เฉพาะแพ็กเกจ Pro — ผู้ใช้อื่นไม่มีผลต่อการเรียก)",
      +  "title": "Top K Court Rulings",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / related_court_rulings
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Related Court Rulings"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / query / description
      Previous value: -"คำค้นภาษาไทย เช่น \"ค่าไถ่การเรียกร้องประกันตัว\""New value: +"คำค้นภาษาไทย เช่น \"ค่าไถ่การเรียกร้องประกันตัว\" (≤2,000 ตัวอักษร — ข้อเท็จจริงยาว ให้สรุปเป็นประเด็นกฎหมายสั้นๆ ก่อน)"
    • addedInput schema / properties / query / maxLength
      Added value: +50000
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: one quota unit per call regardless of sub-searches, up to ~60s runtime, limited concurrency, queue-full rejection that does not charge quota, and — critically — timeout errors that occur after quota is charged and are non-refundable, with advice to narrow the query. That is exactly the kind of non-obvious operational behavior an agent cannot infer from structured fields.

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

Conciseness3/5

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

Purpose and the sibling alternative are front-loaded, and the cost/caveat blocks are well-delimited with bullets. However the bulk of the text is return-value interpretation (case_law_by_section vs semantic, via/relation_origins, court_rulings_note) despite an output schema existing, making it long and dense for a 5-parameter tool.

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?

Covers cost, latency, concurrency, partial-failure semantics, and the interpretive warnings that matter most — do not treat semantic matches as equal evidence, do not conclude 'none' when evidence_gaps.notes is populated, and only cite court rulings when the issue is jurisdictional. Nothing needed to call it correctly or to report results faithfully is missing.

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

Parameters3/5

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

Schema description coverage is 100%, and each top_k parameter is fully documented with defaults and maxima in the schema itself. The description adds no per-parameter meaning beyond the blanket statement that the dossier has no filters, so the baseline 3 applies.

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?

States a specific verb and resource ('รวบรวม "สำนวนวิจัย" ของประเด็นเดียว') and enumerates exactly what the dossier bundles: statutes, Supreme Court judgments, and Council of State opinions. It also positions itself against named siblings — a shortcut replacing repeated search_law calls plus per-section deka_by_section — so the agent can distinguish it without opening any schema.

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?

Explicitly names the alternative and the condition that selects it: use search_law instead when filtering by category/year/subject/law_type or when a single source is wanted, and notes the dossier has no filters and does not search the Royal Gazette. It also names case_law_by_semantic_search for non-core statutes, giving a full routing map.

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