Skip to main content
Glama

Japan Trade Statistics (customs data)

Get series

get_series
Read-onlyIdempotent

Monthly series for an item (value, quantity, unit price, YoY, MoM, preliminary/revised). With flow=both, exports, imports and the balance side by side. Chapters and sections start in 1988; 9-, 6- and 4-digit codes start in 2022. Use freq=year for long-term trends, or set from for older months (without from, months start in January 2022). Some import chapters and sections for April 2018–December 2019 return no value but gap="source" with an explanation, because the source e-Stat table lacks data. This does not mean there was no trade. / 品目の月ごとの推移(金額・数量・単価・前年比・前月比・速報/確報)。flow=both なら輸出・輸入・差し引きを並べます。類・部は1988年から、9桁・6桁・4桁は2022年から。長期の推移は freq=year、月ごとの過去分は from を付けます(from を省くと2022年1月から)。輸入の類・部の 2018年4月〜2019年12月の一部は、元データ(e-Stat の統計表)に欠けがあるため値を返さず gap="source" と説明文を返します。取引が無かったという意味ではありません。

Input Schema

NameRequiredDescriptionDefault
toNo月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)
codeYes統計品目番号(9桁・6桁・4桁)か類(2桁)・部の番号。分からなければ search_items で探す / Statistical code (9, 6 or 4 digits) or chapter (2 digits) or section; use search_items to find it
flowYesexport=輸出、import=輸入、both=両方と差し引き(6桁以上のみ) / export, import, or both with the balance (6-digit level and above only)
freqNomonth=月ごと(既定)、year=年ごとの合計 / month (default) or yearly totals
fromNo月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)
langNo答えの言葉(ja=日本語・既定、en=英語) / Response language (ja default, en)
levelNo区切り(省略時はコードの桁数で判断) / Level (inferred from the code length if omitted)
countryNo国コード(税関の3桁。000=全世界) / Country code (3-digit customs code, 000 = world)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"統計品目番号(9桁・6桁・4桁)か類(2桁)・部の番号。分からなければ search_items で探す / Statistical code (9, 6 or 4 digits) or chapter (2 digits) or section; use search_items to find it"
    • changedInput schema / properties / from / description
      Previous value: -"YYYY-MM"New value: +"月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)"
    • addedInput schema / properties / lang / description
      Added value: +"答えの言葉(ja=日本語・既定、en=英語) / Response language (ja default, en)"
    • changedInput schema / properties / to / description
      Previous value: -"YYYY-MM"New value: +"月(YYYY-MM。省略時は最新の月) / Month as YYYY-MM (latest if omitted)"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The description adds substantial behavioral context beyond the read-only annotations, including data start dates by code level and the important caveat that some import chapters/sections return gap="source" because the e-Stat source table lacks data, not because there was no trade. This is valuable transparency, though it does not cover every possible operational detail.

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 content is front-loaded and each sentence carries useful information about scope, defaults, or data caveats. The bilingual duplication makes it longer than necessary in one language, but that is appropriate for a bilingual tool and does not obscure the structure.

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 an eight-parameter read-only tool with no output schema, the description is complete enough to call it correctly: it explains the core output fields, data start dates, freq/from behavior, flow=both semantics, and the special gap="source" case. Remaining parameter details are covered by the fully populated schema.

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 description coverage is 100%, so the schema already documents all parameters. The description still adds meaning beyond the schema, especially for flow=both returning exports, imports, and balance side by side, and for freq=year versus monthly behavior and the from fallback.

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 tool returns a monthly series for an item, including value, quantity, unit price, YoY, MoM, and preliminary/revised status. It is specific about the resource and output content, but it does not explicitly differentiate itself from sibling tools such as get_item_summary or get_country_summary.

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 clear usage context: use freq=year for long-term trends, set from for older months, and without from months start in January 2022. It also explains that flow=both puts exports, imports, and the balance side by side. However, it does not explicitly say when to choose this tool over sibling summary or ranking 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.

Resources