Skip to main content
Glama

Taiwan Road Safety Data (Unofficial)

get_location_trend

查詢單一路口或路段的歷年(106 年起)件數趨勢,以及指定年度(最多 5 個,省略時為上游已發布的最近 3 年)的肇因與碰撞類型;逐年說明哪些年度因未進入熱點排名而沒有肇因資料(不代表沒有事故);歷年資料的最後一年是初估值,不能單憑件數升降判斷改善成效;kind 與 locationKeyid 取自 get_cbi_hotspots 的結果,city、area 與 metric 用來掃描各年排名

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": {
      "kind": "<kind>",
      "locationKeyid": "<locationKeyid>",
      "city": "<city>"
    },
    "name": "get_location_trend"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoALL 或「縣市|鄉鎮」,例如 屏東縣|恆春鎮;用來縮小掃描排名的範圍ALL
cityYes縣市名稱,例如 屏東縣
kindYes熱點類型,取自 get_cbi_hotspots 的 kind
yearsNo要查肇因的民國年度,1–5 個、106 起到今年、不可重複;省略時查上游已發布的最近 3 個年度
metricNo掃描各年熱點排名用的指標;路口只進其他指標排名的年度,換指標才找得到CBI
locationKeyidYes地點代碼,取自 get_cbi_hotspots 的 locationKeyid(不是 hotspotKeyid)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden, and it does disclose important behaviors beyond the schema: years without cause data reflect absence from the hotspot ranking, not zero accidents; the last year is a preliminary estimate, so the count trend alone must not be read as improvement; and the default year set is the upstream's most recent 3 published years. It does not state access permissions, rate limits, or response shape, but it gives more substantive behavioral context than most.

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

Conciseness4/5

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

It is a single dense sentence built from semicolon-separated clauses, front-loading the core purpose (trend query) before the caveats. Some content duplicates the schema (max 5 years, default 3 years, identifier provenance), and splitting it into shorter sentences would improve readability, but nothing is truly wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter analytical tool with no output schema, the description covers what is returned (yearly counts, causes, collision types), how missing-cause years should be interpreted, and the preliminary nature of the latest year. An agent has everything needed to call it and to interpret the result correctly.

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 the baseline is 3. The description still adds real meaning: it identifies get_cbi_hotspots as the source of kind and locationKeyid, explains that area narrows the ranking scan, and warns that switching metric may be necessary to find an intersection in a given year. That is provenance and intent beyond what the schema documents.

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 names a specific verb and resource: querying the year-by-year accident-count trend (since 民國 106) for a single intersection or road segment, plus the causes and collision types for specified years. It also makes clear the data grain (single location, multi-year) and the provenance of the identifiers, so an agent can distinguish it from sibling tools such as get_location_history or get_location_overview.

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 explicitly says that kind and locationKeyid must come from get_cbi_hotspots, that city/area/metric are used to scan each year's ranking, and that metric matters because an intersection may only appear in another metric's ranking in some years. It also gives the default year behavior. The gaps are the absence of explicit exclusions such as 'use get_location_history instead when…', but the context for correct use is otherwise clear.

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