Skip to main content
Glama

usda_esr_list_commodities

Read-onlyIdempotent

List USDA ESR commodities with their codes and unit IDs, optionally filtered by search text matching code or name, for mapping commodity_code values in ESR data queries.

Instructions

List ESR's commodities with their codes, the values commodity_code takes.

Answered from ESRData_GetCommodities as packaged with this version (reference/commodities.json), without an upstream call: 44 commodities when packaged, in upstream order, from 101 (Wheat - HRW) to 1702 (Fresh, Chilled, or Frozen Muscle Cuts of Pork), each with the unit_id ESR reports it in (list_units_of_measure), e.g. 104 Wheat - White, 401 Corn, 801 Soybeans (all 1, Metric Tons), 1404 All Upland Cotton (2, Running Bales). Names are upstream's, unchanged. meta.retrieved_at is when the package fetched the list; meta.vintage is empty, as upstream gives the list no release identifier.

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_esr_list_commodities"
  }
}

Input Schema

NameRequiredDescriptionDefault
searchNoKeep the commodities where this text occurs, ignoring case, in the code (as digits) or the name, e.g. ``"wheat"`` (101 to 107 and 201 Wheat Products), ``"cotton"`` (1201 to 1203 cottonseed and its products, 1301 and 1401 to 1404 the cottons), ``"104"`` (104 Wheat - White), ``"14"`` (1401 to 1404, and 1498 and 1499, rough rice: the code matches as text). Omit (``None``) for all.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare it as a safe, idempotent read; the description goes much further, disclosing that the data is a local snapshot (no upstream call), the row count (44), the ordering (upstream order), the code span (101 to 1702), name fidelity (upstream's, unchanged), and the semantics of meta.retrieved_at and an empty meta.vintage. Those are exactly the details an agent needs to trust and interpret the payload, and none are inferable from the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The structure is well front-loaded: purpose first, then sourcing, count, ordering, examples, then meta fields. It is longer than strictly necessary, with several illustrative code/name pairs that partly duplicate the search parameter's examples, but every clause carries usable information.

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?

There is no output schema, so the description must characterize the return shape, and it does: items with code, name, and unit_id, plus a meta block with retrieved_at and vintage. Combined with the sourcing and ordering notes, an agent has everything needed to call and interpret this tool.

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 search parameter's own description already explains case-insensitive matching over code-as-digits and name with worked examples. The tool description adds no search behavior of its own, so the baseline of 3 is appropriate — the schema carries this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb and resource ("List ESR's commodities with their codes") and states precisely what the list is for: the values that commodity_code accepts. That framing distinguishes it immediately from the sibling list tools (countries, regions, units of measure).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It establishes the retrieval context clearly — served from the packaged reference/commodities.json rather than an upstream call — and points to list_units_of_measure for the unit_id side of the join, which tells an agent how to use this output downstream. It stops short of explicit when-not-to-use or a direct comparison against the other ESR list endpoints, but for a reference-enumeration tool the context is unambiguous.

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