Skip to main content
Glama

Kyrodata — Brazil Trade, Crop & Commodity Data

Compare exports/imports between equal windows

kyrodata_compare_trade
Read-onlyIdempotent

Compares Brazil's exports or imports between two equal-length windows (like-for-like), in value (USD FOB) and in volume (kg). mode changes the reading: quarterly, semestral, annual, ytd and rolling_3m/6m/12m look a year back and hold the season constant, while monthly and semestral_sequential compare against the period immediately before and cross one. codes and countryIds filter both windows alike and combine: together they isolate one product to one partner (1201 soybean to 160 China); omitted, every product and partner counts. The result carries both windows, the % change of each metric, the window label, whether it crosses a season, and the monthly series spanning both, capped at 24 months. This returns the FIGURES of a comparison — kyrodata_resolve_comparison_window only names the window, and kyrodata_list_trade_series hands over raw monthly points without comparing them. Credit class: comex (up to 2 comex tools per 60-second session = 1 credit).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowYesDirection of the trade flow, from Brazil’s side: `export` leaves the country, `import` enters it.
modeYesWhich pair of equal-length windows to compare. Against the same period a year earlier: `quarterly`, `semestral`, `annual`, `ytd` (January to the last published month) and `rolling_3m`/`6m`/`12m`. Against the period immediately before, which crosses a season: `monthly` and `semestral_sequential`. Use `ytd` when the question names no period.
codesNoProducts to filter by, as HS codes — 4 digits (heading), 6 (subheading) or 8 (Brazilian NCM), up to 10. Omit for every product. kyrodata_resolve_entity turns a product name into its code.
countryIdsNoPartner countries to filter by, as ids from kyrodata_resolve_entity. Omit for every partner.
response_formatNoHow much of the answer to return. `concise` (the default) carries the headline figures; `detailed` adds the row-level series behind them and counts against the export quota.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesRaw numbers behind the text.
memoYestrue = identical call in the last 10 min, served again: 0 credits.
rowsNoTable rows; detailed only, capped per tool.
errorNoFailure message when status = error.
linksYesscreen = product page with these numbers.
deniedNoWhen status = denied: reason, feature, upgradeUrl.
statusYesok = data; denied = plan; error = failure or timeout.
windowNoLike-for-like window: from, to (YYYY-MM), label, months, crossesSeason.
caveatsYesReading caveats.
creditsYescharged, balance (null = unlimited), resetAt, session {charged, endsAt} of the 60-s billing session.
sourcesYesPer source: label, nameable, asOf.
dataVersionYesIdentity of the data that answered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool read-only, idempotent, and non-destructive, and the description adds meaningful behavioral context: the credit class and rate limit (comex, up to 2 tools per 60-second session = 1 credit), the monthly series cap at 24 months, and the result carrying both windows plus % change and season-crossing labels. This goes well beyond the structured annotations.

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?

The description is dense but well-organized: purpose first, then mode semantics, filters, result shape, sibling distinction, and credit cost. Each sentence earns its place, and the most decision-relevant contrast with siblings is clearly highlighted.

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?

Given the tool's complexity and the presence of an output schema, the description supplies everything an agent needs to select and invoke it correctly: metrics, mode behavior, filtering semantics, return contents, sibling boundaries, and credit implications. No critical operational context is missing.

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 value by explaining how `mode` groups map to window semantics)Skip? It says `codes` and `countryIds` filter both windows alike and combine, with a concrete soybean-to-China examplechers, and notes that omitting them counts every product and partner. That supplements the schema's per-parameter descriptions.

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 opens with a specific verb and resource: 'Compares Brazil's exports or imports between two equal-length windows,' and names the metrics (USD FOB value, kg volume). It explicitly differentiates itself from siblings by stating this returns the FIGURES of a comparison while kyrodata_resolve_comparison_window only names the window and kyrodata_list_trade_series returns raw points without comparing.

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

Usage Guidelines5/5

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

The description explains exactly which mode to use for which kind of comparison: year-back windows that hold season constant versus monthly/semestral_sequential that cross a season. It also points to the sibling tools as alternatives and clarifies the division of labor, so an agent knows when to choose this tool over them.

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