Twinkle HubTwinkle Hub
Sign in

📌 2026-08-17 added: ⚖️ Taiwan statute time machine — historical article text · revision history · full-text search · citation graph (935 datasets · 35,454+ rows)

View full changelog →

Semantic + keyword judicial search

tw_search_judicial

TW-specificMIT

**關鍵字 / Keywords**: 判決 法院 語意搜尋 court judgment 民事 刑事 行政 訴訟 verdict decision case

以白話 + (可選)關鍵字 / 結構化過濾,檢索台灣判決書 corpus.

v1.18 alpha scope: 12 months (2024-05 ~ 2026-03), ~1.24M cases.
Chunks-embed 用 Qwen3-Embedding-4B, 對 JFULL chunk-level 索引.
T3 LLM 抽 winner/outcome/issue/reasoning (跑中, 月份遞減完成).

Args:
    query: 自然語言, 例「鋰電池產品瑕疵糾紛」「對勞工通勤受傷的判決」
    jtitle_contains: 案由硬性過濾
    jfull_contains: 任一 chunk 必含此關鍵字 (內文 keyword)
    court_code: 4 碼法院代碼 (從 jid 取, 如 CPEV/TPSV)
    case_type: 民事/刑事/行政/家事/少年/懲戒
    year_from/year_to: jdate 西元年範圍 (e.g. 2024-2026)
    winner: T3 抽出的勝訴方 (原告/被告/上訴人/...)
           ⚠ 僅對已 T3-processed 月份有效
    outcome_type: T3 抽出的結果 (駁回/准許/部分准許/有罪/無罪/...)
           ⚠ 同上
    limit: top-K 件 (1-100, 預設 20)

Returns:
    hits: 每筆含 jid/jtitle/jdate/court_code/jpdf/similarity/
          best_chunk_excerpt + (若 T3 完) issue/winner/outcome_type/
          award_amount/sentence/key_reasoning + has_t3 (bool)

Input schema

{
  "properties": {
    "query": {
      "title": "Query",
      "type": "string"
    },
    "jtitle_contains": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Jtitle Contains"
    },
    "jfull_contains": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Jfull Contains"
    },
    "court_code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Court Code"
    },
    "case_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Case Type"
    },
    "year_from": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Year From"
    },
    "year_to": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Year To"
    },
    "winner": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Winner"
    },
    "outcome_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Outcome Type"
    },
    "limit": {
      "default": 20,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "tw_search_judicialArguments",
  "type": "object"
}

How to call

Once your Twinkle Hub MCP client is configured, your agent will see tw_search_judicial. Just ask it to call — example:

# Ask Claude / any MCP client:
請用 tw_search_judicial 處理 "…"。

# It will call:
tw_search_judicial(input="…")

Haven't set up a client yet?

Claude Desktop in 3 minutes — download the .mcpb and double-click, or see docs for other clients.

See user docs