Skip to main content
Glama

Search Foods

search_foods
Read-onlyIdempotent

Search USDA Food Data Central for food items by name, brand, or ingredient. Supports filtering by data type (Branded, Foundation, SR Legacy, Survey FNDDS, Experimental) and brand owner. Returns FDC id, description, data type, and publication date per result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesFree-text — name / brand / ingredient
sort_byNodataType.keyword | lowercaseDescription.keyword | fdcId | publishedDate (default relevance)
data_typeNoFilter to data type(s). Comma-sep. Options: Branded | Foundation | Survey (FNDDS) | SR Legacy | Experimental
page_sizeNo1-200 (default 50)
sort_orderNoasc | desc
brand_ownerNoRestrict to a brand owner
page_numberNo1-based page (default 1)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foodsNoArray of food items matching search
totalHitsNoTotal number of matching foods
currentPageNoCurrent page number
foodSearchCriteriaNoSearch criteria used

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "query": "organic whole milk"
      +  },
      +  {
      +    "brand_owner": "Perdue",
      +    "page_size": 25,
      +    "query": "chicken breast",
      +    "sort_by": "publishedDate",
      +    "sort_order": "desc"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Search results from USDA FDC food items",
      +  "properties": {
      +    "currentPage": {
      +      "description": "Current page number",
      +      "type": "number"
      +    },
      +    "foodSearchCriteria": {
      +      "description": "Search criteria used",
      +      "type": "object"
      +    },
      +    "foods": {
      +      "description": "Array of food items matching search",
      +      "items": {
      +        "properties": {
      +          "dataType": {
      +            "description": "Type of food data (Branded, Foundation, etc.)",
      +            "type": "string"
      +          },
      +          "description": {
      +            "description": "Food description",
      +            "type": "string"
      +          },
      +          "fdcId": {
      +            "description": "FDC food identifier",
      +            "type": "number"
      +          },
      +          "publishedDate": {
      +            "description": "Date food was published",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totalHits": {
      +      "description": "Total number of matching foods",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds that results include FDC id, description, data type, and publication date. It does not mention pagination behavior or rate limits, but the schema covers page_size and page_number. No contradiction with annotations.

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

Conciseness5/5

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

The description is two sentences long, front-loads the action and resource, and includes key filtering options and return fields. Every word adds value with no filler.

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?

Given the tool has 7 parameters and an output schema, the description covers the core search capability, filtering, and return fields. It does not detail sorting or pagination, but the schema provides that. Overall, it is sufficiently complete for an agent to understand the 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%, so the schema already documents all 7 parameters with descriptions. The description only restates that filtering by data type and brand owner is supported, adding no new semantic value beyond the schema. Baseline 3 is appropriate.

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 description uses the specific verb 'search' and identifies the resource as 'USDA Food Data Central'. It clearly states the tool searches for food items by name, brand, or ingredient, with filtering capabilities. This distinguishes it from siblings like 'list_foods' and 'get_food'.

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

Usage Guidelines3/5

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

The description mentions filtering by data type and brand owner, which implies usage context but does not explicitly state when to use this tool over alternatives like 'list_foods' (which likely retrieves all) or 'get_food' (single item). No when-not or exclusion criteria are provided.

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.