Skip to main content
Glama

verify_citation

Read-onlyIdempotent

ตรวจว่าการอ้างอิงหนึ่งรายการมีจริงในคลัง — ใช้ก่อนยกมาตรา/ฎีกา/ข้อความที่อ้างให้ผู้ใช้ (กันอ้างผิด/แต่งขึ้น). ตรวจแบบ deterministic ไม่ใช่ AI ตัดสินเนื้อหา: (1) ฎีกา/มาตรานี้มีในคลังไหม (2) ฎีกานี้อ้างมาตราที่ว่าจริงไหม (3) ข้อความที่อ้างมีอยู่ในเนื้อหาจริงแบบตรงตัวไหม — ไม่ตัดสินทิศทางคำวินิจฉัย ต้องอ่าน full_text/section_text เอง เอกสารที่มีหลายการอ้างอิง → batch_citation_audit (Pro) ตรวจรวดเดียว · ต้องการเนื้อหาเต็มเพื่ออ่าน → get_deka/get_law_document นับโควตา 1 ครั้งต่อการเรียก · อ่านอย่างเดียว · ผสมสองโหมด/ขาด field คู่ถูกปฏิเสธก่อนหักโควตา · บริการฎีกาปิดชั่วคราว (เมื่อส่ง deka_no) ไม่หักโควตา

เลือกได้โหมดเดียว (ห้ามผสม):

  • ฎีกา: deka_no (+ cited_law+cited_section และ/หรือ quoted_text)

  • มาตรา: law_code + unit_label (+ quoted_text)

อ่านผล:

  • case_status/statute_status: "verified" | "not_found_in_corpus" | "cannot_verify" (ดู reason) — not_found_in_corpus = ไม่พบในคลังที่ตรวจได้ ไม่ใช่ข้อพิสูจน์ว่าไม่มีอยู่จริง

  • citation_attribution (เมื่อส่ง cited_law) / quote_grounding (เมื่อส่ง quoted_text): "verified" | "not_found" | "cannot_verify" (citation_attribution มี "unknown" ด้วย = ไม่ทราบรูปแบบที่เก็บของกฎหมายนั้น ไม่ใช่หลักฐานว่าไม่ได้อ้าง) — matched_snippet ตัดจากข้อความหลัง normalize ไม่ใช่สำเนาตรงตัวของต้นฉบับ

  • title_marked_repealed=True = ชื่อฉบับมี "(ยกเลิก)" (ไม่ใช่สถานะทางกฎหมายที่ยืนยันแล้ว — ตรวจ source_url)

  • unit_scope ไม่ None = มาตรานี้มาจากฉบับแก้ไขที่แนบท้าย ไม่ใช่ตัวบทหลัก · warnings = ข้อควรระวังเพิ่มเติม

  • full_text ของฎีกาอาจมีชื่อจริงคู่ความ — ทำตาม deka_privacy_note ก่อนยกไปใช้ต่อ

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "verify_citation"
  }
}

Input Schema

NameRequiredDescriptionDefault
deka_noNoเลขฎีกา เช่น "1729/2569" (รับ "ฎีกาที่ 1729/2569"/"คำพิพากษาศาลฎีกาที่ 1729/2569"/เลขไทยได้ — normalize ให้เอง) คดีรวมสำนวน (รูป "N-M/ปี") คืน cannot_verify เสมอ (ต้องตรวจมือ ไม่ verify อัตโนมัติ)
law_codeNoรหัสกฎหมาย จาก citation.law_code ของผล search_law — ใช้คู่กับ unit_label เสมอ
cited_lawNoตัวย่อกฎหมายที่อ้างว่าฎีกานี้อ้างถึง เช่น "ป.อ." (คู่กับ deka_no+cited_section)
unit_labelNoมาตรา เช่น "มาตรา 420 ทวิ" — บังคับถ้าระบุ law_code · ต้องมีคำนำหน้า "มาตรา"/"ข้อ" (เลขเปล่าผ่านด่านแต่ได้ not_found_in_corpus และหักโควตา) · ตรวจมาตราเจาะจง ไม่ใช่ทั้งฉบับ
quoted_textNoข้อความที่อ้างว่ามาจากคดี/มาตรานี้ (≤10,000 ตัวอักษร) — ตรวจ exact substring (ไม่ fuzzy/embedding) หลังตัดอักขระควบคุม/มองไม่เห็น + NFC + ยุบช่องว่างทั้งสองฝั่ง · เว้นวรรคต่างจากต้นฉบับ = not_found (ต้นฉบับไทยมักเขียนติดกัน) ให้ยกมาตรงตัว
cited_sectionNoเลขมาตราที่อ้างว่าฎีกานี้อ้างถึง (คู่กับ deka_no+cited_law)

