Skip to main content
Glama

Japan Trade Statistics (customs data)

Get ranking

get_ranking
Read-onlyIdempotent

Item ranking. For export or import, by value or yoy; for both, by balance (order=asc for the largest deficits). Set country to rank trade with one country. / 品目のランキング。export・import は金額(value)か前年比(yoy)、both は差し引き(balance、order=asc で輸入超過の大きい順)。country を指定するとその国との取引での順位。

Input Schema

NameRequiredDescriptionDefault
byNovalue=金額、yoy=前年同月比、balance=差し引き(flow=both のとき) / value, yoy (year-on-year), or balance (flow=both)
flowYesexport=輸出、import=輸入、both=両方と差し引き(6桁以上のみ) / export, import, or both with the balance (6-digit level and above only)
langNo答えの言葉(ja=日本語・既定、en=英語) / Response language (ja default, en)
levelYes区切り(省略時はコードの桁数で判断) / Level (inferred from the code length if omitted)
limitNo返す件数の上限 / Maximum number of results
monthNo月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)
orderNodesc=大きい順(既定)、asc=小さい順 / desc (default) or asc
countryNo国コード(税関の3桁。000=全世界) / Country code (3-digit customs code, 000 = world)
min_valueNoyoy の対象にする最小の金額(円) / Minimum value (JPY) for yoy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / by / description
      Added value: +"value=金額、yoy=前年同月比、balance=差し引き(flow=both のとき) / value, yoy (year-on-year), or balance (flow=both)"
    • addedInput schema / properties / lang / description
      Added value: +"答えの言葉(ja=日本語・既定、en=英語) / Response language (ja default, en)"
    • addedInput schema / properties / limit / description
      Added value: +"返す件数の上限 / Maximum number of results"
    • changedInput schema / properties / month / description
      Previous value: -"YYYY-MM"New value: +"月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)"
    • addedInput schema / properties / order / description
      Added value: +"desc=大きい順(既定)、asc=小さい順 / desc (default) or asc"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive operation. Beyond that, the description adds meaningful behavioral rules: flow=both must use balance, and order=asc surfaces the largest deficits. It does not cover pagination or return-shape behavior, but the annotations lower the burden.

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?

The English portion is concise and front-loaded, starting with the core resource and then giving the key combination rules. The bilingual duplication doubles the length, but each version serves a distinct audience and neither contains filler.

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 9-parameter ranking tool with no output schema, the description covers the most important semantic constraints around flow, by, order, and country. It relies on the fully documented schema for the remaining parameters, which is reasonable, though it could say more about what the ranked response contains.

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 adds useful cross-parameter semantics not fully captured by the schema: export/import pair with value or yoy, both pairs with balance, and country scopes the ranking to trade with one partner. It does not explain level, month, limit, or lang, but those are well documented in the schema.

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 description clearly states that this returns an item ranking and immediately specifies the valid flow/by combinations, which gives the agent a concrete sense of the tool's output. It does not explicitly differentiate itself from siblings such as get_item_summary or get_partners, keeping it from a 5.

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

Usage Guidelines3/5

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

The description gives conditional guidance for parameter combinations (export/import with value or yoy; both with balance and order=asc). However, it does not state when to prefer this tool over sibling tools like get_item_summary, get_partners, or get_series, so usage against alternatives is only implied.

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