usda_wasde_get_report_text
Retrieve the narrative text of a month's USDA WASDE release, including WAOB commodity paragraphs, from its XLS or PDF for analysis.
Instructions
The narrative of a month's WASDE release, WAOB's commodity paragraphs, as text.
Read from the release's XLS, sheet WASDE Text: one string a row with text, as
printed, the first the report's number ("WASDE - 676\r"). A release without an XLS,
or whose XLS holds no such sheet or no text in it while it has a PDF, a placeholder
counting as none, is read from its PDF: one string a page before the one headed
Interagency Commodity Estimates Committees; no figure comes from a PDF. The release is
the month's latest with an XLS or a PDF. Requests: the pages of ESMIS's list from the
newest to one past the month, at most 24, the release, the file, the PDF after such an
XLS, and a revision PDF where the report's is refused: 28 at most, 112 with 4 attempts
each. release_id reads no list: 4 at most, 16. A past month without a WASDE gives
the empty list and a note; a later one, or one whose releases hold neither file,
NotFoundError; one before about 1982 InvalidRequestError.
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_report_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | The XLS or PDF file to read first, by its name as ``list_releases`` gives it, e.g. ``"R1wasde-07-11-2013.xls"``, July 2013's first revision; an XLS without a narrative gives way to the release's PDF. ``None`` (the default) reads the release's first XLS whose name marks no original, revision or special report (``ORIG…``, ``R1…``, ``wasde-05-10-2001_wheat-revision.pdf``), else its first, then its PDF chosen alike, 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 file that the reader cannot read raises ``ValidationError`` after its download, naming the file. | |
| release_id | No | The ESMIS id of the month's release to read, e.g. ``95659``, July 2010's, as ``list_releases`` gives it; the list is then not walked. ``None`` (the default) reads the month's latest release with an XLS or a PDF file. An id of another month or publication raises ``InvalidRequestError`` naming both dates. |