usda_wasde_read_report_text
Reads USDA WASDE report narrative text for the latest release or a specified month, extracting commodity paragraphs from XLS or PDF files.
Instructions
The narrative of a WASDE release, WAOB's commodity paragraphs, as text.
Read from the release's XLS file, sheet WASDE Text: one string per row that holds
text, as printed, the first the report's number ("WASDE - 676\r"), then the
paragraphs from WHEAT: to cotton, 25 strings and 16,004 characters for October 2026.
A release without an XLS file, or whose XLS holds no such sheet while it has a PDF, is
read from its PDF instead (sdk-core ADR-0020 decision 4):
one string per narrative page, the pages before the one headed Interagency Commodity
Estimates Committees (pages 1 to 5 in July 2010 and October 2026), their text as pypdf
extracts it; no page after that one is read, and no figure ever comes from a PDF.
meta.endpoint is the file read ("wasde1026.xls", "wasde-07-09-2010.pdf");
meta.vintage for an XLS the report month its first table sheet prints in its first
cell ("October 2026"), for a PDF, whose narrative prints a date and no month label,
the ESMIS release id as esmis prints it ("95659"); meta.published_at the release
time as ESMIS prints it, naive; meta.request the month given, the release id and the
file's URL. The release is the latest, or the one of month with the latest release
time that carries an XLS or a PDF file; every release since 2011 but 2014-01-23 carries
an XLS. Every call downloads the file and keeps nothing. Requests: the latest release 1,
or the month's pages of list_releases, 25 releases a page from the newest back to
the month; then the release 1 and the file 1 (346 KB for October 2026's XLS), and 2 more
where a PDF is read after an XLS without the sheet. A month without a release, or whose
releases carry neither file (those of 1995 to 1997 carry TXT files), raises
NotFoundError naming their formats; a month not written "YYYY-MM"
InvalidRequestError; an XLS whose narrative sheet holds anything but text in its
first column, or a PDF whose narrative's end cannot be told (no page headed Interagency
Commodity Estimates Committees, as in a scan without text), ValidationError.
Args:
month: The release month, "YYYY-MM", e.g. "2026-10", "2010-07";
None (the default) reads the latest release.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "usda_wasde_read_report_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| month | No |