Skip to main content
Glama
lawchat-oss

mcp-taiwan-legal-db

by lawchat-oss

mcp-taiwan-legal-db

English · 繁體中文

台灣法規、裁判書、憲法法庭裁判與卷宗、行政函釋、判解、訴願與準司法決定、立法資料、司法統計與法學文獻 — MCP Server。

讓任何 MCP 相容的 AI 助手直接存取台灣公開法律資料:

本工具即時爬取官網公開資料,請求由使用者自己的電腦發出。使用前請先讀免責聲明:使用者須自行遵守各網站的使用規定與相關法令,查詢結果不構成法律意見。

  • 司法院裁判書 — judgment.judicial.gov.tw(全文搜尋 + 取得,附歷審清單)

  • 全國法規資料庫 — law.moj.gov.tw(11,700+ 部法規,含官方英譯、最新公布日與施行日註記)

  • 憲法法庭 — cons.judicial.gov.tw(871 筆大法官解釋 + 憲判字,含理由書全文,離線快取;受理中案件、言詞辯論、法庭之友與卷內書狀即時查詢)

  • 行政機關函釋 — 法務部、勞動部、衛福部、財政部、經濟部、內政部、金管會、交通部、中央銀行、人事總處、消保處、考試院系統、臺北市、新北市等 51 個官方來源,含智慧局專利、商標審查基準;標出官網的「停止適用」與「現行」標示(即時查詢)

  • 判解 — 司法院法學資料檢索系統(最高法院決議、法律問題座談、停止適用判例、院字/院解字、大法庭、精選裁判)

  • 訴願與準司法決定 — 行政院、各部會與縣市政府訴願決定,公平會處分書、勞動部不當勞動行為裁決、保訓會復審/再申訴決定、金管會裁罰、工程會採購申訴、監察院案件、律師懲戒決議

  • 立法資料 — 每一條歷次修正的條文與立法理由、立法歷程、立法院議案(含審查中草案)與公報紀錄、法規命令草案預告

  • 統計與量刑 — 司法統計年報/月報、法務統計、《犯罪狀況及其分析》、司法院量刑資訊系統的刑度統計

  • 法學文獻 — 司法院專題研究報告(含司法研究年報)、國圖期刊論文索引、GRB 研究計畫、開放取用法學期刊

  • 其他規範 — 地方自治法規、條約協定與租稅協定、證交所/櫃買中心/期交所規章

以 Python 搭配 MCP Python SDK 寫成。純工具 wrapper,只連線下方「資料來源與統計」列出的官方網站(政府機關,以及國家圖書館、中研院、國立大學、證券交易所等公共機構),不發送任何其他網路請求;釋字/憲判字資料為內建離線打包。


特色

功能

說明

26 個 MCP 工具

裁判書搜尋/全文/歷審、法規查詢(含英譯與修法追蹤)、釋字/憲判字查詢、引用關係圖譜、憲法法庭卷宗、行政函釋與審查基準、判解、訴願與準司法決定、立法理由與立法紀錄、統計與量刑、法學文獻、地方法規與條約

離線快取

871 筆大法官解釋與憲判字(含理由書全文,以及從官網 PDF 擷取的大法官意見書全文)從本地資料即時回傳

引用關係圖譜

從理由書抽取所有引用的釋字/憲判字(往前追溯),或列出後來引用某件的釋字/憲判字(往後追溯),追溯憲法學說演變

全文搜尋

裁判書關鍵字搜尋 + 釋字爭點/理由書全文搜尋

混合請求策略

預設用 httpx 直打(~0.25s);司法院 F5 WAF 或其他官網的 JavaScript 檢查擋下時,自動改用 Playwright 瀏覽器後繼續


Related MCP server: MCP Taiwan Judgment Search

⚡ 安裝(PyPI,推薦)

pip install mcp-taiwan-legal-db

Debian / Ubuntu / WSL 注意:系統 Python 受 PEP 668 保護,直接 pip install 會被擋。請改用:

  • pipx install mcp-taiwan-legal-db(推薦,自動建隔離 venv,CLI tool 標準裝法)

  • 或 pip install --user --break-system-packages mcp-taiwan-legal-db

Windows / 企業部署:建議用 uv 或 pipx 裝成獨立工具,不碰系統 Python 的 site-packages:

uv tool install mcp-taiwan-legal-db
uv tool update-shell   # 把工具目錄加進 PATH,重開終端機後生效

套件目錄只讀不寫:查詢快取、WAF cookies 與每週更新的法規代碼表都寫在每位使用者自己的目錄(Windows:%LOCALAPPDATA%\mcp-taiwan-legal-db;macOS / Linux:~/.cache/mcp-taiwan-legal-db),所以裝到 C:\Program Files 等全使用者共用位置也能用。要改位置可設環境變數 MCP_TAIWAN_LEGAL_DB_HOME。

裝完後 entry point mcp-taiwan-legal-db 會在 PATH 上。接到 Claude Code(任何專案都能用):

claude mcp add taiwan-legal-db mcp-taiwan-legal-db --scope user

接著 /mcp 重啟連線、Claude 就會在自然語言查詢時自動用 26 個 MCP tool。

Chromium:司法院 WAF fallback,以及文化部訴願、NCC、雲林縣等需要瀏覽器的來源,會在第一次需要時自動下載安裝(約 150MB,僅一次)。無法連外下載的環境請預先安裝:

uvx --from mcp-taiwan-legal-db playwright install chromium    # 僅在查詢需要瀏覽器時啟動,平時 idle

驗證碼辨識:內政部與衛福部訴願的圖形驗證碼需要本機 OCR 依賴,安裝時加上 [captcha]:pip install "mcp-taiwan-legal-db[captcha]"(uvx:uvx --from "mcp-taiwan-legal-db[captcha]" mcp-taiwan-legal-db;Claude Code plugin 已內含)。未安裝時這兩個來源會回報需要安裝,其餘來源不受影響。


開發環境設置

下面是 clone 來修程式 / 跑測試的流程:

# 1. Clone repo
git clone https://github.com/lawchat-oss/mcp-taiwan-legal-db.git
cd mcp-taiwan-legal-db

# 2. 建立並初始化虛擬環境
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e .

# 3. 安裝 Playwright Chromium(供需要瀏覽器的官方來源使用)
.venv/bin/playwright install chromium

# 4. 驗證伺服器可以啟動並註冊 26 個工具
.venv/bin/python -c "
import asyncio
from mcp_server.server import mcp
print('Server:', mcp.name)
tools = asyncio.run(mcp.list_tools())
print('Tools:', [t.name for t in tools])
assert len(tools) == 26, f'Expected 26 tools, got {len(tools)}'
print('✓ Setup OK')
"

預期輸出:

Server: 台灣法律資料庫
Tools: ['search_judgments', 'get_judgment', 'query_regulation', 'get_pcode', 'search_regulations', 'get_interpretation', 'search_interpretations', 'get_citations', 'search_agency_interpretations', 'get_agency_interpretation', 'search_precedents', 'get_precedent', 'search_administrative_decisions', 'get_administrative_decision', 'get_legislative_history', 'search_constitutional_docket', 'get_constitutional_case_file', 'search_legislative_records', 'get_legislative_record', 'search_statistics', 'get_statistics', 'get_sentencing_statistics', 'search_legal_literature', 'get_legal_literature', 'search_other_regulations', 'get_other_regulation']
✓ Setup OK

上面沒報錯就完成了。Repo 根目錄已經帶一份 .mcp.json,任何在此資料夾內開的 Claude Code session 會自動載入這個 server,不需要額外註冊。


有什麼工具可以用

26 個 MCP 工具,全部唯讀,全部只連線官方公開資料庫(見「資料來源與統計」)。

法規與裁判

工具

用途

典型呼叫

search_judgments

搜尋司法院裁判書資料庫

search_judgments(keyword="預售屋 遲延交屋", case_type="民事")

get_judgment

依 JID 或 URL 取得單筆判決全文與歷審清單

get_judgment(jid="TPSM,114,台上,3753,20251112,1")

query_regulation

查詢法規條文(單條、區間、跨號多條)、章節目錄、修法沿革、官方英譯

query_regulation(law_name="民法", article_no="184~186,247-1")

get_pcode

將法規名稱解析為 pcode(法規代號)

get_pcode(law_name="律師法")

search_regulations

以關鍵字搜尋 11,700+ 部法規,或列出某日以後修正公布的法規

search_regulations(keyword="勞動")

憲法法庭

工具

用途

典型呼叫

get_interpretation

大法官解釋/憲判字全文(離線快取)

get_interpretation("釋字748", reasoning_keyword="婚姻")

search_interpretations

搜尋釋字/憲判字(爭點 + 理由書全文)

search_interpretations(keyword="集會自由")

get_citations

引用關係圖譜(往前或往後追溯)

get_citations("釋字748", include_context=True)

search_constitutional_docket

受理中、排定言詞辯論、徵求法庭之友意見的案件

search_constitutional_docket(status="amicus")

get_constitutional_case_file

卷內文書:聲請書、答辯書、鑑定意見、法庭之友意見書、言詞辯論筆錄等

get_constitutional_case_file("113年憲判字第8號")

行政函釋與判解

工具

用途

典型呼叫

search_agency_interpretations

搜尋各機關行政函釋與智慧局審查基準(51 個官方來源,即時查詢;標出停止適用)

search_agency_interpretations(keyword="加班費", agency="勞動部")

get_agency_interpretation

取得函釋全文(主旨、說明、相關法條、編註、效力標示)

get_agency_interpretation("moj:FE393340")

search_precedents

搜尋決議、法律問題座談、停止適用判例、司法解釋(院字/院解字)、大法庭裁定、精選裁判

search_precedents(keyword="借名登記", category="決議")

get_precedent

取得判解全文(含編註,例如「不再援用」)

get_precedent("D:A,20170214,001")

訴願與準司法決定

工具

用途

典型呼叫

search_administrative_decisions

搜尋訴願決定(行政院、各部會、縣市政府)與準司法機關的決定、處分

search_administrative_decisions(keyword="個人資料", source="行政院")

get_administrative_decision

取得決定書/處分書全文(由官網 HTML 或 PDF 擷取)

get_administrative_decision("ey:A-115-000633")

立法資料

工具

用途

典型呼叫

get_legislative_history

某一條文歷次制定、修正時的條文與立法理由,附最近一次修正的立法歷程

get_legislative_history("勞動基準法", "24")

search_legislative_records

搜尋立法院議案(含審查中草案)、立法院公報、法規命令草案預告

search_legislative_records("勞動基準法", kind="bills")

get_legislative_record

取得議案、公報紀錄或草案預告全文

get_legislative_record("bill:202110226160000")

統計與法學文獻

工具

用途

典型呼叫

search_statistics

搜尋司法統計年報/月報、法務統計、《犯罪狀況及其分析》

search_statistics(keyword="收結", source="司法統計")

get_statistics

取得統計表內容或報告全文

get_statistics("moj:INF_COMMON_P/807")

get_sentencing_statistics

司法院量刑資訊系統的刑度統計(判決數、刑度平均與分布)

get_sentencing_statistics(crime="竊盜")

search_legal_literature

搜尋司法院專題研究報告、國圖期刊論文索引、GRB 研究計畫、開放取用法學期刊

search_legal_literature("量刑", source="司法研究年報")

get_legal_literature

取得書目、摘要與全文(有公開全文時)

get_legal_literature("ncl:A15001353")

其他規範

工具

用途

典型呼叫

search_other_regulations

搜尋全國法規資料庫以外的規範:地方自治法規、條約協定、交易所規章

search_other_regulations("違章建築", source="臺北市")

get_other_regulation

取得條文(單條、區間、多條;未分條的文件回全文)

get_other_regulation("taichung:GL001385", article_no="3")

工具細節

搜尋司法院判決系統。支援:

  • 精確案號查詢(快,HTTP GET):設定 case_word + case_number + year_from

  • 全文關鍵字搜尋:設定 keyword

  • 裁判主文篩選:main_text="被告應將 移轉" + keyword="借名登記" → 找被告敗訴的借名登記案

  • 可依 court、case_type(民事/刑事/行政/懲戒)、year_from/year_to 過濾

  • 結果自動依法院層級排序(最高 → 高等 → 地方)

  • 資料涵蓋範圍:民國 89 年(2000)起接近完整,81–88 年(1992–1999)僅零星收錄,80 年(1991)以前查無。這是司法院系統本身的收錄範圍,本工具不做任何年份裁切

重要:要查某個特定案號時,一定要用 case_word+case_number,不要放進 keyword。

# ✅ 正確 — 查 114 台上 3753 最高法院
search_judgments(case_word="台上", case_number="3753", year_from=114, court="最高法院")

# ✅ 正確 — 全文搜尋
search_judgments(keyword="預售屋 遲延交屋")

# ❌ 錯 — 把案號放進 keyword
search_judgments(keyword="114年度台上字第3753號")

取得單筆判決的結構化全文。

  • 輸入:jid(從 search_judgments 結果取得)或 url

  • 輸出:{case_id, court, date, main_text, facts, reasoning, cited_statutes, cited_cases, full_text, source_url, history, history_note}

  • HTTP GET data.aspx 取得全文

  • 全文快取 30 天;歷審清單會隨上訴變動,另外只快取 24 小時

get_judgment(jid="TPSM,114,台上,3753,20251112,1")
# → history: 臺中地院 111 易 203 → 臺中高分院 113 上易 80 → … 各審級裁判(含 jid、url)

history 是司法院依案號串起的歷審清單,引用判決前先看後面還有沒有上級審裁判、是否已被廢棄或發回。pending_supreme_court=true 表示案件目前在最高法院/最高行政法院審理中;清單最後一筆之後沒有更高審級,不等於已經確定(可能仍在上訴期間內,或上級審裁判尚未上網)。

單筆判決可能超過 1 萬 token。建議先用 search_judgments 取得 metadata,只在使用者明確需要時才抓全文。

查詢全國法規資料庫的條文:單條、區間或跨號多條,一次最多 50 條。不指定條號時不回傳條文,只回傳章節目錄(structure,各編章節的標題與起始條號)與條號範圍;整部法規動輒上千條,一次全給只會塞滿 agent 的 context。

# 單一條文
query_regulation(law_name="民法", article_no="184")

# 區間、跨號多條,可混用(也接受「第184條」「247之1」)
query_regulation(law_name="民法", article_no="184~198")
query_regulation(law_name="民法", article_no="184,185,247-1")

# 不指定條號:章節目錄與條號範圍
query_regulation(law_name="律師法")

# 附修法沿革;指定條號時另回傳該條歷次條文(article_history)
query_regulation(law_name="勞動基準法", article_no="24", include_history=True)

# 官方英譯(約 970 部法律與部分命令)
query_regulation(law_name="勞動基準法", article_no="24", language="en")

回傳的 law 另含 last_amended(最新公布日)與 category(主管機關分類);有特殊施行日時含 effective_date/effective_note(如「自公布後六個月施行」「施行日期由行政院定之」),引用新修正條文前先看這兩欄確認是否已施行。這些欄位來自每週更新的 law_meta.json。

language="en" 回傳官方英譯本與 english_version_date;英譯常落後中文修正,版本較舊時 note 會提醒,法律效力以中文為準。英譯檔第一次查詢時下載到使用者資料目錄(約 16 MB),每週更新。

指定條號並開啟 include_history 時,article_history.revisions 會列出該條每次制定、增訂、修正、刪除的日期與當時條文,可直接前後對照。只讀取修法沿革中動到該條的歷史版本(例如民法第 184 條只需 36 個版本中的 5 個),版本清單與歷史版本全文都會快取;讀取失敗的版本會列在 failed_versions 並標 partial。

支援 law_name(自動解析 pcode,縮寫如「勞基法」也可)或直接傳 pcode。超過 50 條時回傳 has_more 與續查起點;指定了卻不存在的單條列在 missing。from_no/to_no 等同 article_no="起~迄"。

以名稱關鍵字搜尋法規,每頁 50 筆,現行法規排在已廢止之前。每筆含 last_amended 與 category,可用來追蹤修法:

search_regulations(keyword="勞動")
search_regulations(keyword="消費", exclude_abolished=True)

