Skip to main content
Glama

Search foods

search_foods
Read-onlyIdempotent

Searches USDA FoodData Central by food name.

Each match has an fdc_id, its dataset, key macros per 100 g, and, for branded products, USDA's verbatim ingredient statement. ingredients_available is false when USDA supplied no ingredient statement for that record. Results are paged, and pagination.next_offset is null on the last page.

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": {
      "query": "<query>"
    },
    "name": "search_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoResults per page, 1-50. Defaults to 10.
queryYesFood name, e.g. raw spinach or cheddar cheese.
offsetNoResults to skip, from pagination.next_offset. Defaults to 0.
data_typeNoOne USDA dataset. Foundation and SR Legacy are unbranded whole foods, Branded is packaged products, and Survey (FNDDS) is prepared dishes. Omitted, all four are searched.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description still earns credit by disclosing the record shape (fdc_id, dataset, macros per 100 g, verbatim ingredient statement) and the ingredients_available=false condition for missing statements.

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?

Opens with the core purpose and then layers result shape and pagination in three tight sentences with no filler. Some of the return-field detail is redundant with the output schema, keeping it short of a 5.

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?

Covers the essentials for a paged search: what is searched, what each match contains, the missing-ingredient flag, and the end-of-pagination signal (next_offset null). With an output schema present, the extra return-value detail is a bonus rather than a requirement, and nothing critical is missing.

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% and each parameter is documented in-schema, including the data_type dataset mapping. The description adds only the 'by food name' scoping for query and nothing new about limit, offset, or dataset semantics, so the baseline 3 applies.

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?

States a specific verb and resource ('Searches USDA FoodData Central by food name'), which separates it from nutrient-first tools like find_foods_by_nutrient. It never names a sibling explicitly, so the distinction is inferred rather than stated.

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 phrase 'by food name' implies when this tool applies, and the data_type explanation conveys dataset choices. However, there is no explicit when-to-use or when-not guidance pointing at alternatives such as lookup-by-id or nutrient filtering, so routing is left to inference.

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.

Resources