Skip to main content
Glama
lawchat-oss

mcp-taiwan-legal-db

by lawchat-oss

query_regulation

Query Taiwan's national regulations database for specific articles by law name or code; supports single, range, or multiple article numbers, plus amendment history and English translations.

Instructions

查詢全國法規資料庫的條文:單條、區間或跨號多條,一次最多 50 條。

不給條號時不回傳條文,只回傳章節目錄(structure:編章節標題與起始條號)與條號範圍, 再用 article_no 指定要讀的條文。回傳的 law 另含 last_amended(最新公布日)、category(主管機關分類), 有特殊施行日時含 effective_date/effective_note(如「自公布後六個月施行」「施行日期由行政院定之」), 引用新修正條文前應先看這兩欄確認是否已施行。

Args: law_name: 法規名稱(如「民法」「勞動基準法」),會自動轉換為 pcode pcode: 法規代碼(如「B0000001」),若提供 law_name 可不填 article_no: 單條「184」「247-1」、區間「184198」、跨號多條「184,185,247-1」,可混用; 不填 = 只回目錄。超過 50 條時回傳 has_more 與續查起點,指定卻不存在的單條列在 missing from_no: 起始條號,與 to_no 合用等於 article_no 的「起迄」 to_no: 截止條號 include_history: 是否包含修法沿革(使用者詢問修法歷程、修正時間、歷次修正內容時設為 True)。 搭配單一條號時,會額外回傳該條文「歷次條文全文」(article_history), 可直接前後對比同一條在不同時間的條文細節。 language: 「en」取官方英譯本(約 970 部法律與部分命令;英譯常落後中文修正,note 會提醒版本差異)

Returns: 包含法規條文的字典:law (pcode, name, status), articles, source_url, history(選填,整部法規的修法沿革文字), article_history(選填,僅在 include_history+單一條號時提供,為該條歷次條文全文)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pcodeNo
to_noNo
from_noNo
languageNo
law_nameNo
article_noNo
include_historyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.0
    • addedInput schema / properties / language
      Added value: +{
      +  "default": "",
      +  "title": "Language",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the 50-article cap, that overflow returns has_more plus a continuation point, that non-existent requested articles appear under missing, that omitting article_no yields structure (headings and article-number ranges) rather than text, and that English translations frequently lag Chinese amendments. Behavioral traits are disclosed far beyond a bare parameter list.

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 core retrieval behavior before the arg list, and each section earns its place. There is mild redundancy between the Args and Returns blocks (article_history and history are each explained twice), which keeps it from the top mark.

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?

Despite no output schema, the description fully specifies the return shape: law (pcode, name, status, plus last_amended, category, effective_date/effective_note), articles, source_url, and the optional history and article_history fields. Together with the documented edge cases, an agent has everything needed to call and interpret this 7-parameter tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely, and it does: law_name is noted as auto-converted to pcode, pcode's format is exemplified ('B0000001'), article_no's three accepted syntaxes are shown with real values ('184', '184~198', '184,185,247-1'), from_no/to_no are defined as an equivalent range form, and include_history/language carry their own semantics.

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

Purpose4/5

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

States a specific verb and resource (retrieve articles from the national regulations database) and enumerates the supported granularities: single article, range, cross-number multiple. However, it never distinguishes itself from the closely-named sibling search_regulations, so an agent must infer which one finds laws versus reads articles.

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

Usage Guidelines4/5

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

Gives explicit when-conditions: omit article_no to get only the chapter/article index first, then specify article_no to read text; set include_history=True when the user asks about amendment history; check effective_date/effective_note before citing newly amended articles; use language='en' for English versions. It stops short of naming any alternative tool or when-not-to-use-this-tool case.

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