# 某日以後新制定/修正公布的法規(新到舊),可再依主管機關篩選
search_regulations(amended_since="2026-09-01")
search_regulations(amended_since="115-07-01", category="勞動部")

取得大法官解釋(釋字第 1–813 號)或憲法法庭裁判(憲判字)全文。預設層從本地 JSON 快取即時回傳。

分層設計(節省 context):

層級

觸發條件

離線?

預設層(字號/日期/爭點/解釋文)

永遠回傳

✓

理由書片段

reasoning_keyword="關鍵字"

✓

理由書全文(不按字數截斷)

include_reasoning=True

✓

意見書片段

opinions_keyword="關鍵字"

✓

意見書全文

include_opinions=True

✓

單份意見書全文

opinion_document="許宗力"

✓

從指定位置讀到文末(相容舊參數)

opinions_offset=15000

✓

# 預設層(離線,~0ms)
get_interpretation("釋字748")

# 理由書中搜尋關鍵字
get_interpretation("釋字748", reasoning_keyword="婚姻自由")

# 在意見書中定位特定大法官
get_interpretation("釋字758", opinions_keyword="湯德宗")

# 只讀某位大法官的完整意見書
get_interpretation("釋字758", opinion_document="許宗力")

# 需要從指定字元位置開始時,回傳該位置以後的全部文字
get_interpretation("釋字777", opinion_document="吳陳鐶", opinions_offset=15000)

# 新制憲判字
get_interpretation("111年憲判字第1號")

建議先用 keyword 片段模式定位,只在需要時才開全文模式。

搜尋大法官解釋與憲判字。關鍵字同時匹配標題、爭點、理由書全文。

# 全文搜尋(搜爭點 + 理由書)
search_interpretations(keyword="集會自由")

# 篩選年度(新制)
search_interpretations(keyword="言論自由", year=112)

# 列舉最後 10 筆釋字
search_interpretations(number_from=804, number_to=813)

從理由書中抽取所有引用的釋字/憲判字字號。追溯方向:查詢指定裁判引用了哪些先前裁判。

get_citations("釋字748")
# → citations: [釋字第242號, 釋字第362號, 釋字第365號, ...]

# 附上引用前後 80 字片段
get_citations("釋字748", include_context=True)

# 往後追溯:後來哪些釋字/憲判字的主文或理由書引用了這件
get_citations("釋字748", direction="cited_by")
# → cited_by: [釋字第763號, 釋字第791號, ...]

並列寫法「釋字第 477 號、第 747 號及第 762 號」會逐一收錄。cited_by 比對本地收錄的全部案件(不含意見書與資料包建置後才公布的新案);要找引用某件的法院判決,改用 search_judgments(keyword="釋字第748號")。

get_interpretation 只有已公布的裁判;這兩個工具查憲法法庭官網公開的案件進度與卷內文書(即時查詢):

status

內容

pending(預設)

已受理、審理中的案件(受理日期、聲請人(人民以甲乙丙代稱)、案號、主案/併案、案由)

hearing

已排定或已舉行言詞辯論、說明會的案件

amicus

目前公開徵求法庭之友意見的案件

search_constitutional_docket(keyword="勞動")                     # 受理中、案由含「勞動」的案件
search_constitutional_docket(status="amicus")                    # 正在徵求法庭之友意見的案件

get_constitutional_case_file("113年憲判字第8號")                  # 列出卷內全部公開文件與言詞辯論公告
get_constitutional_case_file("113年憲判字第8號", keyword="人性尊嚴")  # 只列出內容含關鍵字的文件並附片段
get_constitutional_case_file(document_id="492306")               # 讀單一文件全文(PDF 擷取)

case_id 可以是憲判字、釋字、受理中案號(如「114年度憲立字第3號」)或 search_constitutional_docket 回傳的 id。關鍵字比對的是官方擷取的無標點文字,限憲判字與受理中案件;掃描檔的 OCR 可能有錯字,法庭之友意見書官方只公開前 20 頁。案件清單與卷宗頁在本機快取一天。

各機關函釋分散在各自的系統,沒有共用 API。這個工具在查詢當下同時向下列官方系統查詢(共 51 個來源;外交部、退輔會、核安會、國發會,以及 NCC、客委會、僑委會、運動部、關務署新頒釋函、陸委會主站廣告函釋,只在 agency 指名時查),合併後依發文日期排序;同一件函釋在多個來源出現時只保留一筆(以機關自己的系統為準):

來源

內容

法務部主管法規查詢系統

行政函釋、法規諮詢意見

勞動部勞動法令查詢系統

行政函釋、解釋令

衛生福利法規檢索系統

行政函釋

環境部主管法規查詢系統

行政函釋

工程會政府採購法規解釋函令

採購法令解釋令、函

財政部各稅法令函釋檢索系統

稅務法令彙編、新頒令釋

財政部主管法規查詢系統

財政部與關務署、國有財產署、國庫署的核釋令與行政規則

經濟部主管法規查詢系統

經濟部本部及水利署、標準檢驗局、國際貿易署等的解釋令與行政規則

經濟部商業發展署 商工行政法規

公司法、商業登記法、商業會計法、有限合夥法函釋

經濟部智慧財產局

著作權解釋令函;專利審查基準(網頁版全文)、商標審查基準(PDF)

經濟部標準檢驗局

解釋函令(商品檢驗、度量衡等)

行政院人事行政總處

人事法令解釋(公務員任用、給與、休假等)

行政院消費者保護處

消費者保護法函釋與法規諮詢意見(只比對標題與摘要)

監察院陽光法令主題網

政治獻金法、公職人員利益衝突迴避法、財產申報法的主管機關函釋(只比對標題)

內政部戶政司、國土管理署、地政司、消防署

戶籍與國籍、建築管理與都市計畫、地政(含已停止適用)、消防法令解釋

交通部法規系統

行政解釋(令、函、公告)

中央銀行法規系統

行政令函

考試院主管法規共用系統

銓敘部、保訓會、考選部、考試院行政函釋

各部會主管法規共用系統

金管會、教育部、農業部、內政部、文化部、國科會、原民會、海委會、公平會、陸委會、中選會(含行政函釋)、主計總處的行政規則(解釋令、函收在這一類,結果會混有一般行政規則);外交部、退輔會、核安會、國發會只在指名時查

NCC

NCC 法規查詢系統的行政函釋,含個別函復;指名 agency="NCC"

客委會、僑委會、運動部

行政規則;指名才查,未證實現行/停止兩態完整,不輸出「適用中」

關務署新頒釋函

CSRF 表單查詢;只比對標題,日期條件未套用

陸委會主站廣告函釋

只涵蓋「廣告規範」類別中的函與參考意見,標題比對;不代表全部主站函文

臺北市法規查詢系統

臺北市政府解釋令函,以及該系統收錄的中央機關函釋

新北市法規查詢系統

新北市政府與中央機關函釋(依筆數取前 5 類列出,其餘只列筆數)

司法院法學資料檢索系統

跨機關行政函釋(司法院、法務部及其他機關)

行政院公報

各機關依行政程序法第 159 條第 2 項第 2 款發布的解釋性規定(數位部法規系統目前仍無法完成自動驗證,公報只能補到依法公告的部分)

# 全部來源
search_agency_interpretations(keyword="個人資料", year_from=113, year_to=114)

# 指定機關(可用逗號分隔多個;簡稱如「金管會」「衛福部」也可以)
search_agency_interpretations(keyword="加班費", agency="勞動部")
search_agency_interpretations(keyword="私募", agency="金管會")
search_agency_interpretations(keyword="時效取得", agency="地政司")
search_agency_interpretations(keyword="考績", agency="銓敘部")
search_agency_interpretations(keyword="專利要件", agency="專利")   # 智慧局審查基準只比對章名
search_agency_interpretations(keyword="加班費", agency="人事總處")
search_agency_interpretations(keyword="關係人", agency="陽光法令")

# 用發文字號找
search_agency_interpretations(doc_number="法律字第11403512580號")

# 讀全文(id 取自搜尋結果)
get_agency_interpretation("moj:FE393340")

效力標示:結果與全文的 status 是官網對該筆資料的標示,引用前必看。

status

意思

停止適用

官網標示已停止適用或廢止;status_note 附停止日期、依據的函或原標示(例如「本筆資料,依據…號函,自…停止適用」)

部分停止適用

交通部的標示

適用中

只在官網有「現行/停止適用」兩態欄位的來源出現(勞動部、衛福部、考試院系統、環境部、地政司、各部會主管法規共用系統的行政規則);財政部法令彙編收錄的函釋也標「適用中」(經重新研審保留適用,彙編後才廢止的官網不另標示)

沒有 status

官網沒有標示或沒標示,不代表仍然有效。戶政司、消防署、智慧局、行政院公報等官網完全沒有效力欄位;法務部、工程會、司法院法學檢索、臺北市、央行、交通部只標停止的,沒標的不確定

官網偶有漏標或重複登錄(例如人事總處同一件函有一筆標停止、一筆沒標),引用前請讀全文、留意 notes(編註)與後續函釋。

回傳的 categories 列出每個來源/類別的總筆數與是否有下一頁;某個來源暫時連不上時,該類別帶 error,其他來源照常回傳。全文省略正本、副本受文者清單。國土管理署與智慧局著作權函釋官方只提供全量清單,第一次查詢會下載到使用者資料目錄(分別約 16 MB、13 MB),之後每週/每天更新一次。每個來源各自分頁(多數每頁 20 筆,部分 10 或 25 筆)。消防署只能查摘要,函文是掃描 PDF 附件。

查司法院法學資料檢索系統裡、裁判書系統(search_judgments)查不到的判解:

類別

內容

決議

最高法院民刑事庭會議決議、最高行政法院聯席會議決議(108 年大法庭制度施行前)

法律問題座談

各級法院法律座談會、公證法律問題研討、懲戒法律問題座談

停止適用判例

依法院組織法第 57 條之 1 停止適用、已無裁判全文的判例(僅存判例要旨)

司法解釋

大理院解釋、最高法院解釋、司法院院字/院解字解釋

大法庭

最高法院、最高行政法院大法庭裁定

精選裁判

司法院編輯、附「裁判要旨」的各級法院裁判;reference_value=true 表示該院選為「具參考價值」或「足資討論」

具參考價值裁判

只查上述 reference_value=true 的裁判(須指定才查)

search_precedents(keyword="借名登記")                      # 決議、座談、判例、司法解釋、大法庭、精選裁判
search_precedents(keyword="情事變更", category="決議,司法解釋")
search_precedents(keyword="借名登記", category="具參考價值裁判")
get_precedent("D:A,20170214,001")                          # 最高法院 106 年度第 3 次民事庭會議

引用決議、判例前請看 fields 裡的編註(例如「不再援用」)。站方每類最多提供前 500 筆,筆數多時請加關鍵字或年度縮小範圍。

不指定 source 時查下列預設來源:

來源

內容

行政院訴願審議委員會

訴願決定書(PDF 全文;108 年以前收辦的案件是 HTML,id 為院臺訴字號碼,如 ey:1070210137)

公平交易委員會

處分書及不處分決議書(約 5,800 件,PDF 全文;關鍵字中的空白會被當成詞組的一部分)

勞動部不當勞動行為裁決委員會

不當勞動行為裁決(搜尋結果沒有日期,讀全文才有)

公務人員保障暨培訓委員會

復審、再申訴決定(不含年金改革案件)

金管會、銀行局、證期局、保險局

裁罰案件(四個網站合併;總數為估計)

以下來源要在 source 指定才查:

source

內容

「工程會」「採購申訴」

採購申訴審議判斷(官方沒有關鍵字檢索,用案號如「訴1130123」或年度查;內文只公開判斷理由)

「監察院」(或「調查報告」「糾正」「彈劾」「糾舉」)

調查報告、糾正案、彈劾案、糾舉案(官網回應慢,單次可能數十秒)

「律師懲戒」

律師懲戒、懲戒覆審決議(需姓名或案號這類精確關鍵字)

機關或縣市名,如「臺北市」「新北市」「國防部」「交通部」「法務部」「金管會」「退輔會」;「訴願」= 全部訴願來源

各部會(法務部、外交部、國防部、交通部、金管會、中央銀行、退輔會、國科會、數位部、工程會、原民會、經濟部、農業部、教育部、文化部、環境部、勞動部、內政部、衛福部、中選會、人事總處)與縣市政府(臺北市、新北市、臺中市、高雄市、彰化縣、花蓮縣、金門縣、苗栗縣、臺東縣、嘉義市、嘉義縣、宜蘭縣、新竹縣、基隆市)訴願決定。部分網站只能比對標題、只給頁數,差異見各來源的 note

search_administrative_decisions(keyword="個人資料", source="行政院")
search_administrative_decisions(doc_number="公處字第115060號")             # 依字號精確查詢
search_administrative_decisions(keyword="資遣", source="不當勞動行為")
search_administrative_decisions(keyword="洗錢", source="裁罰")              # 金管會裁罰案件
search_administrative_decisions(keyword="長照", source="監察院")
search_administrative_decisions(keyword="違規停車", source="臺北市,新北市")
get_administrative_decision("ey:A-115-000633")                             # 由 PDF 擷取全文

官網公開的決定書照原樣提供:多數機關已遮蔽當事人姓名(○○),部分舊案(行政院 108 年以前收辦、法務部約 112 年以前)與原民會的決定書官網未遮蔽,本工具也不另外遮蔽。勞動部採公開語音驗證功能,內政部、衛福部採本機圖形 OCR(需 [captcha]);文化部使用 Playwright。內政部/環境部未填年份時依官網查本年度;衛福部亦預設本年度。教育部/農業部限前五頁;基隆、中選會只查標題,人事總處只比對使用者指定的一頁。財政部、桃園目前連線失敗,臺南驗證仍未能穩定完成,未新增。律師懲戒決議的被付懲戒律師姓名是官方公開資訊。source="醫事懲戒" 查目前上架的醫事懲戒公告(預設西醫師,可用「牙醫師」等關鍵字前綴改類別),只比對姓名、縣市、證書字號;掃描決議只回傳 PDF。PDF 無法擷取文字時(多為 2008 年以前的公平會舊檔或掃描檔)回傳 pdf_url 讓使用者自行開啟。

從立法院法律系統取得某一條文每次制定、修正時的條文與立法理由(民國 59 年以後的修正才有理由)。適合回答「這條為什麼這樣規定」「當初修法的目的」;query_regulation(include_history=True) 回傳的是條文變遷,這裡多了立法理由。

get_legislative_history("勞動基準法", "24")   # 73 年制定、105、107 年修正,各版條文與理由
get_legislative_history("民法", "1030-1")     # 民法在立法院系統分編收錄,會自動對應到「民法第四編親屬」
get_legislative_history("刑法", "339-4")      # 簡稱會轉成正式名稱「中華民國刑法」

另附 latest_amendment_process:整部法律最近一次修正的一讀、委員會審查、二讀、三讀日期與公報頁次(不一定修到本條)。其中 gazette_pdf_id 傳給 get_legislative_record 可讀該次會議的公報紀錄,找立法者原意。

kind

內容

bills(預設)

立法院議案(法律案草案、修正草案)。status="pending" 審查中(預設只看本屆,屆期不連續)、all 全部、passed 已三讀;每筆含提案人、提案日期、會期、進度與關係文書 PDF(含條文對照表)

gazette

立法院公報(院會、委員會、公聽會紀錄,含委員與官員發言),全文檢索並附命中片段

drafts

行政院公報刊登的法規命令訂定、修正草案預告(含陳述意見截止日期)

search_legislative_records("勞動基準法", kind="bills")                 # 本屆審查中的勞基法修正草案
search_legislative_records("勞動基準法第五十五條", kind="gazette")     # 找立法者原意:法律名稱+條次
search_legislative_records("個人資料", kind="drafts")                  # 各部會辦法、細則的草案預告
get_legislative_record("bill:202110226160000")                         # 議案全文與審議進度
search_legislative_records("條例", kind="join", status="pending")     # JOIN 法律草案預告;closed 查已結束
# JOIN 的諮詢狀態不代表法律效力。全文含預告內文及選中的一份草案/對照表 PDF;其餘附件列連結。

