Twinkle HubTwinkle Hub
登入
🛠️ Alpha 期間維護視窗:每日 22:00 – 07:00(台灣時間 GMT+8)服務可能不穩定,敬請見諒。

📌 2026-05-22 新增:國家考試考古題語意檢索 — 6.4 萬份考卷 / 32 萬題(1 個 dataset)

看完整 changelog →

行政區代碼查詢

twtools-lookup_admin_code

TW 專屬MIT32 近 30 天呼叫

縣市 [+ 鄉鎮市區] → 內政部 8 碼法定行政區代碼 (sub-ms in-process).

Args:
    county: 縣市名 e.g. '臺北市' / '新北市' / '宜蘭縣'
            (台/臺 兩種寫法都接受, auto normalise)
    town: 鄉鎮市區名 e.g. '信義區' / '羅東鎮' (空字串=只查 county)

Returns:
    {found, county, town, county_code (5-digit e.g. '63000'),
     town_code (8-digit e.g. '63000020')}

Use case: 把含 (city, 鄉鎮市區) 的 dataset row 補上 admin code
          → cross-dataset JOIN with stats / 健保 / 房價 datasets.

Mapping coverage: 全國 22 縣市 368 (county, town) pairs, OGDL v1.

輸入 schema

{
  "properties": {
    "county": {
      "title": "County",
      "type": "string"
    },
    "town": {
      "default": "",
      "title": "Town",
      "type": "string"
    }
  },
  "required": [
    "county"
  ],
  "title": "lookup_admin_codeArguments",
  "type": "object"
}

怎麼呼叫

配置好 Twinkle Hub 的 MCP client 後,agent 會看到 twtools-lookup_admin_code。直接讓它呼叫即可,例如:

# Ask Claude / any MCP client:
請用 twtools-lookup_admin_code 處理 "…"。

# It will call:
twtools-lookup_admin_code(input="…")

還沒設好 client?

Claude Desktop 各 3 分鐘可接好 — 下載 .mcpb 雙擊即可,或看 docs 各 client 安裝步驟。

看 user 設定文件