Skip to main content
Glama
lawchat-oss

mcp-taiwan-legal-db

by lawchat-oss

search_judgments

Search Taiwan court judgments by keyword, court, case type, year, case number, or main text, and get results sorted by court level for legal research.

Instructions

搜尋司法院裁判書系統。

結果自動按法院權威性排序(最高法院→高等法院→地方法院),同層級按原始排序。 每筆結果含 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

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

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.