Twinkle HubTwinkle Hub
登入

📌 2026-08-17 新增:⚖️ 台灣法條時光機 — 歷史法條原文 · 修法沿革 · 全文檢索 · 條文關聯圖(935 個 dataset · 35,454+ 筆 row)

查看完整 Changelog →

取得資料集 metadata

tw_get_dataset

台灣​專屬MIT

**關鍵字 / Keywords**: 資料集 metadata 描述 欄位 schema 授權 license dataset info fields

取得資料集完整 metadata 與樣本資料列。

參數:
    dataset_id: 從 tw_search_datasets 取得的 dataset_id
    sample_rows: 樣本列數(v1.45.0: 預設 3,硬 cap 3)。設 0 跳過樣本

回傳:metadata(含 schema.columns、schema.row_count、license、source.url、
    join_keys、provenance)以及 sample(columns 與 rows)。若資料集尚未
    normalise,metadata 會是 None(用 tw_query_rows 觸發 lazy fetch)。

注意:v1.45.0 起 `sample_rows` 硬 cap 3(原 5、可自訂)— 防止 scraper
用 `tw_get_dataset` 一次拉多筆繞過 rate limit。 想拉完整資料用 tw_query_rows。

輸入 schema

{
  "properties": {
    "dataset_id": {
      "title": "Dataset Id",
      "type": "string"
    },
    "sample_rows": {
      "default": 3,
      "title": "Sample Rows",
      "type": "integer"
    }
  },
  "required": [
    "dataset_id"
  ],
  "title": "tw_get_datasetArguments",
  "type": "object"
}

呼叫​方式

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

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

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

尚未​設定 Client?

Claude Desktop 約 3 分鐘即可完成​設定 — 下載 .mcpb 檔案並雙擊​即可,或參閱​文件中的各 Client 安裝​步驟。

查看使用者設定​文件