Skip to main content
Glama

TWSE Open Data (Taiwan Stock Exchange)

twse_get_dataset

取得證交所或期交所資料集內容,支援伺服器端過濾、欄位投影與分頁。兩邊的每個資料集都是一次回整份(可能上萬筆),務必用 code/match/fields 縮小範圍。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo證券/基金/契約代號,例如 "0050"、"TX"。一律精確比對(不分大小寫),實際用了哪個欄位會回在 code_field_used。找不到完全相符的代號時回 0 筆,並在 code_candidates 給出拼法相近的代號——**那些是候選不是答案**,可能是不同商品(MXF 與 MXFFX 是不同契約),請確認後改用該代號重查,不要直接引用它們的數字。
limitNo回傳筆數上限(硬上限 200)。
matchNo其他欄位的子字串過濾,例如 {"基金類型": "ETF"}。最多 20 個欄位。
fieldsNo只回傳這些欄位。
offsetNo分頁位移。
dataset_idYes資料集代號,例如 "exchangeReport/STOCK_DAY_ALL"。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / code / description
      Previous value: -"證券/基金代號,例如 \"0050\"。會自動偵測代號欄位。"New value: +"證券/基金/契約代號,例如 \"0050\"、\"TX\"。一律精確比對(不分大小寫),實際用了哪個欄位會回在 code_field_used。找不到完全相符的代號時回 0 筆,並在 code_candidates 給出拼法相近的代號——**那些是候選不是答案**,可能是不同商品(MXF 與 MXFFX 是不同契約),請確認後改用該代號重查,不要直接引用它們的數字。"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses a key behavioral trait: every dataset returns the whole batch at once, potentially tens of thousands of records, and advises filtering. This is significant context beyond the schema. It doesn't mention output ordering or the hard 200-row limit, but that lives in the parameter schema, and the description's disclosure is valuable.

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

Conciseness5/5

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

Two concise sentences. The first states purpose and features; the second delivers a critical usage warning. No fluff, front-loaded with the most important information.

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 a 6-parameter tool with no output schema and no annotations, the description covers the essential context: purpose, filtering capabilities, and a critical large-data behavior. The per-parameter schema descriptions handle the rest. It could mention return format or ordering, but the description is robust enough for agent use, especially with rich sibling tool names providing context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with detailed parameter descriptions for each field. The tool description only collectively mentions code/match/fields as scope-reducing parameters, which adds a usage hint but does not add meaning beyond what the schema already provides. Baseline 3 is appropriate.

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 description clearly states the tool retrieves dataset content from TWSE/TPEx with server-side filtering, field projection, and pagination. The verb '取得' and resource '資料集內容' are specific, and the feature list distinguishes it from sibling tools like twse_describe_dataset or twse_search_datasets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: when fetching dataset content, and includes a strong directive to use code/match/fields to narrow scope because datasets return in full (up to tens of thousands of rows). It doesn't explicitly contrast with alternatives, but it implies this is the data-fetching tool versus metadata/search tools.

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.