Skip to main content
Glama

usda_esr_get_exports

Read-onlyIdempotent

Retrieve weekly and accumulated US export sales for a specified commodity and market year, for one destination country or all countries, with an optional week-ending filter.

Instructions

US weekly export sales of one commodity in one market year, to one country or to all.

One record per destination and week: weekly and accumulated exports, outstanding and gross new sales, current and next market year net sales and commitments, in the unit unit_id names (list_units_of_measure). From the current calendar year on, the release list is read first, and a market year ESR has not released raises NotFoundError naming the commodity's current one, since ESR answers it as a year without exports; an empty list means no exports. A market year ESR holds no data for (1900) answers the empty list with a note. One call sends at most 2 requests, 8 attempts with retries. Where the list is read and names market_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>",
      "market_year": "<market_year>"
    },
    "name": "usda_esr_get_exports"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetNoRows of the answer already shown, counted from its last row: the note of a cut answer names the next offset, which reaches older rows. 0, the default, starts at the last row.
market_yearYesESR market year, named by its end year, e.g. ``2024`` (for wheat June 2023 to May 2024, for corn and soybeans September to August, for cotton August to July); four digits and no later than the current year plus two, both checked before any request, and no later than the commodity's current market year, which ``get_release_dates`` names: in October 2026 wheat's is 2027, and 2028 is refused after one request.
country_codeNoESR destination country code (not ISO), an integer, e.g. ``1220`` (Canada), ``2010`` (Mexico), ``5880`` (Japan); ``9990`` (UNKNOWN) is a destination like any other, and one the packaged list lacks is refused before any request, naming the closest codes. Omit it (``None``) for every country: one record per destination and week, over 1,000 rows for some commodities, where one country is up to 54.
commodity_codeYesESR commodity code, an integer, e.g. ``104`` (Wheat - White), ``101`` (Wheat - HRW), ``401`` (Corn), ``801`` (Soybeans), ``1404`` (All Upland Cotton); one the packaged list lacks is refused before any request, naming the closest codes.
week_ending_dateNoKeep only the rows of the week ending on this date, ESR's ``weekEndingDate``, e.g. ``2024-08-01`` (cottonseed 2024: 11 rows, one per destination). Compared by equality after the one request, since ESR takes no week; a date that ends no week of an answer with rows is refused after it with ``InvalidRequestError``, naming the nearest week ending dates, and a date whole weeks after the newest week of the commodity's current market year, where the call reads the release list, up to the week that holds the market year's last day, with ``NotFoundError``, naming the newest week; any other date after the newest week, on another weekday or past that last week, is refused with ``InvalidRequestError`` too. An answer without rows stays empty. Omit it (``None``) for every week.

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?

Annotations cover the safety profile (readOnly, idempotent, non-destructive, open-world), yet the description still adds substantial behavior: the 2-request/8-attempt budget, the release-list read from the current calendar year on, NotFoundError versus InvalidRequestError conditions, the empty-list-means-no-exports rule, and exactly when meta.vintage and meta.published_at are populated versus left 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?

Purpose is front-loaded, but the remainder is a dense run-on of nested clauses ('Where the list is read and names market_year as current...') that is hard to parse in one pass. The error and metadata rules earn their place, but their phrasing costs readability.

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?

With no output schema, the description carries the return contract and does so: it enumerates the returned measures (weekly/accumulated exports, outstanding and gross new sales, net sales and commitments) and the record grain, plus error and metadata behavior. For a 5-parameter, two-request tool, an agent has enough to call it and interpret the answer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the parameter docs are already richer than the prose (country codes, market-year end-year convention, week-ending equality semantics). The description adds only marginal parameter meaning, e.g. that omitting country yields one record per destination and can exceed 1,000 rows, so baseline 3 applies.

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?

Opens with a specific verb and resource: 'US weekly export sales of one commodity in one market year, to one country or to all', and the next sentence defines the grain of the answer ('One record per destination and week'). It never names a sibling, so the boundary against usda_esr_get_weekly_series has to be inferred from the record shape rather than stated.

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 by the scope statement ('one commodity in one market year, to one country or to all'), and get_release_dates and list_units_of_measure are cited as helpers for market year and units. There is no explicit when-to-use/when-not statement and no routing away from the weekly-series sibling, so the agent must infer the choice.

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