usda_wasde_get_data
Retrieve monthly USDA WASDE table values by year and month, then filter records by table, commodity, region, attribute, or release for targeted analysis.
Instructions
Every value of a month's WASDE tables, one record each, complete in itself.
Read from the release's XML, pages 8 to 37: 6543 values for October 2026. A record
holds the page's title with the report's number, the month, table, commodity, region,
market year, forecast month, row label, class, statistic, unit, the value as printed
with its number, its footnotes, each label beside its _label. The XLS names the
commodities of pages 12 to 15, else the report's layout (commodity_source), and the
U.S. pages' units (unit_source). After the fetch, the filters keep the records
whose _label equals them. Requests: the pages of ESMIS's list from the newest to one
past the month, at most 24, the release, the XML, and the XLS: 27 at most, 108 with 4
attempts each. release_id reads no list: 3 at most, 12. A month before July 2010
raises InvalidRequestError before anything is sent; a past month without a WASDE
gives the empty list and a note, a later one NotFoundError.
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": {
"year": "<year>",
"month": "<month>"
},
"name": "usda_wasde_get_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The XML file to read, by its name as ``list_releases`` gives it, e.g. ``"ORIGwasde-08-12-2013.xml"``, August 2013's original. ``None`` (the default) reads the release's first XML file whose name marks no original or revision (``ORIG…``, ``R1…``), else its first, and ``meta.notes`` names the others. A name the release lacks, or of another format, raises ``InvalidRequestError`` naming its files. | |
| year | Yes | The report's year, e.g. ``2026``. | |
| month | Yes | The report's month, 1 to 12, e.g. ``10``. A month before July 2010 raises ``InvalidRequestError``, and a file of a form that the reader does not know raises ``ValidationError`` after its download, naming the file. | |
| table | No | Keep the records whose ``table_label`` is this, e.g. ``"World Wheat Supply and Use"``; ``list_tables`` lists them. | |
| region | No | Keep the records whose ``region_label`` is this, e.g. ``"Argentina"``, ``"World"``, ``"U.S."``; ``list_regions`` lists them. | |
| attribute | No | Keep the records whose ``attribute_label`` is this, the row label as read, e.g. ``"Ending Stocks"``, which the world pages print with a line break; ``list_attributes`` lists them. | |
| commodity | No | Keep the records whose ``commodity_label`` is this, e.g. ``"CORN"`` (page 12, U.S.), ``"Corn"`` (world pages), ``"Total Grains"``; ``list_commodities`` lists them. | |
| release_id | No | The ESMIS id of the month's release to read, e.g. ``95546``, one of November 2019's three, as ``list_releases`` gives it; the list is then not walked. ``None`` (the default) reads the month's latest release with an XML file. An id of another month or publication raises ``InvalidRequestError`` naming both dates. |