Skip to main content
Glama

Taiwan Road Safety Data (Unofficial)

get_period_comparison

查詢縣市(或全國)某年某月累計的交通事故死傷人數,並與上游提供的比較期間(預設去年同期)比較;回傳事故總件數與指定指標(headline:事故總件數,加 30日死亡/事故受傷/事故死傷),以及依年齡、用路人、肇因等分類的 breakdown;metric 選「全部」時對死亡、受傷、死傷各查一次(3 個上游請求),輸出改依指標分組(byMetric)。酒駕、毒駕問題請用本工具。breakdown 的分類名稱(受傷、死傷版本把「死亡」換成「受傷」「死傷」):兒童(0-12歲)、少年(13-17歲)、年輕人(18-24歲)、成年人(25-64歲)、高齡者(65歲以上)、少年無照機車騎士(含大重機)、高齡者事故無照駕駛、年輕人機車騎士(含大重機)、高齡者機車騎士(含大重機)、高齡者機車騎士(含大重機)自撞、機車騎士(含大重機)自撞、高齡者行人(含代步)、高齡者使用電動代步器(含輪椅)、行人、自小客駕駛人、自行車騎士(含電自、電輔)、機車騎士(含大重機)、少年自行車騎士(含電自、電輔)、微型電動二輪車(含電輔)、大型車案件導致死亡、平交道事故總件數、平交道事故導致死亡、行人路口事故、高齡者路口事故、高齡者路段事故、大型車造成行人涉入(含代步)、大型車造成機車涉入(含大重機)、大型車造成自行車涉入(含電自、電輔)、動力機械案件導致死亡、營業用小客車案件導致死亡、追撞事故死亡人數、酒駕案件導致死亡、吸食違禁物駕駛導致死亡、外籍人士。肇因類(追撞、酒駕、毒駕)也在其中。毒駕(吸食違禁物駕駛):統計自 115 年起,115 年 7 月起定義改為納入第二當事人,所以 1–6 月與 7 月起的數字不能相加(起算年與定義變更由專案維護者提供,未核對官方公告);比較期間早於 115 年時 previous 為 null、note 為「未統計」,不是沒有發生;涵蓋月份未知。category 選填,只回傳名稱包含該字串的分類(例如 吸食違禁物駕駛),此時 headline 為空;沒帶時行為不變

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "city": "<city>",
      "year": "<year>",
      "month": "<month>"
    },
    "name": "get_period_comparison"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityYes縣市名稱(如 屏東縣),或 全國、國道、其他
yearYes民國年,例如 115
monthYes累計到幾月,01–12(例如 07 表示 1–7 月累計)
metricNo死亡人數是事故發生後 30 日內死亡;全部=死亡、受傷、死傷三組一次回死傷人數
categoryNo選填;只回傳名稱包含這個字串的分類,例如 吸食違禁物駕駛(毒駕)、酒駕;headline 會是空的;沒帶時回傳全部分類
compareWithNo比較的基準去年同期

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: metric='全部' fans out to three upstream requests and reshapes output byMetric, previous is null with note '未統計' rather than meaning zero, the 115/7 definition change for drugged driving makes 1–6月 and 7月起 non-additive, and coverage months are explicitly flagged as unknown. It also discloses the output reshape when category is supplied (headline empty). This is exactly the kind of non-obvious behavior an agent cannot get from structured fields.

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

Conciseness3/5

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

Core behavior is front-loaded in a tight first two clauses, but the middle is a ~33-item enumeration of breakdown category names with at least one duplicate ('高齡者機車騎士(含大重機)' appears twice), which hurts scannability. The list is arguably useful since category is a free-text filter with no enum, but its length and repetition cost structure points.

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 six-parameter, six-concept tool with no output schema, the description covers input semantics, output shape (headline, breakdown, byMetric, previous/note), fan-out cost, and a data caveat. It is nearly complete; the remaining ambiguity is the explicitly acknowledged '涵蓋月份未知', which is disclosed rather than hidden.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning beyond the schema: it explains the downstream consequence of metric='全部' (three upstream requests, byMetric grouping) and the side effect of category substring filtering on headline. The year/month semantics are left to the schema, which already documents 民國年 and the 01–12 cumulative behavior.

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 opening sentence names a specific verb+resource+scope: cumulative traffic casualty counts for a county or nationwide in a given year/month, compared against an upstream comparison period (default: same period last year). It also lists the returned artifacts (headline, breakdown, previous/note). It does not name a sibling tool it competes with (e.g. get_location_trend), instead only asserting '酒駕、毒駕問題請用本工具', so sibling differentiation is topical rather than explicit.

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?

It gives a concrete routing rule ('酒駕、毒駕問題請用本工具') and explains how the metric='全部' mode behaves, which helps an agent decide when this tool is the right call. There is no explicit when-not guidance and no named alternative for non-drunk-driving trend questions, so the agent must infer boundaries from sibling names alone.

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.

Resources