Skip to main content
Glama

搜尋司法院公開裁判

search_taiwan_judgments

使用司法院開放資料自建裁判庫搜尋。排序用 sort:court(預設,法院層級最高→高等→地方,再依日期新到舊)、relevance(關鍵詞相關度)、cited(在相關度最高的前 5000 筆中依被引用次數排序,每筆附 cited_by_count)。cited_by_count 為 named_court_only 總數,不分爭點,最高法院以「本院」自引者不計入,不能直接當成某爭點最常被引用的判決;要找有影響力的判決時,用 cited 篩出候選,再以 get_taiwan_judgment_relations 與全文確認被引用的原因。要找「為某爭點被引用最多」的判決,加 cited_for(例:「對價關係 賄賂|職務」;空白=且、|=或,每詞 2–20 字,自動 sort=cited),每筆附 issue_cited_count 與引用原文 issue_examples;只計候選池內判決,次數是引用頻率,不代表見解仍有效或為多數說。每筆含法院、案件類型、日期、案由。查特定案號請用 case_word + case_number(例:114年度上易字第503號 → case_word=上易, case_number=503, year_from=114),不要放進 query。main_text 以裁判主文措辭篩選輸贏方(例:「被告應給付」= 被告敗訴、「原告之訴駁回」= 原告敗訴、「上訴駁回」= 維持原審),可與 query 併用。若同時使用語意/概念式檢索工具,建議兩軌並行後以司法院 JID 合併去重,JID 皆命中者優先;沒有 JID 的候選結果僅供瀏覽,不得直接引為法院見解。query 的關鍵詞以空白分隔、全部同時符合(且);不支援 & + - 括號等布林語法,需要「或」時請分次查詢。

Tool call template

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

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

Input Schema

NameRequiredDescriptionDefault
sortNo排序:court(預設)、relevance、cited(依被引用次數)
courtNo法院名稱,例如:最高法院、臺灣臺北地方法院
limitNo
queryNo全文檢索關鍵字,例如:預售屋 遲延交屋
year_toNo截止年度(民國年)
case_typeNo
case_wordNo字別,例如:台上、上易、重訴
cited_forNo依爭點排序(選用):其他判決引用此判決時談的爭點,例「對價關係 賄賂|職務」;空白=且、|=或;會自動 sort=cited
main_textNo裁判主文關鍵字(輸贏方篩選)
year_fromNo起始年度(民國年)
case_numberNo案號數字

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cited_for
      Added value: +{
      +  "description": "依爭點排序(選用):其他判決引用此判決時談的爭點,例「對價關係 賄賂|職務」;空白=且、|=或;會自動 sort=cited",
      +  "maxLength": 60,
      +  "type": "string"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "description": "排序:court(預設)、relevance、cited(依被引用次數)",
      +  "enum": [
      +    "court",
      +    "relevance",
      +    "cited"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses that cited_by_count is a named_court_only total excluding 最高法院 self-citations, that issue counts only reflect the candidate pool and are frequency not authority, and that cited_for forces sort=cited. The JID rule — results without a JID are for browsing only and must not be cited as court opinion — is exactly the kind of non-obvious behavioral constraint an agent needs.

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

Conciseness3/5

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

Nearly every sentence carries real information, but the whole thing is one unstructured block that drifts from sort ordering to citation caveats to query syntax to cross-tool merging without headings or line breaks. The critical constraint that boolean operators are unsupported is buried at the very end, hurting retrievability rather than efficiency.

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 an 11-parameter tool with no output schema and no annotations, it covers the high-risk semantics (citation counts, sort behavior, case-number lookup) and names the per-record fields returned (court, case type, date, cause of action). It leaves some parameters such as limit, case_type effects, and court-name matching to the schema, which is acceptable given 82% coverage but keeps it just short of complete.

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 already 82%, so the baseline is 3, but the description goes well past it: sort modes get behavioral definitions beyond the enum labels, cited_for syntax is spelled out (space = AND, | = OR, 2–20 chars per term), and case_word/case_number/year_from are illustrated with a concrete example. The query negation rules (no & + - parentheses, split OR into separate calls) are also stated, which the schema does not convey.

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 opening sentence names a specific verb and resource (searching a self-built judgment database from 司法院 open data) and immediately scopes how results are ordered. It also carves out a distinct path for exact case lookup via case_word + case_number rather than query, which tells an agent precisely which capability this tool provides versus the 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 Guidelines5/5

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

It gives explicit when-to-use rules for each sort mode, tells the agent to use cited to shortlist influential judgments and then confirm with get_taiwan_judgment_relations plus full text, prescribes case_word + case_number for known case numbers, and explains main_text for win/loss filtering. It also states the cross-tool workflow: run semantic retrieval in parallel and dedupe on JID, prioritizing items hit by both.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources