Skip to main content
Glama

get_gazette_document

Read-onlyIdempotent

ดึงเอกสารเต็มจากราชกิจจานุเบกษาตามเล่ม/ตอน (เฉพาะ corpus='gazette') — ใช้หลัง search_law เจอเอกสารราชกิจจาฯ แล้ว. ตัวบทกฎหมายใช้ get_law_document · คำพิพากษาฎีกาใช้ get_deka

นับโควตา 1 ครั้งต่อการเรียก (ทุกครั้งที่เลื่อนหน้าด้วย) · อ่านอย่างเดียว · คืนหน้าละ 50 เอกสาร (เล่ม, ตอน) หนึ่งชุดมีได้หลายพันเอกสาร — ใส่ category/no ให้แคบก่อนเลื่อน offset · truncated=true = ยังมีหน้าถัดไป · available_categories มีค่า = category ที่ใส่ไม่มีในเล่ม/ตอนนี้ ให้เลือกจากรายการนั้น เลขประจำตัวประชาชนในเนื้อความถูกแทนด้วย X โดยตั้งใจเพื่อความเป็นส่วนตัว ไม่ใช่ OCR อ่านผิด

Input Schema

NameRequiredDescriptionDefault
noNoเลขลำดับเอกสาร — ใช้ citation.no ของผล search_law เพื่อดึงเอกสารเดียว (ไม่ระบุ = ทุกเอกสารในเล่ม/ตอน)
offsetNoข้ามเอกสารกี่รายการก่อนเริ่มคืนผล (หน้าละ 50) — ใช้เมื่อ truncated=true เช่นหน้าถัดไปใส่ 50; การเลื่อนหน้าแต่ละครั้งนับโควตา 1 ครั้ง
book_noYesเลขเล่ม เช่น "142" — ใช้ citation.book_no ของผล search_law
sectionYesเลขตอนเฉพาะตัวเลข เช่น "1" — ใช้ citation.section ของผล search_law (ตอนพิเศษ: คำว่า "พิเศษ" ใส่ใน category)
categoryNoประเภทราชกิจจาฯ — "ก"=กฎหมาย, "ข"=ฐานันดร, "ค"=ทะเบียนการค้า, "ง"=ประกาศ; ตอนพิเศษใส่ตัวอักษร+"พิเศษ" เช่น "ง พิเศษ" (ส่วน section ใส่เลขตอนอย่างเดียว เช่น "253") (กรองให้แคบลง)

Output Schema

NameRequiredDescriptionDefault
countYes
quotaYes
totalYes
offsetYes
book_noYes
sectionYes
documentsYes
truncatedYes
disclaimerYes
attributionYes
available_categoriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / book_no / description
      Previous value: -"เลขเล่ม (bookNo) เช่น \"142\""New value: +"เลขเล่ม เช่น \"142\" — ใช้ citation.book_no ของผล search_law"
    • changedInput schema / properties / no / description
      Previous value: -"เลขลำดับเอกสาร (จาก field \"no\" ในผล search_law) เพื่อระบุเอกสารเดียว"New value: +"เลขลำดับเอกสาร — ใช้ citation.no ของผล search_law เพื่อดึงเอกสารเดียว (ไม่ระบุ = ทุกเอกสารในเล่ม/ตอน)"
    • changedInput schema / properties / section / description
      Previous value: -"เลขตอน (section) เช่น \"1\""New value: +"เลขตอนเฉพาะตัวเลข เช่น \"1\" — ใช้ citation.section ของผล search_law (ตอนพิเศษ: คำว่า \"พิเศษ\" ใส่ใน category)"
  2. Changed4 schema fields changed
    • addedInput schema / properties / book_no / maxLength
      Added value: +200
    • changedInput schema / properties / category / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / no / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 200,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / section / 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/non-destructive, but the description adds real operational context: quota cost of 1 per call including each page turn, 50 documents per page, the fact a single book/section can hold thousands of documents, the meaning of truncated=true, the available_categories fallback, and the deliberate PII masking of national IDs. None of that is recoverable from annotations or schema.

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?

Purpose is front-loaded in the first clause and each subsequent line carries a distinct fact (alternatives, quota, page size, truncation, category fallback, PII). It is dense and slightly long, but no sentence 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: when to call it, cost model, pagination mechanics, how to recover when the category is wrong, and the expected availability of an output schema for return shape. Nothing material is missing for a paged, quota-metered read tool.

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% so a 3 baseline is warranted, but the description goes further: it explains the offset/paging strategy, the category narrowing workflow, and the non-obvious mapping where 'พิเศษ' belongs in category while section takes only the number. That adds genuine meaning beyond the schema text.

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+resource ('ดึงเอกสารเต็มจากราชกิจจานุเบกษา') and scopes it to corpus='gazette', then explicitly contrasts with get_law_document and get_deka for other document types. An agent can distinguish it from every sibling without opening a 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?

Gives an explicit trigger ('ใช้หลัง search_law เจอเอกสารราชกิจจาฯ แล้ว') and names the two alternatives with the condition that selects each (ตัวบทกฎหมาย → get_law_document, คำพิพากษา → get_deka). It also advises narrowing with category/no before paging, which is a concrete usage rule.

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