Output Schema

NameRequiredDescriptionDefault
quotaNo
reasonNo
law_codeNo
warningsNo
full_textNo
disclaimerNo
source_urlNo
unit_scopeNo
attributionNo
case_statusNo
section_textNo
timeline_codeNo
statute_statusNo
duplicate_countNo
matched_snippetNo
quote_groundingNo
deka_privacy_noteNo
citation_attributionNo
title_marked_repealedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / quoted_text / description
      Previous value: -"ข้อความที่อ้างว่ามาจากคดี/มาตรานี้ (≤10,000 ตัวอักษร) — ตรวจ exact substring (ไม่ fuzzy/embedding) หลังตัดอักขระควบคุม/มองไม่เห็น + NFC + ยุบช่องว่าง"New value: +"ข้อความที่อ้างว่ามาจากคดี/มาตรานี้ (≤10,000 ตัวอักษร) — ตรวจ exact substring (ไม่ fuzzy/embedding) หลังตัดอักขระควบคุม/มองไม่เห็น + NFC + ยุบช่องว่างทั้งสองฝั่ง · เว้นวรรคต่างจากต้นฉบับ = not_found (ต้นฉบับไทยมักเขียนติดกัน) ให้ยกมาตรงตัว"
    • changedInput schema / properties / unit_label / description
      Previous value: -"เลขมาตรา เช่น \"มาตรา 420 ทวิ\" — บังคับถ้าระบุ law_code (ตรวจมาตราเจาะจง ไม่ใช่ทั้งฉบับ — ใช้ get_law_document แทนถ้าต้องการทั้งฉบับ)"New value: +"มาตรา เช่น \"มาตรา 420 ทวิ\" — บังคับถ้าระบุ law_code · ต้องมีคำนำหน้า \"มาตรา\"/\"ข้อ\" (เลขเปล่าผ่านด่านแต่ได้ not_found_in_corpus และหักโควตา) · ตรวจมาตราเจาะจง ไม่ใช่ทั้งฉบับ"
  2. Changed7 schema fields changed
    • changedInput schema / properties / cited_law / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 1000,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / cited_section / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / deka_no / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / law_code / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / quoted_text / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 10000,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / quoted_text / description
      Previous value: -"ข้อความที่อ้างว่ามาจากคดี/มาตรานี้ — ตรวจ exact substring (ไม่ fuzzy/embedding)"New value: +"ข้อความที่อ้างว่ามาจากคดี/มาตรานี้ (≤10,000 ตัวอักษร) — ตรวจ exact substring (ไม่ fuzzy/embedding) หลังตัดอักขระควบคุม/มองไม่เห็น + NFC + ยุบช่องว่าง"
    • changedInput schema / properties / unit_label / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: deterministic (non-AI) checking, one quota unit per call, rejection-before-quota-charge on invalid mode combos, no quota charge when the ruling service is down, and the important limitation that it does not judge the direction of a holding. Also flags privacy handling of full_text defendant names and warns that status values are not proof of non-existence.

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 purpose and alternatives in the first two paragraphs, then a scannable mode list and a result-reading list. It is dense and slightly long because the result-status block partly overlaps the output schema, but no line is filler.

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 everything an agent needs for a 6-parameter, mode-switched verification tool: input modes, quota behavior, failure modes, how to read verified/not_found/cannot_verify, title_marked_repealed and unit_scope caveats, and the privacy note before reusing text.

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 already 100%, so the schema carries per-field meaning; the description adds cross-parameter semantics the schema lacks, namely the two selectable modes and the rule that deka_no combines with cited_law/cited_section and/or quoted_text while law_code requires unit_label. It stops short of restating field-level formats, which is fine given the schema.

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?

Starts with a precise verb+resource: verify that one citation actually exists in the corpus, and states the motivating use case (checking before quoting a statute/ruling to a user). It also distinguishes itself from siblings by name: batch_citation_audit for multiple citations and get_deka/get_law_document when full text is needed.

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 says when to use it (before presenting a มาตรา/ฎีกา/quote to a user), and spells out the two mutually exclusive input modes with their required field pairings, warning that mixing modes or omitting paired fields is rejected. Alternatives are named with the condition that selects each (batch_citation_audit for multi-citation documents, get_deka/get_law_document for reading content).

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