Skip to main content
Glama

usda_esr_get_weekly_series

Read-onlyIdempotent

Retrieves weekly U.S. export sales for one commodity and destination across selected market years, returning records in week order and flagging years with no data.

Instructions

One destination's weekly US export sales of a commodity over market years, oldest first.

One ESRData_GetCountryData request per market year, at most 10. When end_year is the current calendar year or later, the release list comes first, and a range past the commodity's current market year raises NotFoundError naming the latest released one. One call sends at most 11 requests, 44 attempts with retries. Records are ordered by week, otherwise unchanged; a week in two market years comes in each, the older year's first. meta.notes names each market year's count of rows, in order, and each passed over, one ESR holds no data for (1900). Any other error stops the call and returns nothing. Where the list is read and names end_year as current, meta.vintage is its release time as ESR prints it and meta.published_at that time without a zone; otherwise both stay empty, since the rows state no release and the list's time may be another market year's.

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": {
      "commodity_code": "<commodity_code>",
      "country_code": "<country_code>",
      "start_year": "<start_year>",
      "end_year": "<end_year>"
    },
    "name": "usda_esr_get_weekly_series"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_yearYesLast ESR market year, included, e.g. ``2024``; not before ``start_year`` and at most nine years after it (``start_year`` itself for one market year), and no later than the commodity's current market year: in October 2026, wheat's being 2027, 2024 to 2026 is four requests, 2024 to 2027 five, and 2024 to 2028 is refused after one; beef muscle cuts (1701), on the calendar year, refuse 2025 to 2027. A range ending before the current calendar year reads no release list (2023 to 2024 is two requests).
start_yearYesFirst ESR market year, named by its end year, e.g. ``2022`` (for wheat June 2021 to May 2022); ``get_release_dates`` names a commodity's current one.
country_codeYesESR destination country code (not ISO), an integer, e.g. ``1220`` (Canada), ``2010`` (Mexico), ``5880`` (Japan); ``9990`` (UNKNOWN) is a destination like any other; ``list_countries`` lists them.
commodity_codeYesESR commodity code, an integer, e.g. ``104`` (Wheat - White), ``101`` (Wheat - HRW), ``801`` (Soybeans), ``1404`` (All Upland Cotton).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A3.9/5.0
Behavior5/5

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

Goes far beyond the readOnly/idempotent annotations: it discloses request and retry budgets (at most 11 requests, 44 attempts), the NotFoundError for a range past the current market year, that any other error aborts and returns nothing, week ordering, and how duplicate weeks across market years are emitted. It also explains meta.notes counts and the conditions under which meta.vintage and meta.published_at are populated or empty.

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?

The core purpose is front-loaded, but the remainder is a dense paragraph of long, clause-heavy sentences that are hard to parse in one pass. The information is valuable, yet the meta.vintage/published_at discussion is verbose relative to its practical weight.

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?

With no output schema, the description usefully covers error behavior, ordering, and the meta fields an agent must inspect. It does not describe the record fields themselves beyond saying rows are otherwise unchanged, which leaves a small gap for a tool returning tabular data.

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, and the description adds cross-parameter meaning: the end_year/start_year span limit and the coupling of end_year to the commodity's current market year, plus the condition under which the release list is read. Some of this repeats the end_year schema text rather than extending it.

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 first sentence states a specific verb and resource with scope: weekly US export sales for one destination and one commodity across market years, ordered oldest first. The 'One destination's' phrasing implicitly separates it from the broader exports tool, but no sibling is named explicitly.

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?

Usage is implied through the range rules (end_year limits, current-market-year refusal, when a release list is fetched) rather than stated as when-to-use guidance. It never says when to prefer this over usda_esr_get_exports or get_release_dates, only that get_release_dates names the current market year.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.