Skip to main content
Glama

usda_nass_get_livestock_inventory

Read-onlyIdempotent

Retrieves USDA NASS survey head counts for cattle, hogs, or sheep by year, state or national, and class. Use it to pull point-in-time livestock inventory data for a chosen survey day.

Instructions

Head counts of cattle, hogs or sheep on hand on the survey days of a year, by class.

Survey inventories (statisticcat_desc INVENTORY, unit_desc HEAD, domain_desc TOTAL, freq_desc POINT IN TIME, source_desc SURVEY), state or national, one row per survey day, class and short_desc (cattle on feed carry the class ALL CLASSES with prodn_practice_desc ON FEED), sorted by the day (begin_code, its month), then reference_period_desc, class_desc and short_desc. reference_period_desc names the day: FIRST OF JAN in the national cattle series of 2024; the four quarterly days FIRST OF MAR, FIRST OF JUN, FIRST OF SEP and FIRST OF DEC in Iowa's hogs series of 2024. The whole herd is the class INCL CALVES for cattle, ALL CLASSES for hogs and INCL LAMBS for sheep. value is the head count as published.

Args: commodity: Upstream commodity_desc: LivestockCommodity.CATTLE, LivestockCommodity.HOGS or LivestockCommodity.SHEEP. year: Year of the survey days, e.g. 2024. state: Two-letter state code for the state series, e.g. StateAlpha.IA, StateAlpha.TX; None returns the national US TOTAL series. class_desc: One upstream class_desc to keep, e.g. "INCL CALVES", "COWS, BEEF" or "COWS, MILK" for cattle, "ALL CLASSES", "BREEDING" or "MARKET" for hogs, "INCL LAMBS" for sheep; None returns every class. A class with no record for the commodity, year and place raises 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": {
      "commodity": "<commodity>",
      "year": "<year>"
    },
    "name": "usda_nass_get_livestock_inventory"
  }
}

Input Schema

NameRequiredDescriptionDefault
yearYes
stateNo
commodityYes
class_descNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered; the description adds real value beyond that with row cardinality (one row per survey day, class and short_desc), sort order, and the fact that a missing class raises NotFoundError. It does not discuss result size, pagination or how value is typed, leaving modest gaps.

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 first sentence front-loads the purpose, then the body explains filter semantics before the Args block repeats each parameter in more depth. Much of the vocabulary (domain_desc, freq_desc, source_desc, begin_code) is necessary to make the slice understandable, though the field-name parentheticals are dense and partly redundant with the Args section.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter filter tool with no output schema and no schema descriptions, the definition supplies the row shape, sort order, meaning of value, class conventions for whole-herd reporting, and the NotFoundError case. It says nothing about the return container type or how an empty year is handled, which are the remaining gaps.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full load, and it does: commodity is tied to the upstream commodity_desc with the three allowed values, year is exemplified, state is tied to two-letter codes with the None default explained, and class_desc enumerates concrete class names per commodity plus None and error behavior.

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?

The opening sentence names the specific resource and measure (head counts of cattle, hogs or sheep on hand on survey days, by class), which lets an agent separate this from production, prices or acreage siblings. It stops short of naming any sibling explicitly, so differentiation relies on the agent recognizing the 'inventory' framing.

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?

Usage context is clear: survey-based point-in-time inventories, state or national, with guidance that state=None returns the national 'US TOTAL' series and class_desc=None returns every class. There is no explicit statement of when to prefer this over another tool or when not to use it, which keeps it below a 5.

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