Skip to main content
Glama
oldbear-meme

mcp-taiwan-legal-db-integrated

by oldbear-meme

search_legal_interpretations_advanced

Search Taiwan's judicial interpretations database by date range and document type. Start with a category overview, then refine results using any category name.

Instructions

進階搜尋司法院法令判解系統,支援日期範圍篩選和文件類型過濾。

核心機制說明

本工具採用「兩階段查詢」設計:

  1. 第一階段:送出查詢條件(日期、關鍵字),取得 categories 統計

  2. 第二階段:根據 categories 的類型名稱,精確篩選結果

重要:categories 中的 "name" 欄位值,可以直接用於 doc_types 參數!

推薦工作流程(兩次查詢)

第一次查詢(探索):

search_legal_interpretations_advanced(
    date_from="114/1/1",
    date_to="114/12/31",
    doc_types=None  # 不指定類型
)

回傳:
categories: [
    {"ty": "Q", "name": "法律問題", "count": 80},
    {"ty": "D", "name": "決議", "count": 0},
    {"ty": "J", "name": "精選裁判", "count": 197},
    ...
]

第二次查詢(精確取得):

search_legal_interpretations_advanced(
    date_from="114/1/1",
    date_to="114/12/31",
    doc_types=["法律問題"],  # 直接使用 categories 的 name 值
    max_results=100  # 調高上限以取得全部 80 筆
)

回傳:
全部 80 筆「法律問題」類型的結果

使用範例

範例 1:查詢 96 年所有決議

# 步驟 1:先查看有多少筆
result1 = search_legal_interpretations_advanced(
    date_from="96/1/1", date_to="96/12/31"
)
# categories 顯示:{"ty": "D", "name": "決議", "count": 20}

# 步驟 2:取得全部 20 筆決議
result2 = search_legal_interpretations_advanced(
    date_from="96/1/1",
    date_to="96/12/31",
    doc_types=["決議"],  # 使用 categories 的 name
    max_results=50
)

範例 2:查詢 114 年高院法律座談會 (注意:法律座談會在「法律問題」類別,不在「決議」類別)

# 步驟 1:查看 114 年有哪些類型
result1 = search_legal_interpretations_advanced(
    date_from="114/1/1", date_to="114/12/31"
)
# categories 顯示:{"ty": "Q", "name": "法律問題", "count": 80}

# 步驟 2:取得全部 80 筆法律問題
result2 = search_legal_interpretations_advanced(
    date_from="114/1/1",
    date_to="114/12/31",
    doc_types=["法律問題"],
    max_results=100
)

範例 3:查詢特定細分類型

# 只查民事決議(網站表單直接支援的細分類型)
result = search_legal_interpretations_advanced(
    date_from="96/1/1",
    date_to="96/12/31",
    doc_types=["民事決議"]
)

文件類型選項說明

概括類型(對應 categories 的 name,使用後篩選機制):

  • "憲法法庭裁判", "大法官解釋", "大法官不受理決議", "司法解釋"

  • "大法庭專區", "停止適用之判例", "精選裁判", "決議", "法律問題", "行政函釋"

細分類型(網站表單直接支援,使用前篩選機制):

  • "民事決議", "刑事決議", "家事決議", "行政決議"

錯誤處理: 如果 doc_types 包含無效值,工具會報錯並列出所有有效選項。

參數說明

Args: keyword: 關鍵字(選填),可用於縮小搜尋範圍 date_from: 起始日期,格式:民國年/月/日(如 "114/1/1") date_to: 結束日期,格式:民國年/月/日(如 "114/12/31") doc_types: 文件類型列表(使用 categories 的 name 值或細分類型),None = 全部類型 max_results: 最多回傳筆數(預設 20,上限 200),建議第二次查詢時調高以取得全部結果 offset: 跳過前幾筆(分頁用,預設 0)

Returns: {success, query, categories(各類筆數), total_count, results, cached, timestamp}

categories 結構:[{"ty": "代碼", "name": "類型名稱", "count": 筆數}, ...]
results 每筆含:doc_type, title, date, summary, ty, id, url

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordNo
date_fromNo
date_toNo
doc_typesNo
max_resultsNo
offsetNo
Behavior4/5

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

With no annotations, the description fully explains the two-phase query design, categories mechanism, return values including cached status, and doc_types behavior. It lacks mention of rate limits or authentication but otherwise is transparent about tool behavior.

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 long but well-structured with sections, bullet points, code examples, and parameter breakdown. It is front-loaded with core mechanism and workflow. Some repetition could be trimmed, but overall it is efficient for the complexity.

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?

The description covers all necessary aspects: purpose, detailed workflow, parameter explanations, return value structure, error handling, and examples. Given the tool's complexity and no output schema, it is complete and leaves no major gaps.

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?

Despite the input schema having 0% description coverage, the description includes a detailed 'Args' section explaining each parameter's format, defaults, and usage, especially doc_types mapping to categories and max_results limit of 200. This adds significant meaning beyond the schema.

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?

The description clearly states it is an advanced search for a specific legal database with date range and document type filtering. It implies differentiation from siblings by being 'advanced' but does not explicitly contrast with similar tools like search_legal_interpretations.

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?

Provides explicit two-phase workflow recommendations, explains when to use doc_types, gives examples of first and second queries, and covers error handling with invalid doc_types. This gives clear guidance on how to use the tool effectively.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oldbear-meme/mcp-taiwan-legal-db-integrated'

If you have feedback or need assistance with the MCP directory API, please join our Discord server