每頁 20 筆(drafts 10 筆),全文不按字數截斷。議案的審議進度會變,全文不長期快取。

來源(source)

內容

司法統計

司法院司法統計年報:各級法院各類案件收結、終結情形、上訴、發回更審等統計表(year 指定民國年,預設最新一年)

月報

司法院司法統計月報:指定年度最新一個月的統計表

法務統計

法務部常用統計表:偵查、起訴、定罪、執行、矯正等(每月滾動更新,只快取一天)

犯罪狀況

法務部司法官學院《犯罪狀況及其分析》年度報告(篇章 PDF+數據 XLSX)

search_statistics(keyword="收結", source="司法統計")
search_statistics(keyword="詐欺", source="犯罪狀況")
get_statistics("moj:INF_COMMON_P/807")      # 地方檢察署執行裁判確定有罪人數

關鍵字只比對表名或報告標題。統計表以「|」分欄的文字回傳。

司法院「事實型量刑資訊系統」的刑度統計:符合條件的判決數,以及各刑種的平均、最高、最低刑度與分布。涵蓋殺人、強盜搶奪、傷害、不能安全駕駛、肇事逃逸、詐欺、竊盜、毒品、槍砲、妨害性自主 10 類案件。這是過去判決的統計,不是量刑基準。

get_sentencing_statistics()                     # 列出罪名與法院
get_sentencing_statistics(crime="竊盜")          # 統計,並回傳可選的法條(law_options)與量刑因子(factor_options)
get_sentencing_statistics(crime="竊盜", law="第320條第1項", court="臺北地院", factors="累犯=是")

只用公開頁面呈現的彙總統計;官網只開放給院內使用者的個案清單與判決明細不呼叫。

只用官方與開放取用來源,不含付費資料庫:

來源(source)

內容

司法研究年報

司法院專題研究報告(含司法研究年報),全文按章分檔

期刊

國家圖書館臺灣期刊論文索引:各法學期刊論文的書目與摘要;作者授權者有全文

GRB

政府研究資訊系統:國科會與各部會補助的研究計畫摘要(報告全文需在官網下載)

開放期刊

中研院法學期刊、政大法學評論、臺大法學論叢(全文取自官網;臺大限可定位卷期且標為全文/定稿的 PDF,摘要不當全文)

search_legal_literature("量刑", source="司法研究年報")
search_legal_literature("勞動派遣", source="期刊", year_from=105)
get_legal_literature("ncl:A15001353")           # 書目、摘要;有授權時附全文

引用時請附作者、篇名、刊名卷期與年份。國家圖書館授權的全文只供個人查閱,本工具不寫入快取,請勿轉存或散布。全文不按字數截斷。

全國法規資料庫法律命令清單以外、query_regulation 查不到的規範:

類別

來源

地方自治法規

臺北市、新北市、桃園市、臺中市、臺南市、高雄市、基隆市、新竹縣市、苗栗縣、彰化縣、南投縣、嘉義縣市、屏東縣、宜蘭縣、花蓮縣、臺東縣、澎湖縣、金門縣、連江縣、雲林縣(只收現行法規;雲林遇到驗證時使用瀏覽器)

條約及協定

全國法規資料庫條約(只比對名稱)、外交部條約協定資料庫(部分舊約是掃描檔,只有 PDF 連結)、財政部所得稅協定

交易所規章

臺灣證券交易所、證券櫃檯買賣中心、臺灣期貨交易所(櫃買、期交所規章取自證基會法規系統,僅供查閱、不得轉載)

search_other_regulations("違章建築", source="臺北市")
search_other_regulations("日本 所得稅", source="條約")       # 條約可用「國家 主題」
search_other_regulations("營業細則", source="證交所")
get_other_regulation("taichung:GL001385", article_no="3")   # 臺中市殯葬管理自治條例第 3 條

不填 source 會同時查全部 28 個來源,建議指定。多數來源把整串關鍵字當成一個詞,請一次給一個詞。分條的規範依 article_no 回傳 articles,寫法同 query_regulation(單條、區間、多條,一次最多 50 條),不給條號時只回傳條號範圍;要點、條約等未分條的文件回傳 full_text。


範例問法

「查民法第 184 條」
「搜尋跟預售屋遲延交屋有關的最高法院判決」
「釋字 748 的理由書重點是什麼」
「哪些大法官解釋討論過集會自由」
「釋字 748 引用了哪些先前的釋字」
「查 111 年憲判字第 1 號」
「勞動部對加班費有哪些函釋」
「財政部對股利的函釋,哪些已經停止適用」
「公務員未休假加班費,人事總處怎麼解釋」
「工程會對不發還押標金有什麼解釋」
「最高法院有沒有關於借名登記的決議」
「查院解字第 3829 號」
「行政院有哪些個資相關的訴願決定」
「勞基法第 24 條當初為什麼這樣修」
「這件最高法院判決的前審是哪幾件?有沒有發回?」
「勞基法第 24 條的英文版」
「列出 115 年 7 月以後修正公布的勞動部主管法規」
「勞基法現在有哪些審查中的修正草案」
「死刑案的法庭之友意見書有哪些提到人性尊嚴」
「憲法法庭現在受理了哪些勞動相關的案件」
「臺北地院竊盜累犯通常判多久」
「司法研究年報有沒有關於量刑的研究」
「臺北市有關違章建築的自治法規」
「金管會最近對洗錢防制缺失的裁罰」

註冊到你的 Claude client

依你使用的 Claude client 選對應的段落。

Claude Code (CLI)

Claude Code 會自動載入專案根目錄的 .mcp.json。這個 repo 已經內建一份:

{
  "mcpServers": {
    "taiwan-legal-db": {
      "command": ".venv/bin/python",
      "args": ["-m", "mcp_server.server"]
    }
  }
}

零設定:cd 進 repo 之後跑 claude 就好。MCP server 列表會看到 taiwan-legal-db,而且此資料夾不會有其他多餘的 server。

跟隊友分享:.mcp.json 已經 commit 進 repo。任何人 clone 下來跟著 Quick Start 跑完,就會自動完成 MCP 註冊。

加到其他專案(你想在另一個資料夾用這個 MCP):用 claude mcp add 以 project scope 加入:

cd /path/to/your/other/project
claude mcp add taiwan-legal-db --scope project -- \
  /absolute/path/to/mcp-taiwan-legal-db/.venv/bin/python \
  -m mcp_server.server

這會在你另一個專案的根目錄寫出一份 .mcp.json。想在每個專案都能用,把 --scope project 改成 --scope user。

Claude Desktop (macOS / Windows)

Claude Desktop 使用一個全域設定檔:

  • macOS:~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows:%APPDATA%\Claude\claude_desktop_config.json

  • Windows (Microsoft Store / WinGet / MSIX 安裝):C:\Users\<YourName>\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

最快開啟方式:在 Claude Desktop 點選單列(不是視窗)→ Settings → Developer → Edit Config。檔案若不存在 Claude Desktop 會自動建立。

在 mcpServers 下加入以下內容(跟已有內容合併):

{
  "mcpServers": {
    "taiwan-legal-db": {
      "command": "/absolute/path/to/mcp-taiwan-legal-db/.venv/bin/python",
      "args": ["-m", "mcp_server.server"],
      "cwd": "/absolute/path/to/mcp-taiwan-legal-db"
    }
  }
}

把 /absolute/path/to/mcp-taiwan-legal-db 換成你的實際 clone 路徑。cwd 欄位必填,Python 才找得到 mcp_server 套件。

存檔後,完全關閉並重新開啟 Claude Desktop(不是只關視窗 — macOS 用 ⌘Q、Windows 右鍵工具列圖示 → Quit)。設定檔只會在重啟時重新載入。

Claude Cowork (Pro 以上方案)

Claude Cowork 跑在 Claude Desktop 裡面,共用同一個 claude_desktop_config.json — 沒有另外的 Cowork 設定檔。任何你在 Claude Desktop 註冊的 MCP server 會自動透過 Claude Desktop SDK 橋接進 Cowork 的沙盒 VM。

設定步驟:

  1. 照上面 Claude Desktop 段落把 taiwan-legal-db 加進 claude_desktop_config.json

  2. 完全關閉並重新開啟 Claude Desktop — 同時也會重啟 Cowork

  3. 開一個 Cowork session,taiwan-legal-db 的工具就可以用了

注意:Cowork 目前在 Claude Pro / Max / Team / Enterprise 方案都可以用,且只能存取你明確授權的資料夾。MCP server 本身跑在你的 host 上(不是 Cowork VM 裡面),透過 Desktop SDK bridge 溝通,所以不管你授權哪個資料夾給 Cowork,它都存取得到內建的資料檔。

其他 MCP 相容 client

任何符合 Model Context Protocol 規範 的 MCP client 都可以使用這個 server。啟動指令永遠是:

.venv/bin/python -m mcp_server.server

⋯⋯加上 cwd 設定為 repo 根目錄(Python 才找得到 mcp_server 套件)。設定位置請參考你使用的 client 的文件,找 mcpServers JSON 區塊寫在哪裡。


在這個 server 上面建 A2A agent

想用 A2A agent 驅動這些工具?請見 examples/agno-bindu/ — 一個社群貢獻的 A2A agent 範例。


疑難排解

ModuleNotFoundError: No module named 'mcp_server' → 你沒有在 venv 裡面跑 pip install -e .。回到 Quick Start 步驟 2。

FileNotFoundError: data/pcode_all.json → 內建的 mcp_server/data/pcode_all.json 不見或被刪了。用 git checkout mcp_server/data/pcode_all.json 還原,或觸發重新下載:

.venv/bin/python -m mcp_server.updater

MCP client 回報「伺服器啟動失敗」 → 直接跑 Quick Start 步驟 3 的驗證指令。若失敗,代表 import chain 壞了 — 看 traceback。若通過,問題在 MCP client 的啟動設定(路徑或 cwd 錯了)。

「官網瀏覽器連線或啟動失敗」 → 需要瀏覽器的來源第一次使用時會自動下載 Chromium;無法連外下載的環境請手動安裝:uvx --from mcp-taiwan-legal-db playwright install chromium(開發環境:.venv/bin/playwright install chromium)。

「官網瀏覽器查詢逾時,可能仍停在驗證頁」「官網驗證尚未完成」 → 該官網的檢查這次沒有通過,稍後再試。這不代表查無資料。

「此公開來源需要本機 OCR」 → 內政部、衛福部訴願需要 [captcha] 額外依賴:pip install "mcp-taiwan-legal-db[captcha]"。Claude Code plugin 已內含。

ssl.SSLCertVerificationError: ... Missing Subject Key Identifier → 這是 OpenSSL 3.6+ 對 TWCA Global Root CA 的廣泛 rejection,不是 certifi 舊的問題。本 repo 透過 truststore 套件讓 Python 改用作業系統原生的 trust store(macOS Security framework、Windows CryptoAPI、Linux 系統 CA),所有路徑都保留完整 SSL 驗證(verify=True),不使用 verify=False。這在 macOS、Windows 以及 OpenSSL <3.6 的 Linux 都能正常工作。OpenSSL 3.6+ 的 Linux 環境(Fedora 40+、未來的 Ubuntu LTS)目前可能仍有問題,歡迎 issue 回報。


WAF 處理機制

司法院 judgment.judicial.gov.tw 部署了 F5 BIG-IP ASM WAF,純 HTTP 請求可能被擋(回固定 245 bytes 的 "Request Rejected")。

本專案採混合策略:

  • 預設用 httpx 直接請求(~0.25s)

  • 偵測到被擋(response 含 Request Rejected 或 JS challenge marker bobcmn / TSPD)自動 fallback 到 Playwright 跑一次 JS challenge

  • 取得 TSPD cookies 後持久化到使用者資料目錄的 .judicial_cookies.json(0600 權限)

  • 後續查詢繼續用 httpx 帶 cookies 執行

cons.judicial.gov.tw(釋字)跟 law.moj.gov.tw(法規)沒這個問題,不經過 WAF 流程。


資料來源與統計

查詢時連網的都是台灣政府機關與公共機構的公開資料庫,伺服器本身不建資料庫,只在使用者查詢的當下向官方網站取資料:

來源

網域

用途

司法院裁判書系統

judgment.judicial.gov.tw

裁判書搜尋、全文與歷審清單(FJUD/Default_AD.aspx、data.aspx、controls/GetJudHistory.ashx)

全國法規資料庫

law.moj.gov.tw

法規條文與修法沿革(LawClass/*)、官方英譯與法規施行日等資料(api/*)、條約協定

司法院憲法法庭

cons.judicial.gov.tw

資料包建置後才公布的憲判字(其餘釋字/憲判字為離線資料)、受理案件與卷內文書

司法院法學資料檢索系統

legal.judicial.gov.tw

決議、法律問題座談、停止適用判例、司法解釋、大法庭、精選裁判、跨機關行政函釋

司法院 司法統計

www.judicial.gov.tw

司法統計年報、月報

司法院事實型量刑資訊系統

intellisen.judicial.gov.tw

量刑統計(公開彙總)

司法院電子出版品

jirs.judicial.gov.tw

專題研究報告、司法研究年報

法務部主管法規查詢系統

mojlaw.moj.gov.tw

行政函釋、法規諮詢意見

勞動部勞動法令查詢系統

laws.mol.gov.tw

行政函釋、解釋令

衛生福利法規檢索系統

mohwlaw.mohw.gov.tw

行政函釋

工程會政府採購法規解釋函令

planpe.pcc.gov.tw

採購法令解釋令、函

財政部各稅法令函釋檢索系統

ttc.mof.gov.tw

稅務法令彙編、新頒令釋

經濟部商業發展署

gcis.nat.gov.tw

商工行政法規函釋

財政部主管法規查詢系統

law-out.mof.gov.tw

財政部、關務署、國有財產署、國庫署核釋令與行政規則

經濟部主管法規查詢系統

law.moea.gov.tw

經濟部本部與所屬機關解釋令、行政規則

經濟部標準檢驗局

www.bsmi.gov.tw

解釋函令

行政院人事行政總處

law.dgpa.gov.tw

人事法令解釋

行政院消費者保護處

www.ey.gov.tw

消保法函釋

監察院陽光法令主題網

sunshine.cy.gov.tw

政治獻金法、利益衝突迴避法、財產申報法函釋

經濟部智慧財產局

www.tipo.gov.tw

著作權解釋令函(開放資料)、專利與商標審查基準

內政部戶政司

www.ris.gov.tw

戶政法令解釋

內政部國土管理署

www.nlma.gov.tw

解釋函彙編

內政部地政司

www.land.moi.gov.tw

地政法令解釋

內政部消防署

law.nfa.gov.tw

消防法令解釋

環境部主管法規查詢系統

oaout.moenv.gov.tw

行政函釋

考試院主管法規共用系統

law.exam.gov.tw

銓敘部、保訓會、考選部、考試院函釋

各部會主管法規共用系統

law.fsc.gov.tw、edu.law.moe.gov.tw、law.moa.gov.tw、glrs.moi.gov.tw、law.moc.gov.tw、law.nstc.gov.tw、law.cip.gov.tw、law.oac.gov.tw、law.ftc.gov.tw、law.mac.gov.tw、law.cec.gov.tw、law.dgbas.gov.tw、law.mofa.gov.tw、law.vac.gov.tw、erss.nusc.gov.tw、theme.ndc.gov.tw、law.hakka.gov.tw、law.ocac.gov.tw、law.sports.gov.tw

金管會、教育部、農業部、內政部、文化部、國科會、原民會、海委會、公平會、陸委會、中選會、主計總處、外交部、退輔會、核安會、國發會、客委會、僑委會、運動部的行政規則(解釋令、函)

NCC 法規查詢系統

ncclaw.ncc.gov.tw

行政函釋、個別函復

財政部關務署

web.customs.gov.tw

新頒釋函

大陸委員會

www.mac.gov.tw

大陸廣告規範專區的函與參考意見

交通部法規系統

motclaw.motc.gov.tw

行政解釋

中央銀行法規系統

www.law.cbc.gov.tw

行政令函、訴願決定

臺北市法規查詢系統

laws.gov.taipei

函釋、訴願決定、地方法規

新北市法規查詢系統

web.law.ntpc.gov.tw

函釋、訴願決定、地方法規

行政院公報資訊網

gazette.nat.gov.tw

各機關解釋性規定、法規命令草案預告

行政院訴願審議委員會

appeal.ey.gov.tw

訴願決定書

公平交易委員會

www.ftc.gov.tw

處分書及不處分決議書

行政院公共工程委員會

web.pcc.gov.tw、www.pcc.gov.tw

採購申訴審議判斷、訴願決定

勞動部不當勞動行為裁決委員會

uflb.mol.gov.tw

裁決決定

公務人員保障暨培訓委員會

web13.csptc.gov.tw

復審、再申訴決定

金管會、銀行局、證期局、保險局

www.fsc.gov.tw、www.banking.gov.tw、www.sfb.gov.tw、www.ib.gov.tw

裁罰案件、金管會訴願決定

監察院

www.cy.gov.tw

調查報告、糾正案、彈劾案、糾舉案

法務部律師查詢系統

lawyerbc.moj.gov.tw

律師懲戒決議

衛福部醫事管理系統

ma.mohw.gov.tw

醫事懲戒公告

各部會訴願決定

www.moj.gov.tw、www.mofa.gov.tw、law.mnd.gov.tw、nseweb.motc.gov.tw、www.vac.gov.tw、www.nstc.gov.tw、moda.gov.tw、law.cip.gov.tw、eportal2.moea.gov.tw、appeal.moa.gov.tw、appeal.moe.gov.tw、aamis-web.moenv.gov.tw、appealweb.mol.gov.tw、appeal.moc.gov.tw、themedata.culture.tw、aarc.moi.gov.tw、service.mohw.gov.tw、web.cec.gov.tw、www.dgpa.gov.tw

法務部、外交部、國防部、交通部、退輔會、國科會、數位部、原民會、經濟部、農業部、教育部、環境部、勞動部、文化部、內政部、衛福部、中選會、人事總處訴願決定

縣市政府訴願決定

appeal.taichung.gov.tw、web.law.ntpc.gov.tw、law.kcg.gov.tw、www.chcg.gov.tw、glrs.hl.gov.tw、law.kinmen.gov.tw、www.miaoli.gov.tw、www.taitung.gov.tw、general.chiayi.gov.tw、www.cyhg.gov.tw、www.e-land.gov.tw、gdd.hsinchu.gov.tw、www.klcg.gov.tw

臺中市、新北市、高雄市、彰化縣、花蓮縣、金門縣、苗栗縣、臺東縣、嘉義市、嘉義縣、宜蘭縣、新竹縣、基隆市訴願決定(臺北市見上)

立法院法律系統

lis.ly.gov.tw

立法沿革、立法理由、立法歷程與公報頁

立法院議事暨公報資訊網

ppg.ly.gov.tw

議案、立法院公報

公共政策網路參與平臺

join.gov.tw

法律草案預告

法務部 法務統計資訊網

www.rjsd.moj.gov.tw

常用統計表

法務部司法官學院

www.cprc.moj.gov.tw

《犯罪狀況及其分析》

國家圖書館 臺灣期刊論文索引

tpl.ncl.edu.tw

期刊論文書目、摘要、授權全文

政府研究資訊系統 GRB

www.grb.gov.tw、grbdef.stpi.niar.org.tw

研究計畫書目與摘要

中研院法律學研究所

www.iias.sinica.edu.tw

中研院法學期刊全文

政治大學法學院

review.law.nccu.edu.tw

政大法學評論全文

臺灣大學法律學院

www.law.ntu.edu.tw

臺大法學論叢全文

縣市法規查詢系統

law.tycg.gov.tw、law.taichung.gov.tw、outlaw.kcg.gov.tw、law01.tainan.gov.tw、exlaw.klcg.gov.tw、hclaw.hsinchu.gov.tw、law.hccg.gov.tw、law.miaoli.gov.tw、lawsearch.chcg.gov.tw、glrs.nantou.gov.tw、law.cyhg.gov.tw、law.chiayi.gov.tw、ptlaw.pthg.gov.tw、glrslaw.e-land.gov.tw、glrs.hl.gov.tw、law.taitung.gov.tw、law.penghu.gov.tw、law.kinmen.gov.tw、law.matsu.gov.tw、law.yunlin.gov.tw

自治條例、自治規則等地方法規(臺北市、新北市見上)

外交部條約協定資料庫

no06.mofa.gov.tw

條約協定

財政部

www.mof.gov.tw

所得稅協定

臺灣證券交易所 法規分享知識庫

twse-regulation.twse.com.tw

證交所規章

證券暨期貨法令判解查詢系統

www.selaw.com.tw

櫃買中心、期交所規章

各來源的網址、查詢方式、限制與目前未收錄的來源見 SOURCES.md。

get_judgment 接受使用者傳入的 URL,mcp_server/config.py:ALLOWED_DOMAINS 以硬編碼 allow-list 限制只能是裁判書與法規兩個網域;其他工具只連上表固定網址,不接受任意 URL。下列網站的 robots.txt 不允許爬蟲(或排除特定路徑),本工具對它們只做使用者觸發的單次查詢,不批次抓取:司法院法學資料檢索系統(legal.judicial.gov.tw)、衛福部法規檢索系統(mohwlaw.mohw.gov.tw)、行政院訴願網站(appeal.ey.gov.tw)、立法院議事暨公報資訊網(ppg.ly.gov.tw)、內政部地政司(www.land.moi.gov.tw)、臺北市法規查詢系統的訴願決定全文路徑(laws.gov.taipei)、全國法規資料庫的條約查詢(law.moj.gov.tw)、財政部的 /download/ 檔案(www.mof.gov.tw)、行政院人事行政總處網站(www.dgpa.gov.tw)。證券暨期貨法令判解查詢系統(www.selaw.com.tw)載明非經授權不得轉載,櫃買中心、期交所規章只供查閱,結果都附提醒。函釋、決議、訴願決定、處分書等皆屬公文,依著作權法第 9 條不受著作權保護;期刊論文、研究報告與交易所規章則不在此列,請依各來源的使用規定引用。國家圖書館授權的全文只供個人查閱,本工具一律不寫入快取。

個資與存取限制:本工具只在使用者查詢時即時轉取官網公開的內容,不另外遮蔽、也不建資料庫;部分訴願決定(行政院 108 年以前收辦、法務部約 112 年以前、原民會)官網未遮蔽當事人姓名,結果照原樣呈現。本工具只查公開、免登入資料;可在新的瀏覽器工作階段中處理 JavaScript/Cloudflare 檢查及公開查詢驗證碼。每次只完成使用者指定的查詢與全文讀取,驗證失敗會回報錯誤,不當成查無資料;不登入、不使用員工或院內權限、不批次抓取。司法院量刑資訊系統只用公開頁面的彙總統計,官網只開放給院內使用者的個案判決清單一律不呼叫。完整說明見免責聲明。

裁判書年份涵蓋範圍:本工具即時代理司法院系統,沒有自己的資料庫,有效年份 = 司法院收錄範圍。實測(以「竊盜」為關鍵字計數)民國 89 年(2000)起每年數萬筆,81–88 年(1992–1999)合計約 2,000 筆,80 年(1991)以前為零。司法院公告其開放資料檔「收錄範圍與裁判書查詢系統相同」,因此沒有更早的公開來源。查詢 2000 年以前的裁判請預期查無或零星。

憲法法庭資料(釋字/憲判字)不在查詢時連網取得 — 它是離線打包的(old_cases.json/new_cases.json/opinions.zip),來源為 cons.judicial.gov.tw,由維護腳本離線重建。詳見 SOURCES.md。

憲法法庭資料統計

資料集

筆數

含理由書

含意見書

檔案大小

舊制釋字(old_cases.json)

813

734

472

7.4 MB

新制憲判字(new_cases.json)

58

58

57

2.0 MB

大法官意見書全文(opinions.zip)

1,541 份

—

1,541 份有全文

10.8 MB

釋字 401 號以後與憲判字的大法官意見書,官網只以 PDF 附件公開,已擷取文字打包進 opinions.zip,查詢回傳的 opinion_documents 會列出每份意見書的標題、官網 PDF 連結與字數。其中 22 份 PDF 的字型無法解碼或頁面為圖片(主要是釋字 735–753 號的部分意見書),改以頁面影像逐字轉錄(回傳時標註 transcribed,引用前請核對官網 PDF)。意見書以憲法法庭網站公布的 PDF 為準;全國法規資料庫收錄的早期意見書是事後編修的版本(用字統一、修正筆誤、當事人姓名去識別化),兩者文字可能略有出入。重建方式見 scripts/build_opinions.py;官網公布新的憲判字後,用 scripts/build_new_cases.py 只補新案(含意見書)。

函釋、判解、決定書、文獻、統計、立法紀錄與憲法法庭文件回傳完整全文,不按字數截斷;法規與其他規範則依 article_no 只回傳指定的條文(一次最多 50 條),不回傳整部法規。官網搜尋分頁、關鍵字片段模式、附件數量與檔案大小限制仍在;沒有文字層的掃描檔提供原始連結。

快取

資料類型

TTL

位置

判決全文

30 天

使用者資料目錄的 legal_mcp.db(SQLite,首次啟動時建立)

搜尋結果

24 小時

同上

法規條文

7 天

同上

pcode metadata

30 天

同上

歷審清單

24 小時(與判決全文分開)

同上

憲法法庭案件清單、卷宗頁

1 天

同上

單篇全文:決定書、立法理由、憲法法庭卷內文書、公報與草案預告、統計表、研究文獻

30 天

同上

函釋、判解全文(可能事後停止適用)

7 天

同上

地方法規、條約、交易所規章

7 天

同上

法務統計常用統計表

1 天

同上

議案全文、國家圖書館授權全文

不快取

—

消保處、監察院陽光法令、標準檢驗局的函釋清單

1 天

記憶體(伺服器重啟即重抓)

官方英譯、國土管理署解釋函、智慧局著作權函釋

每週更新(智慧局每天)

使用者資料目錄的 en_laws.zip、en_orders.zip、nlma_interpcomp.json、tipo_copyright.xml

釋字/憲判字

本地資料(不過期)

mcp_server/data/old_cases.json、new_cases.json、opinions.zip

使用者資料目錄:Windows 為 %LOCALAPPDATA%\mcp-taiwan-legal-db,macOS / Linux 為 ~/.cache/mcp-taiwan-legal-db(有設 XDG_CACHE_HOME 則在其下),可用環境變數 MCP_TAIWAN_LEGAL_DB_HOME 改位置。全部清除:刪掉該目錄下的 legal_mcp.db。

pcode_all.json 自動更新

伺服器啟動時會檢查 pcode_all.json 的時間戳。如果最後一次更新在最近的週六之前,會在背景觸發從 law.moj.gov.tw 官方 API 重新抓取,結果(連同 law_histories.json 與 law_meta.json)寫進使用者資料目錄,不動套件內建檔;讀取時內建檔與使用者副本取較新者。失敗會記為 warning,不會阻擋啟動。

手動更新:

.venv/bin/python -m mcp_server.updater

專案結構

mcp-taiwan-legal-db/
├── .gitignore
├── .mcp.json              # 資料夾內 Claude Code session 自動註冊用
├── LICENSE                # MIT(程式碼)
├── DATA_LICENSE           # CC0 1.0(憲法法庭資料)
├── SOURCES.md             # 資料來源說明
├── CITATION.cff           # 學術引用格式
├── README.md              # 本檔(繁體中文)
├── README.en.md           # English version
├── pyproject.toml         # 套件 metadata 與相依
└── mcp_server/
    ├── __init__.py
    ├── server.py          # MCPServer 入口 — 定義 26 個 @mcp.tool() function
    ├── config.py          # URL、法院代碼、快取 TTL、allowed domains
    ├── updater.py         # 獨立的 pcode_all.json 更新 script
    ├── healthcheck.py     # 官方來源即時健康檢查(python -m mcp_server.healthcheck)
    ├── cache/db.py        # SQLite 快取層
    ├── data/
    │   ├── pcode_all.json          # 11,700+ 部法規(內建,~780 KB)
    │   ├── law_histories.json      # 修法沿革(內建,~9.6 MB)
    │   ├── law_meta.json           # 最新公布日、施行日註記、主管機關分類(內建,~1.2 MB)
    │   ├── old_cases.json          # 813 筆舊制釋字全文(內建,~7.4 MB)
    │   ├── new_cases.json          # 58 筆新制憲判字全文(內建,~2.0 MB)
    │   └── opinions.zip            # 大法官意見書全文,由官網 PDF 擷取(內建,~10.8 MB)
    ├── models/            # Judgment / Regulation dataclass
    ├── parsers/           # 判決與法規頁面的 HTML parser
    ├── tools/
    │   ├── judicial_search.py      # search_judgments
    │   ├── judicial_doc.py         # get_judgment(含歷審清單)
    │   ├── regulations.py          # query_regulation, get_pcode, search_regulations
    │   ├── constitutional_court.py # get_interpretation, search_interpretations, get_citations
    │   ├── constitutional_docket.py # search_constitutional_docket, get_constitutional_case_file
    │   ├── agency_interpretations.py # search_agency_interpretations, get_agency_interpretation
    │   ├── ip_guidelines.py        # 智慧局專利、商標審查基準
    │   ├── fint.py                 # search_precedents, get_precedent(司法院法學資料檢索系統)
    │   ├── admin_decisions.py      # search_administrative_decisions, get_administrative_decision
    │   ├── quasi_judicial.py       # 準司法機關決定(採購申訴、裁決、保訓會、金管會裁罰、監察院、律師懲戒、醫事懲戒)
    │   ├── appeals.py              # 各部會與縣市政府訴願決定
    │   ├── legislative.py          # get_legislative_history(立法院法律系統)
    │   ├── legislative_records.py  # search_legislative_records, get_legislative_record
    │   ├── statistics.py           # search_statistics, get_statistics
    │   ├── sentencing.py           # get_sentencing_statistics
    │   ├── literature.py           # search_legal_literature, get_legal_literature
    │   ├── other_regulations.py    # search_other_regulations, get_other_regulation
    │   ├── tls.py                  # 未送中繼憑證網站用的 TWCA 中繼憑證
    │   ├── pdf_text.py             # PDF 文字擷取(意見書、決定書、處分書、卷內文書共用)
    │   ├── waf_bypass.py           # 司法院 F5 WAF:以 Playwright 取得 cookie,缺 Chromium 時自動安裝
    │   ├── public_browser.py       # 需要瀏覽器的官網(JavaScript/Cloudflare 檢查、單頁應用程式)
    │   ├── public_captcha.py       # 圖形驗證碼的本機 OCR([captcha] 額外依賴)
    │   └── medical_discipline.py   # 衛福部醫事懲戒公告
    └── tests/             # pytest 測試

執行測試

.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest mcp_server/tests/ -v

單元測試以 MockTransport 模擬官網,看不出官網改版。發版前、或有人回報某個來源查不到東西時,跑即時健康檢查:每個來源實際查一次、再取第一筆全文,並用幾件已知停止適用的函釋確認效力標示還讀得到。

.venv/bin/python -m mcp_server.healthcheck                          # 全部(約 150 項,幾分鐘)
.venv/bin/python -m mcp_server.healthcheck interpretations mof mol  # 只查指定工具與來源
.venv/bin/python -m mcp_server.healthcheck status                   # 只查效力標示

結果每列標 OK、THIN(取回的文字偏短)、EMPTY(查無結果)或 FAIL;有 EMPTY 或 FAIL 時 exit code 為 1。


關於

由 LawChat 維護 — 一個台灣法律 AI 平台。

Best-effort 維護 — 我們會盡量跟上 upstream(司法院、法務部)頁面變動,但不保證 issue 的回覆時效。

授權

程式碼:MIT License

憲法法庭資料:CC0 1.0(公有領域貢獻)— 任何人皆可自由使用、修改及散布,無需取得授權或署名。學術引用格式請參考 CITATION.cff。

裁判書與法規資料來源:司法院、法務部(政府公開資料)。 憲法法庭資料來源:司法院憲法法庭(依中華民國著作權法第 9 條屬公有領域)。詳見 SOURCES.md。

免責聲明

非官方工具。 本工具與司法院、法務部或任何政府機關沒有隸屬關係,也未經其授權或背書。

本工具是爬蟲。 使用者每查詢一次,本工具就在使用者自己的電腦上向官網送出請求,擷取網頁、PDF 或網站前端使用的公開 API。部分網站的 robots.txt 不允許爬蟲;部分網站設有 JavaScript/Cloudflare 檢查或圖形驗證碼,本工具會在本機以瀏覽器(Playwright)或 OCR 完成,或使用網站提供的語音驗證功能;也有網站的驗證碼只在網頁前端檢查,本工具直接送出查詢表單。這些都只用於使用者觸發的單次查詢:不登入、不使用員工或特定使用者的權限、不批次下載文件全文。少數網站沒有搜尋功能,查詢時會下載它公開的清單,在本機比對並短期快取。除了伺服器啟動時預先連線司法院裁判書系統、每週更新一次全國法規資料庫開放資料的法規代碼表,本工具不在背景抓取資料,也不建立資料庫。

使用者的責任。 請求由使用者的電腦與網路發出。使用者須自行確認並遵守各網站的使用規定與相關法令(包括著作權法、個人資料保護法),並自行承擔使用的結果。請勿修改或使用本工具大量、高頻率或自動化地抓取資料,也不要把查詢結果建成資料庫或轉載;標示不得轉載的來源(如證基會法規系統)與國家圖書館授權全文只供個人查閱。

個人資料。 部分官方文件(如訴願決定、懲戒決議)在官網公開當事人姓名,本工具照原樣回傳,不另外遮蔽。使用者處理其中的個人資料時,須符合個人資料保護法的蒐集目的與合理利用範圍。

資料正確性,不構成法律意見。 查詢結果以官網當下的內容為準,可能因快取(見上方 TTL 表)、官網改版、擷取錯誤或掃描檔辨識錯誤而不完整或不正確。本工具與其結果不構成法律意見;正式引用或作為依據前,請向官方來源核對。

不提供擔保。 本工具依 MIT 授權「按現狀」提供,不提供任何明示或默示的擔保。在法律許可的範圍內,維護者對使用本工具或其結果所生的損害不負賠償責任,包括資料錯誤、官網封鎖使用者的連線,以及因使用者的使用方式所生的爭議。

在本工具之上建構的服務。 本專案的設計是在每位使用者自己的電腦上執行。若把它架設成集中式服務,或據以建構 agent、應用程式(包含 examples/ 內的範例),所有對官網的請求、資料用途與對使用者的聲明,由建構者自行負責。

給網站管理者。 若機關或網站管理者對本工具的存取方式有疑慮,或希望停止收錄、改用其他方式,請在 GitHub Issues 提出或來信 opensource@lawchat.com.tw,我們會盡速配合調整或移除該來源。

Available Tools

26 tools
get_administrative_decisionA

取得訴願決定書、處分書、審議判斷、裁決、保障決定、裁罰案件、監察院案文或律師懲戒決議的全文 (由官網 HTML 或 PDF 擷取;掃描檔無法擷取時回傳 PDF 連結)。

Args: decision_id: search_administrative_decisions 回傳的 id(如「ey:A-115-000633」)

ParametersJSON Schema
NameRequiredDescriptionDefault
decision_idYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the extraction source (official HTML or PDF) and a fallback behavior (scanned files that cannot be extracted return a PDF link). It does not cover permissions, rate limits, or other operational traits, so the disclosure is partial.

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, followed by a parenthetical on source/fallback, then a compact Args section. The enumeration of document types is slightly long but informative rather than wasteful.

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

Completeness4/5

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

No output schema and no annotations, yet the description conveys what is returned (full text) and the edge-case return (PDF link for unextractable scans). Combined with the parameter provenance, this is nearly complete for a single-parameter fetch tool, with only auth/rate context 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 description coverage is 0% and the single parameter is only titled 'Decision Id' in the schema. The description compensates well: it explains the parameter is the id returned by search_administrative_decisions and gives a concrete format example ('ey:A-115-000633'), adding semantics the schema lacks.

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 (取得/retrieve) and resource (the full text of administrative decisions), and enumerates the document types covered (appeal decisions, dispositions, review judgments, rulings, penalty cases, Control Yuan texts, attorney disciplinary resolutions). It is clearly the retrieval counterpart to search_administrative_decisions, though it does not explicitly distinguish itself from the many other 'get_*' siblings.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: by tying decision_id to 'search_administrative_decisions 回傳的 id', it signals the search-then-fetch workflow. However, there is no explicit when-to-use/when-not guidance or comparison against sibling retrieval tools like get_judgment or get_precedent.

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

get_agency_interpretationA

取得單一行政函釋全文(主旨、說明;正本、副本受文者清單省略)。

Args: interpretation_id: search_agency_interpretations 回傳的 id(如「moj:FE393340」「mol:e:勞動條 3:1100130312」)

Returns: agency, doc_number, date, summary, full_text, related_laws(相關法條), notes(編註), status/status_note(官網的效力標示,見 search_agency_interpretations;沒有 status 表示官網沒標示), attachments, source_url

ParametersJSON Schema
NameRequiredDescriptionDefault
interpretation_idYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose notable traits: it states that recipient lists are omitted from the returned full text, and it explains the status/status_note semantics including what an absent status means. It does not cover error/not-found behavior, which is a minor gap for a read-only getter.

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-loads the purpose in one sentence, then uses clear Args/Returns blocks. The Returns list is long but every field name is informative; nothing is redundant boilerplate.

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

Completeness4/5

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

There is no output schema, and the description compensates by enumerating the return fields (agency, doc_number, date, summary, full_text, related_laws, notes, status, attachments, source_url). Combined with the parameter source and omission notes, an agent has enough to call and interpret the result, though error handling is unaddressed.

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, and it does: it identifies the single parameter's origin (search_agency_interpretations output) and gives two concrete example id formats (moj:FE393340, mol:e:勞動條 3:1100130312). This is far more than the bare "string" schema provides.

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 scopes it to a single document, which clearly distinguishes it from the sibling search_agency_interpretations. It also discloses what is deliberately omitted (正本、副本受文者清單), so an agent knows the exact nature of the returned text.

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?

The Args section explicitly ties the call to search_agency_interpretations by telling the agent the id comes from that tool's return value, which effectively documents the search-then-fetch workflow. It stops short of stating any when-not-to-use conditions or naming other alternatives such as get_interpretation.

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

get_citationsA

大法官解釋/憲判字之間的引用關係。

direction="cites"(預設):從理由書抽出這件引用了哪些釋字/憲判字(往前追溯)。 direction="cited_by":列出後來哪些釋字/憲判字的主文或理由書引用了這件(往後追溯)。 要找引用某件的法院判決,改用 search_judgments,keyword 填完整字號(如「釋字第748號」)。

Args: case_id: 解釋/裁判字號字串(格式同 get_interpretation) include_context: 每個引用附上原文前後 80 字片段 direction: "cites" 或 "cited_by"

ParametersJSON Schema
NameRequiredDescriptionDefault
case_idYes
directionNocites
include_contextNo

TDQS

A4.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the two operating modes and what include_context does (80-character surrounding snippet), which is real behavioral value, but says nothing about return structure, pagination, or error/empty cases.

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?

The description is front-loaded with the resource, then the two direction modes, then the alternative tool, then the args. Each sentence earns its place and the layout is easy to scan, though the arg block partially restates schema entries.

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

Completeness4/5

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

With no annotations and no output schema and 3 parameters, the description covers the necessary ground: what it returns in each direction, all parameter meanings, and the routing to a sibling. Only finer detail about return formatting is absent, which the directions largely imply.

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 0%, so the description must compensate, and it documents all three params: case_id (format matching get_interpretation), include_context (attaches ~80 chars of source text), and direction with both allowed values explained. This adds clear meaning beyond the bare schema, though case_id format is only referenced indirectly via another tool.

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?

The description names the specific resource (citation relationships between 大法官解釋/憲判字) and the specific operation for each direction, clearly stating the verb+resource. It explicitly distinguishes itself from the sibling search_judgments and names it, letting an agent tell the two apart 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?

It states precisely when to use each mode: direction="cites" for backward tracing from the reasoning text, direction="cited_by" for forward tracing from later texts. It also names the alternative (search_judgments) with the exact condition and keyword format for choosing it, leaving nothing to inference.

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

get_constitutional_case_fileA

憲法法庭卷內文書:聲請書、答辯書、關係機關意見、專家諮詢與鑑定意見、法庭之友意見書、言詞辯論筆錄、 爭點題綱、大法官意見書、確定終局裁判連結等(裁判本文與意見書全文另見 get_interpretation)。

用法:

  1. 只給 case_id:列出該案全部公開文件(每筆含 id、group、title、url)、announcements(言詞辯論公告等)與案件欄位 (原分案號、併案、聲請人、案由…)。早期釋字沒有 PDF,聲請書全文在 petition_text。

  2. case_id + keyword:只列出內容含全部關鍵字的文件並附片段(例如找哪些法庭之友意見書談到「人性尊嚴」); 比對的是官方擷取的無標點文字,限憲判字與受理中案件。

  3. document_id:讀單一文件全文(PDF 擷取;掃描檔的 OCR 可能有錯字)。news:… 是公告(含爭點題綱)。

Args: case_id: 「113年憲判字第8號」「釋字第748號」、受理中案號「114年度憲立字第3號」, 或 search_constitutional_docket 回傳的 id(docket:…、hearing:…、amicus:…) document_id: 文件 id(數字)或 news:…;給了就只讀這份文件 keyword: 在卷內文書中找含這些詞的文件(空白分隔)

ParametersJSON Schema
NameRequiredDescriptionDefault
case_idNo
keywordNo
document_idNo

TDQS

A4.7/5.0
Behavior4/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 disclose meaningful traits: keyword matching runs only on unpunctuated official text and is limited to 憲判字 and pending cases, early 釋字 lack PDFs with full petition text in petition_text, and scanned PDFs may contain OCR errors. It does not cover auth requirements or rate limits, but the data-quality and scope caveats are the salient ones for a retrieval tool.

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?

The description is dense but well organized, leading with the resource inventory before the numbered usage modes and arg explanations. Every sentence carries information, though the sheer length and tight CJK formatting make it heavier than strictly necessary.

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?

With no output schema and no annotations, the description still details what each call returns (id, group, title, url; announcements; case fields such as original case number, consolidation, petitioner). An agent has everything needed to call it correctly across all three modes.

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 coverage is 0%, so the description must compensate entirely, and it does: each of the three parameters is explained with accepted formats (case number styles, docket:/hearing:/amicus: ids, numeric vs news: document ids), example keywords, and the behavioral consequence of each combination.

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?

The description names a specific verb+resource (retrieving Constitutional Court case-file documents) and enumerates the document types covered. It explicitly distinguishes itself from the sibling get_interpretation, noting that judgment text and full opinions live there instead.

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?

Three numbered modes state exactly which argument combinations to pass and what each returns (case_id alone, case_id+keyword, document_id alone). It also names the alternative tool (get_interpretation) and the condition that routes to it, leaving nothing to inference.

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

get_interpretationA

取得司法院大法官解釋(釋字第 1-813 號)或憲法法庭裁判(憲判字)全文。

預設層(字號/日期/爭點/解釋文)從本地快取即時回傳,無需連網。 理由書/意見書支援全文模式與關鍵字片段模式。

case_id 格式(自動解析):「釋字第748號」「釋字748」「748」 「111年憲判字第1號」「111憲判1」

Args: case_id: 解釋/裁判字號字串 include_reasoning: 回傳理由書全文 reasoning_keyword: 在理由書中搜尋關鍵字並回片段(覆蓋 include_reasoning) include_opinions: 回傳意見書全文 opinions_keyword: 在意見書中搜尋關鍵字並回片段 opinion_document: 只取標題含此字串的意見書全文(例如大法官姓名「許宗力」); 回傳的 opinion_documents 列出每份的標題、官網 PDF 連結與字數 opinions_offset: 意見書全文從第幾字開始回傳(預設 0)

ParametersJSON Schema
NameRequiredDescriptionDefault
case_idYes
opinions_offsetNo
include_opinionsNo
opinion_documentNo
opinions_keywordNo
include_reasoningNo
reasoning_keywordNo

TDQS

A4.4/5.0
Behavior4/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 substantial work: it discloses cache-only default behavior (no network), the two retrieval modes, keyword override precedence (reasoning_keyword covers include_reasoning), and even names a returned field (opinion_documents with titles, court PDF links, word counts). It omits error/not-found behavior for invalid case ids, which keeps it short of a 5.

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 purpose, then case_id formats, then per-argument notes; each line earns its place. Slight redundancy from restating parameter defaults that also appear in the schema, and the bilingual framing adds length, but nothing is wasted.

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

Completeness4/5

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

For a 7-param tool with no annotations, no output schema, and 0% schema coverage, the description supplies modes, caching behavior, argument semantics, and a return-field hint. The main gap is failure handling for unrecognized case ids, but overall an agent has enough to invoke it correctly.

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 coverage is 0%, so the description must compensate, and it does: every one of the seven params is documented in the Args block, including precedence rules ('reasoning_keyword overrides include_reasoning'), filtering semantics for opinion_document, and the default/purpose of opinions_offset. The case_id format examples (釋字第748號 / 釋字748 / 748 / 111年憲判字第1號) are especially valuable given the empty 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?

States a specific verb (取得/fetch full text) and precise resource (大法官解釋 釋字 1-813號 / 憲法法庭裁判 憲判字), with an explicit coverage range. It is clearly the retrieval counterpart to the sibling search_interpretations, so an agent can distinguish it without opening the schema.

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?

Explains the layered behavior (default layer served instantly from local cache with no network) and when to use the reasoning/opinion modes versus keyword snippet modes. It does not explicitly rate itself against search_interpretations or get_constitutional_case_file, but the context for choosing modes is clear.

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

get_judgmentA

取得單一裁判書全文。

支援兩種查詢方式:

  1. 以 JID 查詢(優先使用 Open Data API)

  2. 以 URL 查詢(直接載入頁面)

Args: jid: 裁判書 JID(如「TPSV,104,台上,472,20150326,1」),從搜尋結果取得 url: 裁判書 URL(如 https://judgment.judicial.gov.tw/FJUD/printData.aspx?id=...)

Returns: 包含裁判書全文的字典:case_id, court, date, main_text, facts, reasoning, cited_statutes, cited_cases, full_text, source_url,以及 history(同一案件各審級裁判清單, 每筆含 desc、jid、url、pending_supreme_court)與 history_note。引用判決前應看 history: 後面還有上級審裁判時,要確認本判決是否已被廢棄或發回。

ParametersJSON Schema
NameRequiredDescriptionDefault
jidNo
urlNo

TDQS

A4.3/5.0
Behavior4/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 well: it discloses the JID-over-URL priority, the rich return structure, and a genuine operational caveat (inspect history to check whether the judgment was overturned or remanded before citing). It omits auth/rate-limit or failure-mode behavior, so it stops short of 5.

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-loads the purpose, then structures the two query methods and the return fields with an explicit caveat. Slightly long but every section (args, returns, history warning) carries load, so size is justified by the tool's complexity.

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

Completeness4/5

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

With no output schema and no annotations, the description compensates by enumerating the return fields (case_id, main_text, facts, reasoning, cited_statutes, history, etc.) and explaining history_note. Complete enough to invoke correctly, though the absence of the input schema descriptions means ambiguous dual-input behavior goes unaddressed.

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 description coverage is 0%, yet the description documents both parameters with concrete format examples for jid (TPSV,104,台上,472,20150326,1) and url, and explains that jid is preferred. It does not clarify what happens if both or neither are supplied, keeping it below 5.

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 (取得單一裁判書全文 – retrieve a single judgment's full text) and explicitly scopes to a single document, distinguishing it from the sibling search_judgments. An agent can tell immediately this is the full-text fetch step after 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 Guidelines4/5

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

Explains the two lookup paths (by JID via Open Data API, by URL via page load) and states the priority order. It also notes the JID comes from search results, implying the search→get workflow. It does not, however, explicitly name search_judgments as the alternative or state when not to use this tool.

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

get_legislative_historyA

取得某一條文歷次制定、修正時的條文與立法理由(立法院法律系統,民國 59 年以後的修正才有理由)。

與 query_regulation(include_history=True) 的差別:這裡回傳立法院審議時的「理由」, 適合回答「這條為什麼這樣規定」「當初修法的目的」。

Args: law_name: 法規名稱(如「民法」「勞動基準法」「刑法」);簡稱會先轉成全國法規資料庫的正式名稱 article_no: 條號(如「184」「15-1」)

Returns: law, article, versions(舊到新,每版含 date、action(制定/修正/增訂…)、text、reason), source_url, 以及 latest_amendment_process(整部法律最近一次修正的一讀、委員會審查、二讀、三讀日期與公報頁次; gazette_pdf_id 傳給 get_legislative_record 可讀該次會議紀錄,找立法者原意)

ParametersJSON Schema
NameRequiredDescriptionDefault
law_nameYes
article_noYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses the key behavioral traits: the post-1970 reason-availability constraint and a chained workflow (gazette_pdf_id feeds get_legislative_record for full meeting minutes). It does not cover auth, rate limits, or error behavior, but for a read-only lookup the coverage is solid.

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-loads purpose, then a clear contrast paragraph, then structured Args/Returns blocks. The Returns section is longer than typical but justified because no output schema exists. No wasted 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?

With no output schema, no annotations, and 0% param coverage, the description supplies the missing return shape (versions oldest→newest with date/action/text/reason, source_url, latest_amendment_process) and the parameter meaning. An agent has everything needed to call and interpret it.

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 description coverage is 0%, so the description must compensate, and it does: law_name is explained as a full statute name with abbreviation-to-official-name normalization via 全國法規資料庫, and article_no gets format examples ('184', '15-1'). This adds genuine semantics beyond the bare typed fields.

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: it fetches the text and legislative reasons (立法理由) of a given article across its successive enactments/amendments. It explicitly distinguishes itself from the sibling query_regulation(include_history=True) by explaining that this tool returns the Legislative Yuan's deliberation 'reasons', so an agent can tell them apart without opening schemas.

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?

Names the alternative (query_regulation with include_history=True) and the exact condition that selects this tool instead ('why is this article worded this way / what was the purpose of the amendment'). It also states a hard coverage limit — reasons only exist for amendments after ROC year 59 (1970) — which tells the agent when the tool will not return useful data.

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

get_legislative_recordA

取得立法紀錄全文:議案(bill:…,含提案人、審議進度與關係文書內容)、立法院公報(gazette:…)、 法規命令草案預告(draft:…,含陳述意見截止日期與草案總說明、條文對照表), 或 get_legislative_history 立法歷程列出的公報頁(lispdf:…)。

Args: record_id: search_legislative_records 或 get_legislative_history 回傳的 id

ParametersJSON Schema
NameRequiredDescriptionDefault
record_idYes

TDQS

A3.6/5.0
Behavior3/5

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

There are no annotations, so the description carries the behavioral burden. It discloses that the returned content includes the full text plus related items (sponsors, review progress, related documents, public comment deadlines, draft comparison tables), which is meaningful context. However, it says nothing about permissions, access restrictions, or what happens if an unsupported ID prefix is passed.

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?

A single dense sentence plus a short Args block; front-loaded with the verb and resource. It is somewhat long due to the parenthetical breakdown of each record type, but every clause adds useful retrieval context.

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

Completeness4/5

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

Given no annotations, no output schema, and a 1-parameter tool, the description supplies the record types, the id source, and the content the agent can expect to retrieve. It omits only permissions or fallback/error behavior, which would complete the picture.

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 0% for the single parameter, so the description must compensate. It does explain the accepted id formats (bill:…, gazette:…, draft:…, lispdf:…) and their meaning, which is valuable beyond the bare 'record_id' schema string, though it doesn't cover the format for every possible prefix (e.g., what exactly a gazette id looks like).

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+resource (取得立法紀錄全文) and enables the agent to distinguish it from its siblings by enumerating the supported record_id prefixes (bill, gazette, draft, lispdf) and their contents. It does not mention get_legislative_history except as a producer of its argument, so the boundary with that sibling is only implicit.

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?

It clearly states where record_id values come from (search_legislative_records, get_legislative_history) and what kinds of records are accepted. It doesn't explicitly state when to use this lookup versus other retrieval tools, but for a lookup-by-id tool the usage context is made clear.

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

get_other_regulationA

取得地方自治法規、條約協定或交易所規章的條文。

分條的規範依 article_no 回傳 articles(每條含 number、content),一次最多 50 條;不給條號時只回傳 article_count 與條號範圍,不回條文。要點、條約等未分條的文件回傳 full_text。

Args: regulation_id: search_other_regulations 回傳的 id article_no: 單條「15」「15-1」「第十五條之一」、區間「1~10」、多條「3,5,15-1」,可混用; 不填 = 分條的只回條號範圍,未分條的回全文

ParametersJSON Schema
NameRequiredDescriptionDefault
article_noNo
regulation_idYes

TDQS

A4.4/5.0
Behavior4/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 well: it discloses the max-50 articles per call, that omitting article_no returns only article_count plus the number range (no text), and that undivided documents return full_text. It omits any pagination guidance for results exceeding 50 and says nothing about permissions or rate limits.

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, followed by return behavior and then arg semantics, all earning their place. Minor redundancy: the 'no article number → range only / full_text' behavior is stated once in the body and again in the Args section.

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

Completeness4/5

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

Without an output schema, the description adequately explains return shapes (articles with number/content, article_count, full_text) and the 50-item cap. The only meaningful gap is what to do when a regulation has more than 50 articles, since no pagination parameter exists.

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 coverage is 0%, so the description must compensate and does: it explains regulation_id's provenance and gives detailed article_no syntax with single ('15', '15-1', '第十五條之一'), range ('1~10'), and multi ('3,5,15-1') examples, plus the default behavior when blank. This adds substantial meaning beyond the bare string 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?

States a specific verb (取得/retrieve) and resource (條文 of 地方自治法規、條約協定、交易所規章), clearly delimiting it from the search-oriented sibling search_other_regulations. An agent can tell this is the fetch-by-id step for non-judgment legal documents.

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?

Explicitly ties regulation_id to the output of search_other_regulations, establishing the retrieval workflow after a search. It does not spell out when-not-to-use or name competing get_* siblings, so routing is implied rather than fully explicit.

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

get_pcodeA

將法規名稱轉換為全國法規資料庫的 pcode 代碼。

涵蓋 11,700+ 部法規(法律 + 命令),支援模糊比對。

Args: law_name: 法規名稱(如「民法」「勞基法」「消保法」)

Returns: 包含 pcode 的字典,或模糊比對建議

ParametersJSON Schema
NameRequiredDescriptionDefault
law_nameYes

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description discloses important behaviors: covering 11,700+ regulations, supporting fuzzy matching, and returning a dictionary with pcode or suggestions. It lacks details on error handling or rate limits but is adequate for a simple lookup tool.

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

Conciseness5/5

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

The description is concise with two clear paragraphs, front-loading the purpose and providing Args/Returns sections. No wasted words.

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?

For a simple one-parameter tool with no output schema, the description covers purpose, input, output format, and key behaviors like fuzzy matching and coverage, making it fully self-contained.

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?

The schema only provides the parameter name and type with 0% coverage. The description adds meaning by explaining law_name as a Chinese regulation name with examples (e.g., 民法, 勞基法), which goes beyond 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?

The description clearly states the tool's purpose: converting law names to pcode codes for the national law database. It is distinct from sibling tools like get_citations or get_interpretation, which serve different retrieval functions.

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?

The description implies usage for converting law names to pcode, providing context of coverage and fuzzy matching. However, it does not explicitly state when to use this tool versus alternatives or when not to use it.

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

get_precedentA

取得 search_precedents 結果的全文。

Args: precedent_id: search_precedents 回傳的 id(如「D:A,20040316,001」「Q:A,20251119,013」「C:C,3829」)

Returns: category, fields(字號、日期、決議/要旨、編註、資料來源等原站欄位), full_text, related_laws, attachments, source_url

ParametersJSON Schema
NameRequiredDescriptionDefault
precedent_idYes

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return payload (category, fields, full_text, related_laws, attachments, source_url), which is real behavioral information, but it is silent on read-only semantics, permissions/auth, pagination, and error behavior for an invalid id.

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?

The purpose sentence is front-loaded, and the Args/Returns structure is scannable with no filler. The Returns list is slightly padded with parenthetical examples, but every element is informative.

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

Completeness4/5

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

With no output schema, the Returns section usefully enumerates what comes back, and the single required parameter is fully explained, so an agent has what it needs to invoke and consume the tool. Missing only is any note on failure modes or whether the id must come from the same session's search.

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 0% – 'Precedent Id' is just a bare string – so the description must compensate, and it does: it identifies the parameter's origin (search_precedents output) and gives three concrete id format examples spanning different record categories. It stops short of explaining whether formats are interchangeable, but adds substantial meaning.

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: retrieve the full text (全文) of a precedent. It also explicitly ties itself to search_precedents, so an agent can distinguish it from that sibling (search vs. fetch full text) without opening either schema.

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?

The description establishes the workflow prerequisite by saying the id comes from search_precedents results, which tells the agent when this tool applies. It does not name any exclusions or alternative fetch tools (get_judgment, get_interpretation), but the usage context is clear.

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

get_sentencing_statisticsA

司法院事實型量刑資訊系統的刑度統計(符合條件的判決數、各刑種平均/最高/最低與分布)。

涵蓋 10 類案件:殺人、強盜搶奪、傷害、不能安全駕駛、肇事逃逸、詐欺、竊盜、毒品、槍砲、妨害性自主。 這是過去判決的統計,不是量刑基準。

用法:不給 crime 先列出罪名與法院;給 crime 後回傳可選的法條(law_options)、量刑因子(factor_options) 與目前條件的統計,再依需要加上 law、court、factors 縮小範圍。

Args: crime: 罪名(如「竊盜」「詐欺」,或系統代碼 stole、fraud…) law: 法條選項,可用逗號分隔多個(如「第320條第1項」) court: 法院,可用逗號分隔多個(如「臺北地院」) factors: 量刑因子,格式「因子=選項」,多個以分號分隔(如「累犯=是;坦承犯行=是」) year_from: 起始年度(民國年) year_to: 截止年度(民國年)

ParametersJSON Schema
NameRequiredDescriptionDefault
lawNo
courtNo
crimeNo
factorsNo
year_toNo
year_fromNo

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose meaningful behavior: a mode-dependent (two-phase) response that depends on whether crime is supplied, the content shape of the statistics, and an interpretive caveat that this is not a sentencing benchmark. Auth, pagination and error behavior are not covered.

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 purpose, then coverage, caveat, usage flow, and argument reference in a logical order. It is longer than average but each block (coverage list, workflow, arg formats) carries information the schema does not.

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

Completeness4/5

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

For a 6-parameter, no-annotation, no-output-schema tool, the description supplies the return content, the interactive flow, and per-parameter formats. The main remaining gap is that it never explains how it differs from the other statistics siblings in the toolset.

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, and it does: crime accepts a name or system code (stole, fraud), law and court accept comma-separated multiples, factors uses the 因子=選項;因子=選項 format with a concrete example, and year_from/year_to are identified as 民國年. All six parameters are given usable syntax.

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: 司法院事實型量刑資訊系統的刑度統計, and specifies exactly what is returned (符合條件的判決數、各刑種平均/最高/最低與分布). It also names the 10 covered case categories. It does not, however, differentiate itself from sibling statistics tools such as get_statistics or search_statistics.

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?

Explicitly describes the workflow: without crime it lists crime names and courts; with crime it returns law_options, factor_options and current statistics, then narrows with law/court/factors. It also warns the data is past-judgment statistics, not sentencing guidelines. No sibling alternative is named, so it stops short of 5.

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

get_statisticsA

取得統計表內容或統計報告全文(search_statistics 回傳的 id)。

Args: statistics_id: 例如「judicial:267552-…」「moj:INF_COMMON_P/807」「cprc:45180」「cprc:45180/20215121」

ParametersJSON Schema
NameRequiredDescriptionDefault
statistics_idYes

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It does indicate the return content (table contents or the full report text), which is useful, but it says nothing about permissions, size/large-result handling, or behavior on an invalid id. Modest value above 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.

Conciseness4/5

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

One front-loaded purpose sentence followed by a short examples list for the single argument. No filler. Slightly terse but neither padded nor truncated.

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

Completeness3/5

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

For a simple single-parameter retrieval tool with no output schema, the definition is nearly adequate. It does not address result size/pagination, failure modes for malformed ids, or whether the returned table and report-text cases differ, leaving some gaps.

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 0% and the schema only names the property 'Statistics Id' with no description. The description compensates by giving concrete id formats across sources (judicial:, moj:, cprc:, including a nested cprc path), which meaningfully helps an agent construct a valid value.

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 concrete verb+resource: retrieve the content of a statistics table or the full text of a statistics report. It also anchors the input to an id produced by search_statistics, which separates it from the search siblings. It does not, however, explicitly disambiguate from other statistics-family tools such as get_sentencing_statistics.

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

Usage Guidelines3/5

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

The parenthetical '(search_statistics 回傳的 id)' implies the intended workflow: use search_statistics first, then call this with its id. There is no explicit when-to-use/when-not statement or named alternative. Usage is only inferable, not stated.

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

query_regulationA

查詢全國法規資料庫的條文:單條、區間或跨號多條,一次最多 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+單一條號時提供,為該條歷次條文全文)

ParametersJSON Schema
NameRequiredDescriptionDefault
pcodeNo
to_noNo
from_noNo
languageNo
law_nameNo
article_noNo
include_historyNo

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.

search_administrative_decisionsA

搜尋訴願決定與準司法機關的決定、處分(即時查詢各機關官方網站)。

不指定 source 時查:

  • 行政院訴願決定(108 年以前收辦的案件 id 為院臺訴字號碼,如 ey:1070210137)

  • 公平交易委員會處分書及不處分決議書(約 5,800 件;關鍵字中的空白會被當成詞組的一部分)

  • 勞動部不當勞動行為裁決(搜尋結果沒有日期,讀全文才有;較舊案件請加關鍵字縮小)

  • 保訓會復審、再申訴決定(不含年金改革案件)

  • 金管會裁罰案件(金管會、銀行局、證期局、保險局合併;總數為估計) 要在 source 指定才查:

  • 「工程會」或「採購申訴」:採購申訴審議判斷(官方沒有關鍵字檢索:用 doc_number 案號如「訴1130123」或年度查, keyword 只篩選當頁、total 是整段期間的件數;內文只公開判斷理由)

  • 「監察院」:調查報告、糾正案、彈劾案、糾舉案(也可只指定其中一類;官網回應慢,單次可能數十秒)

  • 「律師懲戒」:律師懲戒、懲戒覆審決議(需姓名或案號這類精確關鍵字,符合超過 100 筆時官方回 0 筆)

  • 各部會與地方政府訴願決定:機關名稱如「臺北市」「新北市」「臺中市」「高雄市」「國防部」「交通部」「法務部」 「金管會」「退輔會」「原民會」「經濟部」「農業部」「教育部」「文化部」「環境部」「勞動部」 「內政部」「衛福部」「中選會」「人事總處」「基隆市」等,或「訴願」查全部(含行政院)。部分網站只能比對標題、只給頁數,差異見各來源的 note。 農業部/教育部最多五頁。 「醫事懲戒」查目前公告(預設西醫師,可用牙醫師等前綴);只比對姓名、縣市、證書字號,掃描檔只附 PDF。 官網公開的內容照原樣提供:部分機關的舊案 (行政院 108 年以前、法務部約 112 年以前、原民會)未遮蔽訴願人姓名

每筆含 id、agency、category、date、summary(案由);要讀全文請把 id 傳給 get_administrative_decision。 categories 列出各來源的總筆數,某來源連線失敗時帶 error,其他來源照常回傳。

Args: keyword: 關鍵字(全文檢索;部分來源只比對標題) source: 來源或機關名稱,可用逗號分隔多個(如「訴願」「公平會」「監察院」「臺北市,新北市」);不填 = 上述預設來源 year_from: 起始年度(民國年) year_to: 截止年度(民國年) doc_number: 案號或字號(如行政院「A-115-000633」、公平會「公處字第115060號」、工程會「訴1130123」、 裁決「114年勞裁字第56號」) page: 頁數(各來源各自分頁)

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
sourceNo
keywordNo
year_toNo
year_fromNo
doc_numberNo

TDQS

A4.9/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does so richly: real-time querying of official sites, slow responses (監察院 tens of seconds), 律師懲戒 returning 0 when >100 matches, 農業部/教育部 capped at five pages, some sites matching titles only, unmasked personal names in pre-108 / 法務部 / 原民會 cases, and missing dates for 勞動部 results.

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 line and the source caveats are organized as scannable lists, but the text is long and dense with source-specific minutiae that an agent rarely needs on every call.

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?

With no output schema and zero schema coverage, the description still documents the return shape (id, agency, category, date, summary plus per-source categories counts and error handling) and the full-text continuation path. Nothing critical for correct invocation is missing.

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 coverage is 0%, so the description must compensate and it does: keyword (full-text, some sources title-only), source (comma-separated, defaults listed), year_from/year_to (民國年), doc_number (with format examples such as 行政院「A-115-000633」, 工程會「訴1130123」), and page (per-source pagination).

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 (searching administrative appeal decisions and quasi-judicial rulings) and immediately clarifies the distinction from the sibling get_administrative_decision ('要讀全文請把 id 傳給 get_administrative_decision'). An agent can tell exactly which tool returns metadata vs. full text.

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 splits sources into 'default when source is unset' and 'only when source is specified', and gives concrete trigger conditions and caveats per source (e.g. 律師懲戒 needs precise name/case-number; 工程會 has no keyword search, use doc_number). Alternative tool get_administrative_decision is named with the exact handoff parameter.

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

search_agency_interpretationsA

搜尋各機關的行政函釋(解釋令、函釋、法規諮詢意見)與審查基準,即時查詢各機關官方系統。 大法官解釋(釋字)與憲判字不在這裡,用 search_interpretations。

來源:法務部(行政函釋、法規諮詢意見)、勞動部(行政函釋、解釋令)、衛生福利部、 財政部(各稅法令彙編、新頒令釋;主管法規系統另含關務署、國有財產署、國庫署的核釋令)、 經濟部(本部解釋令、商業發展署公司法等函釋、智慧財產局著作權函釋與專利商標審查基準、標準檢驗局解釋函令)、 工程會(政府採購法令)、金管會、環境部、交通部、中央銀行、教育部、農業部、文化部、國科會、原民會、海委會、公平會、 陸委會、中選會、行政院人事行政總處(公務員人事法令)、主計總處、行政院消費者保護處(消保法函釋)、 內政部(戶政司、國土管理署、地政司、消防署及部本部)、考試院系統(銓敘部、保訓會、考選部)、 監察院陽光法令主題網(政治獻金法、利益衝突迴避法、財產申報法的主管機關函釋)、 臺北市政府、新北市政府(兩者都另收中央機關函釋)、司法院法學資料檢索系統(跨機關函釋), 以及行政院公報(其他機關依行政程序法第 159 條發布的解釋性規定)。 外交部、退輔會、核安會、國發會的行政規則多為內部作業要點,只在 agency 指名時查。 部分機關(金管會、教育部等)的函釋放在「行政規則」類別,結果會混有一般行政規則。 不指定 agency 時查上述指名才查以外的全部來源;同一件函釋在多個來源出現時只保留一筆。

結果依發文日期新到舊排列,每筆含 id、agency、category、doc_number(發文字號)、date、summary(要旨或主旨)。 要讀全文請把 id 傳給 get_agency_interpretation。categories 列出每個來源/類別的總筆數與是否還有下一頁; 某來源連線失敗時該類別帶 error,其他來源照常回傳。

效力標示(status)是官網對該筆資料的標示,引用前必看:

  • 「停止適用」:官網標示已停止適用或廢止;status_note 附停止日期、依據的函或原標示

  • 「部分停止適用」:交通部的標示

  • 「適用中」:只在官網有「現行/停止適用」兩態欄位的來源出現(勞動部、衛福部、考試院系統、環境部、地政司、 各部會主管法規共用系統的行政規則),表示官網標為現行;財政部法令彙編的函釋也標「適用中」(經重新研審保留適用, 彙編後才廢止的不另標示)

  • 沒有 status:官網沒有標示或沒標示,不代表仍然有效(戶政司、消防署、智慧局、行政院公報等官網完全沒有效力欄位)。 官網偶有漏標,引用前請讀全文、留意 notes(編註)與後續函釋

Args: keyword: 關鍵字(全文檢索;多個詞以空白分隔)。查特定法條時可用「勞動基準法第24條」這類寫法。 智慧局審查基準只比對章名(如「專利要件」「混淆誤認」) agency: 機關名稱,可用逗號分隔多個,例如「勞動部」「財政部,經濟部」「銓敘部」「地政司」「臺北市」「智慧局」。 NCC、客委會、僑委會、運動部、關務署新頒釋函與陸委會主站廣告函釋須指名才查。 NCC 可查個別函復;陸委會主站限廣告規範。數位發展部只收行政院公報中依法公告的解釋性規定 year_from: 起始年度(民國年,如 110) year_to: 截止年度(民國年,如 114) doc_number: 發文字號或其號碼(如「法律字第11403512580號」或「11403512580」) page: 頁數(每個來源各自分頁:多數每頁 20 筆;衛福部、各部會主管法規共用系統、考試院系統、中央銀行、環境部、 行政院公報每頁 10 筆;交通部每頁 25 筆)

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
agencyNo
keywordNo
year_toNo
year_fromNo
doc_numberNo

TDQS

A4.9/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 delivers: result ordering (newest first), returned fields (id, agency, category, doc_number, date, summary), per-source pagination with differing page sizes, per-category error handling on source failure, and a detailed explanation of the status field semantics including the crucial warning that missing status does not mean still-valid.

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 purpose and the sibling alternative, and each section (sources, return format, status semantics, args) earns its place for a tool spanning dozens of sources. The exhaustive agency/source enumeration is heavy, but it is functionally load-bearing because agency behavior depends on it, so the length is defensible rather than padded.

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?

For a highly complex tool with no annotations, no output schema, and 0% schema coverage, the description covers everything an agent needs: source list, default vs named-agency behavior, return shape, pagination quirks, error handling, and status interpretation caveats.

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 coverage is 0% for all 6 parameters, so the description must compensate and does: keyword (full-text, space-separated, article syntax, IP-office chapter-name limitation), agency (comma-separated with examples and named-only agencies), year_from/year_to (民國年), doc_number (two accepted formats), and page (per-source page sizes). Every parameter is documented with format and behavior.

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 (searching 各機關的行政函釋、解釋令、法規諮詢意見、審查基準) and immediately contrasts itself with the sibling search_interpretations, which covers 大法官解釋/憲判字. An agent can distinguish this from search_interpretations without opening either 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 (search_interpretations) and the condition that selects it, plus states that certain agencies (外交部、退輔會、核安會、國發會) are only queried when named, and what happens when agency is omitted. Deduplication behavior across sources is also stated.

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

search_constitutional_docketA

列出憲法法庭尚未判決的案件(get_interpretation 只有已公布的裁判)。

status:

  • pending:已受理、審理中的案件(受理日期、聲請人(人民以甲乙丙代稱)、案號、主案/併案、案由)

  • hearing:已排定或已舉行言詞辯論、說明會的案件

  • amicus:目前公開徵求法庭之友意見的案件

結果的 id 傳給 get_constitutional_case_file 可看該案公開的書狀。清單在本機快取一天。

Args: keyword: 篩選關鍵字(比對案號、聲請人、案由;多個詞以空白分隔) status: pending、hearing 或 amicus

ParametersJSON Schema
NameRequiredDescriptionDefault
statusNopending
keywordNo

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does disclose meaningful behavior: results are cached locally for one day, the id can be chained into another tool, and the field set returned differs per status. It does not mention auth requirements, rate limits, or result caps, leaving some gaps.

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 one-line purpose followed by a tight bulleted breakdown of statuses and fields, then args. Efficient, though the separate 'Args' block partly repeats the parameter meanings and adds mild redundancy.

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

Completeness4/5

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

With no annotations, no output schema, and 0% schema description coverage, the description supplies status semantics, per-status return fields, the id linkage, and caching. It still leaves result counts, pagination, and any freshness/auth caveats unstated, so it is good but not fully complete.

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 0%, so the description must compensate, and it largely does: keyword matching scope (case number, petitioner, cause, space-separated terms) and the three allowed status values are documented. It omits the default behavior when status is omitted (schema defaults to 'pending'), which keeps it from a 5.

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 (list) and resource (undecided constitutional court cases) and explicitly contrasts with the sibling get_interpretation, which only holds published rulings. An agent can distinguish this from the other constitutional tools 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 Guidelines4/5

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

Explains the three status buckets (pending / hearing / amicus) and routes the agent onward: the returned id feeds get_constitutional_case_file. It implies the alternative (get_interpretation) but never states an explicit when-not condition or prerequisite, so it stops just short of a 5.

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

search_interpretationsA

列舉大法官解釋 / 憲法法庭裁判。支援關鍵字全文搜尋(搜爭點 + 理由書)。

每筆結果帶 case_id,可直接傳給 get_interpretation()。行政機關的函釋、解釋令不在這裡, 用 search_agency_interpretations。

Args: keyword: 關鍵字(標題/字號/爭點/理由書全文匹配) year: 篩選民國年度(0=不篩選,>0 只回新制憲判字) number_from: 起始號次(含),0=不篩選 number_to: 截止號次(含),0=不篩選 include_old: 包含舊制釋字(year=0 時才生效) include_new: 包含新制憲判字 max_results: 回傳筆數上限(預設 30)

ParametersJSON Schema
NameRequiredDescriptionDefault
yearNo
keywordNo
number_toNo
include_newNo
include_oldNo
max_resultsNo
number_fromNo

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses useful non-obvious behavior: results include case_id for chaining, and include_old only takes effect when year=0 (>0 restricts to 新制憲判字). It does not state result ordering, pagination, or behavior on empty keyword, so it falls short of a 5 for a 7-parameter read tool.

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-loads the purpose and the sibling routing in the first two sentences, then lists args compactly. The Args block is long but each line carries distinct semantics; only mild redundancy from restating defaults already in the schema.

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

Completeness4/5

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

For a parameter-heavy tool with no output schema and no annotations, the description covers scanning scope, filtering semantics, defaults, and the chaining contract. Weakness: it says results carry case_id but not what other fields come back or how results are ordered/limited in practice.

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: every one of the 7 parameters is defined, including the match fields for keyword (標題/字號/爭點/理由書全文), the 民國 year convention, the 0=不篩選 sentinel, inclusive number_from/number_to, the include_old/year interaction, and the max_results default.

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 the search scope (關鍵字全文搜尋 covering 爭點 + 理由書). It also names the sibling it is not (行政機關的函釋、解釋令 → search_agency_interpretations), so an agent can separate it from the other interpretation tools without opening schemas.

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 gives the when-not case ('行政機關的函釋、解釋令不在這裡,用 search_agency_interpretations') and the downstream contract ('每筆結果帶 case_id,可直接傳給 get_interpretation()'), routing the agent to both the correct alternative and the natural next call.

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

search_judgmentsA

搜尋司法院裁判書系統。

結果自動按法院權威性排序(最高法院→高等法院→地方法院),同層級按原始排序。 每筆結果含 court(法院名稱)、case_type(民事/刑事/行政)、court_level(1=最高/2=高等/3=地方)。

查特定案號用 case_word + case_number(精確比對),例如「114年度上易字第503號」→ case_word="上易", case_number="503", year_from=114;案號放在 keyword 會變成全文檢索,命中的是提到該案號的其他裁判。 keyword 用於主題式全文檢索(如「預售屋 遲延交屋」)。 要找「哪些判決引用了某裁判或釋字」時才把完整字號放進 keyword(如「108年度台上大字第2680號」「釋字第748號」), 結果就是全文提到該字號的裁判。

【資料涵蓋範圍】司法院裁判書系統自民國 89 年(2000)起才接近完整;81–88 年(1992–1999) 僅零星收錄,80 年(1991)以前查無。查詢早於 89 年的裁判若無結果,應告知使用者是資料源 不涵蓋,而非該判決不存在。

main_text 比對裁判主文,主文用語固定,可用來篩勝敗結果並與 keyword 併用: 「被告應將 移轉」「被告應給付」→ 被告敗訴;「原告之訴駁回」→ 原告敗訴;「上訴駁回」→ 維持原審。

Args: keyword: 全文檢索關鍵字(對應 jud_kw) court: 法院名稱(如「最高法院」「臺灣高等法院」「臺灣臺北地方法院」) case_type: 案件類型(民事/刑事/行政/懲戒) year_from: 起始年度(民國年,如 110) year_to: 截止年度(民國年,如 113) case_word: 字別(如「台上」「上易」「重訴」),查特定案號時必填 case_number: 案號(數字),查特定案號時必填 main_text: 裁判主文關鍵字(對應 jud_jmain)— 結構化篩選輸贏方 max_results: 回傳筆數上限(預設 10,上限 200)

Returns: 包含搜尋結果的字典:success, query, total_count, results, cached, timestamp

ParametersJSON Schema
NameRequiredDescriptionDefault
courtNo
keywordNo
year_toNo
case_typeNo
case_wordNo
main_textNo
year_fromNo
case_numberNo
max_resultsNo

TDQS

A4.7/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does so: result sorting by court authority, the fields returned per hit, main_text win/loss phrase semantics, and an explicit data-coverage caveat (complete only from 2000, sparse 1992-1999, none before 1991) with the instruction to tell users the source does not cover early cases. This is exactly the behavioral context that prevents agent errors.

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?

Long but well organized with bracketed sections, front-loaded purpose, and concrete examples. The keyword-as-citation pattern is explained in two places, but they cover distinct cases (disambiguation vs citation lookup), so the density is largely earned.

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?

For a 9-parameter search tool with no annotations and no output schema, the definition covers every parameter, the return dict shape (success, query, total_count, results, cached, timestamp), and the source-coverage limits. Nothing essential for correct invocation is missing.

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 and it does for all 9 parameters: each is described with examples, underlying field mapping (jud_kw, jud_jmain), required-when conditions for case_word/case_number, and defaults/caps (max_results default 10, limit 200).

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+resource ('搜尋司法院裁判書系統') and goes further by distinguishing case-number lookup (case_word+case_number) from thematic full-text search (keyword). It does not name sibling tools like get_judgment or search_precedents, so an agent gets the within-tool distinction but no explicit sibling routing.

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?

Explicit when-to-use guidance for two modes, with a concrete worked example ('114年度上易字第503號' → case_word/case_number/year_from). It also gives the when-NOT: putting a case number in keyword turns into full-text search that matches other judgments citing it, and reserves that pattern for citation lookup.

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

search_legislative_recordsA

搜尋立法動態與立法紀錄。

kind:

  • bills:立法院議案(法律案草案、修正草案)。status=pending 審查中(預設只看本屆,屆期不連續)、 all 全部、passed 已三讀。每筆含提案人、提案日期、會期、進度與關係文書 PDF(含條文對照表)

  • gazette:立法院公報(院會、委員會、公聽會紀錄,含委員與官員發言);全文檢索,matches 是命中片段。 查立法者原意時可用「法律名稱+條次」,例如「勞動基準法第五十五條」

  • drafts:行政院公報刊登的法規命令訂定、修正草案預告(各部會的辦法、細則草案,含陳述意見截止日期)

  • join:JOIN 平臺的法律草案預告,補足行政院公報法規命令以外的法律草案。

結果的 id 傳給 get_legislative_record 取得全文。每頁 20 筆(drafts 10 筆)。

Args: keyword: 關鍵字(法律名稱、條次、議題) kind: bills、gazette、drafts 或 join status: bills 使用 pending、all 或 passed;join 使用 pending(進行中)或 closed(已結束) term: 立法院屆別(如 11);0 = bills 審查中只看本屆、其他不限 page: 頁數

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNobills
pageNo
termNo
statusNopending
keywordYes

TDQS

A4.4/5.0
Behavior4/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 well: it discloses pagination (20 per page, 10 for drafts), the default term scoping rule ('屆期不連續', term=0 semantics), that gazette is full-text with hit snippets in 'matches', and that each bill carries proposer, date, session, progress and a comparison-table PDF. It does not discuss result ordering, totals, or failure modes.

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 sentence, then a well-organized bulleted breakdown by kind that lets an agent scan to the relevant branch. Slightly long and repeats the kind names in both the list and the Args block, but every section carries information.

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

Completeness4/5

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

With no output schema and no annotations, the description fills the gap by explaining what each result set contains, how pagination works, and how to chain the returned id into get_legislative_record. Minor omissions remain (ordering, total counts, empty-result behavior) but nothing blocking correct invocation.

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%, yet the description documents every one of the 5 parameters with value semantics: keyword types, the four kind values, status values split per kind (pending/all/passed vs pending/closed), term meaning including the special 0 behavior, and page. This fully compensates for the empty schema descriptions.

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 then enumerates the four distinct record families (bills, gazette, drafts, join) with their content, which makes the tool's scope unambiguous and clearly distinct from siblings like search_regulations and get_legislative_history.

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 concrete selection guidance: which kind to pick for which need, a specific retrieval recipe for gazette ('查立法者原意時可用「法律名稱+條次」'), and routes to get_legislative_record for full text via the returned id. It lacks explicit 'do not use this for X' exclusions against the many sibling search tools, so not a full 5.

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

search_other_regulationsA

搜尋全國法規資料庫法律命令清單以外的規範(query_regulation 查不到的)。

  • 地方自治法規(自治條例、自治規則、委辦規則):臺北市、新北市、桃園市、臺中市、臺南市、高雄市、基隆市、 新竹縣市、苗栗縣、彰化縣、南投縣、嘉義縣市、屏東縣、宜蘭縣、花蓮縣、臺東縣、澎湖縣、金門縣、連江縣、雲林縣 (只收現行法規)

  • 條約及協定:全國法規資料庫的條約(只比對名稱)、外交部條約協定資料庫(可加國家,如「日本 所得稅」; 部分舊約是掃描檔只有 PDF 連結)、財政部租稅協定(避免雙重課稅協定,名稱多寫「所得稅」)

  • 交易所規章:臺灣證券交易所、證券櫃檯買賣中心、臺灣期貨交易所(櫃買、期交所規章取自證基會法規系統, 僅供查閱、不得轉載) 建議指定 source:不填會同時查全部 28 個來源。結果的 id 傳給 get_other_regulation 取得條文。

Args: keyword: 關鍵字(法規名稱或內容)。多數來源把整串當成一個詞,請一次給一個詞,例如「違章建築」; 條約可用「國家 主題」,例如「日本 所得稅」 source: 縣市名(如「臺北市」「高雄」「新竹」)、「地方法規」「條約」「租稅協定」「外交部」 「交易所規章」「證交所」「櫃買中心」「期交所」,可用逗號分隔;不填 = 全部 page: 頁數

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
sourceNo
keywordYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: local regulations are current-only, some treaties are scanned images with PDF links only, exchange regulations come from 證基會 and are view-only/non-redistributable, and the default fans out to all 28 sources. Return-format and pagination behavior are not described, keeping it from a 5.

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 the sibling it does not replace, then organized into scannable bullets by source category with the args block last. It is longer than minimal but each section carries routing or coverage information, so little is wasted.

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

Completeness4/5

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

Given no annotations and no output schema, the description supplies the source taxonomy, the default fan-out, key caveats, and the id-handoff to get_other_regulation. An agent has enough to invoke it correctly; only pagination/result-shape details are absent.

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 0%, so the description must compensate, and it does for two of three params: keyword gets syntax guidance and an example, and source gets a full list of accepted values plus delimiter rules and default behavior. page is only glossed as 頁數 with no detail, leaving a small gap against the otherwise strong coverage.

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 explicitly scopes itself against a named sibling: it finds regulations that query_regulation cannot. The three bulleted categories (地方自治法規, 條約及協定, 交易所規章) make the coverage boundary concrete and let an agent distinguish it from search_regulations/query_regulation 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 Guidelines4/5

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

Explicitly routes the agent: it names query_regulation as the source it complements and tells the caller to pass the returned id to get_other_regulation. It also advises specifying source and warns that omitting it queries all 28 sources. It stops short of stating when-not to use it, so a 4 rather than 5.

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

search_precedentsA

搜尋司法院法學資料檢索系統的判解資料(裁判書系統 search_judgments 查不到的類別)。

類別:

  • 決議:最高法院民刑事庭會議決議、最高行政法院聯席會議決議(108 年大法庭制度施行前)

  • 法律問題座談:各級法院法律座談會、公證法律問題研討、懲戒法律問題座談

  • 停止適用判例:依法院組織法第 57 條之 1 停止適用、無裁判全文可查的判例(僅存判例要旨)

  • 司法解釋:大理院解釋、最高法院解釋、司法院院字/院解字解釋

  • 大法庭:最高法院、最高行政法院大法庭裁定(含不同意見書附件)

  • 精選裁判:司法院編輯、附「裁判要旨」的各級法院裁判(最高法院、最高行政法院、高等法院、地方法院、 智慧財產及商業法院、懲戒法院);結果的 reference_value=true 表示該院選為「具參考價值」或「足資討論」的裁判

  • 具參考價值裁判:只查上述 reference_value=true 的裁判

引用決議、判例時請留意編註(例如「不再援用」「停止適用」);get_precedent 會回傳編註。 官網標「廢」(已廢止或不再援用)的項目帶 status=「停止適用」,status_note 是官網的說明。 每類每頁 20 筆,站方每類最多提供前 500 筆,筆數過多時請加關鍵字或年度縮小範圍。

Args: keyword: 關鍵字(全文檢索) category: 類別,可用逗號分隔多個;不填 = 決議、法律問題座談、停止適用判例、司法解釋、大法庭、精選裁判 year_from: 起始年度(民國年) year_to: 截止年度(民國年) page: 頁數

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
keywordNo
year_toNo
categoryNo
year_fromNo

TDQS

A4.3/5.0
Behavior4/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 per-category page size (20), the site's 500-record cap per category, pagination behavior, and the meaning of result fields such as reference_value, status, status_note, and 編註. It omits auth/access prerequisites but otherwise provides unusually rich operational context.

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?

The definition is long but well-structured: purpose is front-loaded, then a bulleted taxonomy, then caveats, then limits. Given the category list effectively substitutes for a missing enum in the schema, the length is largely earned, though a few lines could be tightened.

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

Completeness4/5

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

For a complex, domain-specific taxonomy tool with no annotations and no output schema, the description supplies the category definitions, default behavior, result caps, pagination guidance, and field semantics an agent needs. The absence of an output schema is well compensated by the explanation of reference_value/status/編註 fields.

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 description coverage is 0%, so the description must compensate, and it does: keyword is defined as full-text search, category accepts comma-separated values with a documented default set, and year_from/year_to are clarified as 民國年. Only page is left to inference, a minor gap.

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 (司法院判解資料), then explicitly carves out its scope by noting these are the categories search_judgments cannot return. The enumerated category list lets an agent distinguish it from siblings 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 Guidelines4/5

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

Explicitly routes the agent away from search_judgments and lists which categories belong here, plus the default category set when none is supplied. It also gives mitigation advice (add keyword or year when results are too numerous) and points to get_precedent for 編註, though it does not state general when-not-to-use conditions.

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

search_regulationsA

以關鍵字搜尋法規名稱,或列出某日之後新制定/修正公布的法規(法遵追蹤)。

在完整法規清單(11,700+ 部法律與命令)中搜尋,每頁 50 筆。每筆含 law_name、pcode、status、 last_amended(最新公布日)、category(主管機關分類,如「行政>勞動部>勞動條件及就業平等目」)。 有 amended_since 時依公布日新到舊排列,否則現行法規優先、依名稱排列。

Args: keyword: 法規名稱關鍵字(如「勞動」「消費」「智慧財產」);有 amended_since 或 category 時可省略 offset: 分頁偏移(從第幾筆開始,預設 0) exclude_abolished: 排除已廢止法規(預設 False,已廢止法規仍可搜尋但標記狀態) amended_since: 只列這天以後(含)公布的法規,如「2026-09-01」「115-09-01」 category: 主管機關或分類關鍵字(如「金融監督管理委員會」「勞動部」「稅務」),比對 category 欄

Returns: 符合條件的法規列表

ParametersJSON Schema
NameRequiredDescriptionDefault
offsetNo
keywordNo
categoryNo
amended_sinceNo
exclude_abolishedNo

TDQS

A4.1/5.0
Behavior4/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 well: it discloses the corpus size (11,700+ 部), page size (50 per page), the exact return fields, and the ordering rule that switches based on amended_since. It stops short of stating read-only nature, rate limits, or permission needs, but the behavioral profile is otherwise strong.

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 purpose sentence followed by clearly labeled Args and Returns blocks; each parameter line earns its place with a concrete example. Slightly dense with parenthetical examples, but nothing is redundant 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?

For a five-parameter search tool with no output schema and no annotations, the description supplies everything needed: scope, page size, ordering semantics, per-parameter meaning, and the return fields. Nothing an agent needs to invoke it correctly is missing.

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, and it does for all five parameters: keyword with omission rule and examples, offset as pagination start, exclude_abolished with its default and the caveat that abolished laws remain searchable but flagged, amended_since with dual date-format examples (2026-09-01 / 115-09-01), and category with the matching column and examples.

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 (搜尋法規名稱 / 列出某日之後新制定或修正的法規) and clearly frames two operating modes including compliance tracking. It does not distinguish itself from close siblings like query_regulation, search_other_regulations, or get_other_regulation, so an agent cannot route between them from this text alone.

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

Usage Guidelines3/5

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

Gives concrete in-tool conditions (keyword may be omitted when amended_since or category is supplied; amended_since triggers newest-first ordering) and names the compliance-tracking use case. However it never says when NOT to use it or which sibling to prefer for adjacent needs, so alternatives remain inferred.

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

search_statisticsA

搜尋官方法律統計表與報告。

來源:司法院司法統計年報、司法統計月報(各級法院各類案件收結、終結情形、上訴、發回更審等統計表)、 法務部法務統計常用統計表(偵查、起訴、定罪、執行、矯正等)、法務部司法官學院《犯罪狀況及其分析》年度報告。 結果的 id 傳給 get_statistics 取得表格內容(以「|」分欄的文字)或報告全文。

Args: keyword: 表名或報告關鍵字,比對標題(如「收結」「上訴」「民事」「有罪」「詐欺」) source: 來源(司法統計、月報、法務統計、犯罪狀況);不填 = 全部 year: 民國年(司法統計年報、月報用;不填 = 最新一年) page: 頁數

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
yearNo
sourceNo
keywordNo

TDQS

A4.3/5.0
Behavior4/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 disclose meaningful behavior: the keyword matches titles only, source options are enumerated, the year is a ROC year, and the two-step retrieval flow plus the pipe-delimited output format of get_statistics are explained. It omits pagination behavior, result ordering/limits, and any auth/permission context.

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 on the first line, followed by a compact source list, the result-handling flow, and a clean per-argument breakdown. Slightly verbose in the source enumeration, but every element is informative and non-redundant given the empty schema.

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

Completeness4/5

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

For a 4-parameter tool with no annotations and no output schema, the description covers parameter meaning, source scope, and the retrieval handoff to get_statistics. It is largely sufficient, with only minor gaps around paging semantics and result-size expectations.

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 description coverage is 0%, so the description must compensate, and it documents all four parameters: keyword (matches title), source (with candidate values and 'blank = all'), year (ROC, 'blank = latest'), and page. Only 'page' is left vague (page count/size unstated), so it nearly but not fully compensates.

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 the exact corpora it covers (司法統計年報/月報、法務統計、犯罪狀況及其分析). An agent can distinguish it from search_judgments or search_regulations 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 Guidelines4/5

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

The description establishes the workflow explicitly: result ids are passed to get_statistics to retrieve the table text or full report, which clarifies when to use this tool versus the retrieval sibling. It does not state exclusions or when another statistics tool (e.g. get_sentencing_statistics) is preferable, so it stops short of full routing guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 14 tool updatesv1.7.0
    • Changedget_citations1 field changed
      • addedInput schema / properties / direction
        Added value: +{
        +  "default": "cites",
        +  "title": "Direction",
        +  "type": "string"
        +}
    • Addedget_constitutional_case_file
    • Addedget_legal_literature
    • Addedget_legislative_record
    • Addedget_other_regulation
    • Addedget_sentencing_statistics
    • Addedget_statistics
    • Changedquery_regulation1 field changed
      • addedInput schema / properties / language
        Added value: +{
        +  "default": "",
        +  "title": "Language",
        +  "type": "string"
        +}
    • Addedsearch_constitutional_docket
    • Addedsearch_legal_literature
    • Addedsearch_legislative_records
    • Addedsearch_other_regulations
    • Changedsearch_regulations4 fields changed
      • addedInput schema / properties / amended_since
        Added value: +{
        +  "default": "",
        +  "title": "Amended Since",
        +  "type": "string"
        +}
      • addedInput schema / properties / category
        Added value: +{
        +  "default": "",
        +  "title": "Category",
        +  "type": "string"
        +}
      • addedInput schema / properties / keyword / default
        Added value: +""
      • removedInput schema / required
        Removed value: -[
        -  "keyword"
        -]
    • Addedsearch_statistics
  2. 7 tool updatesv1.4.0
    • Addedget_administrative_decision
    • Addedget_agency_interpretation
    • Addedget_legislative_history
    • Addedget_precedent
    • Addedsearch_administrative_decisions
    • Addedsearch_agency_interpretations
    • Addedsearch_precedents
  3. 1 tool updatev1.2.0
    • Changedget_interpretation2 fields changed
      • addedInput schema / properties / opinion_document
        Added value: +{
        +  "default": "",
        +  "title": "Opinion Document",
        +  "type": "string"
        +}
      • addedInput schema / properties / opinions_offset
        Added value: +{
        +  "default": 0,
        +  "title": "Opinions Offset",
        +  "type": "integer"
        +}
  4. 8 tool updatesv1.0.0
    • First observedget_citations
    • First observedget_interpretation
    • First observedget_judgment
    • First observedget_pcode
    • First observedquery_regulation
    • First observedsearch_interpretations
    • First observedsearch_judgments
    • First observedsearch_regulations

TDQS

A4/5.0

Scored across 26 tools

Disambiguation4/5

Most tools target a distinct source/action (search_X paired with get_X), and descriptions explicitly cross-reference alternatives. A few names like search_interpretations, search_agency_interpretations, and get_interpretation could initially be confused, but the detailed descriptions clarify their boundaries.

Naming Consistency5/5

All tool names use snake_case with consistent verb_noun patterns (get_, search_, query_). The only minor variation is 'query_regulation' instead of 'get_regulation', but it still follows the same readable convention.

Tool Count2/5

With 26 tools, the set exceeds the 25-tool threshold for a heavy surface, even though the legal-research domain is broad. Many search/get pairs are useful, but the overall count is high and could overwhelm an agent without careful routing.

Completeness5/5

The server provides search and get operations for every major legal resource: judgments, regulations, interpretations, agency interpretations, administrative decisions, precedents, legislative records, literature, statistics, and constitutional docket materials. Cross-cutting tools like get_citations, get_pcode, get_legislative_history, and get_sentencing_statistics fill important gaps, leaving no obvious dead ends for the stated purpose.

Maintenance

ActivityMaintained
ResponsivenessSlow

Related MCP Connectors

Related MCP Servers