Skip to main content
Glama

Nass Query

nass_query
Read-onlyIdempotent

Search USDA agricultural statistics by commodity, statistic, geography, and year. Returns production, yield, acreage, prices, and livestock data (e.g., commodity="CORN", state_fips="06" for California).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
freqNoFrequency: "ANNUAL", "MONTHLY", or "WEEKLY" (optional)
yearNoYear or range, e.g., "2024" or "2020:2025" (optional)
groupNoCommodity group, e.g., "FIELD CROPS", "FRUIT & TREE NUTS", "VEGETABLES" (optional)
stateNoState name, e.g., "IOWA", "ILLINOIS", "CALIFORNIA" (optional)
sectorNoSector: "CROPS", "ANIMALS & PRODUCTS", "ECONOMICS", "DEMOGRAPHICS", "ENVIRONMENTAL" (optional)
sourceNoData source: "SURVEY" or "CENSUS" (optional, defaults to all)
_apiKeyYesNASS API key (free from quickstats.nass.usda.gov/api)
agg_levelNoAggregation level: "NATIONAL", "STATE", or "COUNTY" (optional)
commodityYesCommodity name, e.g., "CORN", "SOYBEANS", "WHEAT", "CATTLE", "MILK", "COTTON"
stat_categoryNoStatistic category, e.g., "YIELD", "PRODUCTION", "AREA PLANTED", "AREA HARVESTED", "PRICE RECEIVED", "INVENTORY"

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesArray of up to 200 agricultural records
countYesNumber of records returned
truncatedYesTrue if results exceed 200 records and were truncated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "count": {
      +      "description": "Number of records returned",
      +      "type": "integer"
      +    },
      +    "data": {
      +      "description": "Array of up to 200 agricultural records",
      +      "items": {
      +        "properties": {
      +          "agg_level": {
      +            "description": "Aggregation level (NATIONAL, STATE, COUNTY)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "commodity": {
      +            "description": "Commodity name (e.g., CORN, SOYBEANS)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "county": {
      +            "description": "County name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "description": {
      +            "description": "Short description of the statistic",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "frequency": {
      +            "description": "Frequency (ANNUAL, MONTHLY, WEEKLY)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "period": {
      +            "description": "Reference period description",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "stat_category": {
      +            "description": "Statistical category (e.g., YIELD, PRODUCTION)",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "state": {
      +            "description": "State name",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "unit": {
      +            "description": "Unit of measurement",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "value": {
      +            "description": "Numeric or categorical value",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "year": {
      +            "description": "Year of the record",
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "truncated": {
      +      "description": "True if results exceed 200 records and were truncated",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "data",
      +    "truncated"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-nass-api-key",
      +    "commodity": "CORN",
      +    "stat_category": "YIELD",
      +    "state": "IOWA",
      +    "year": "2024"
      +  },
      +  {
      +    "_apiKey": "your-nass-api-key",
      +    "agg_level": "NATIONAL",
      +    "commodity": "SOYBEANS",
      +    "stat_category": "PRODUCTION",
      +    "year": "2020:2025"
      +  }
      +]
  3. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description adds minimal behavioral context beyond stating return data types; it does not disclose rate limits, error handling, or query limitations.

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 description is two sentences, front-loaded with purpose and includes a concrete example. It is efficient with no unnecessary words, though the example's mention of 'state_fips' conflicts with the schema's 'state' parameter.

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

Completeness2/5

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

With 10 parameters and an output schema, the description is too brief. It does not explain return format, pagination, or how multiple parameters interact. Annotations cover safety but the description lacks depth for a complex query 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 coverage is 100% with parameter descriptions. The description provides a single example but does not systematically explain parameter usage or constraints. Baseline 3 is appropriate; description adds marginal value.

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 description clearly states the tool searches USDA agricultural statistics by commodity, statistic, geography, and year, with a concrete example. It distinguishes from broader search tools but does not explicitly differentiate from sibling tools like nass_crop_production or nass_livestock, which are more specific.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its more specific siblings (e.g., nass_crop_production). It lacks explicit when-not-to-use or alternative recommendations.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.