Skip to main content
Glama

Get USDA Foods (Batch)

usda_get_foods
Read-only

Fetch nutrient profiles for 2–20 foods in a single API call. More efficient than calling usda_get_food N times when you already have multiple FDC IDs. All values are per 100g (no portion scaling). Use the nutrients[] filter to limit response size — strongly recommended for batch calls. For side-by-side comparison with a formatted table, use usda_compare_foods instead. Failed IDs (not found or no data) are reported in the failed[] array rather than aborting the entire batch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fdcIdsYesFDC IDs to fetch — 2 to 20 IDs. Use usda_search_foods to discover IDs.
nutrientsNoFilter to specific nutrient IDs (e.g. [1003, 1004, 1005, 1008]). Strongly recommended — full profiles can be large. Use usda_list_nutrients to look up IDs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
foodsNoSuccessfully fetched foods.
failedNoIDs that returned no data. Check these with usda_search_foods to verify they exist.

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses key behavioral details: values are per 100g with no portion scaling, and failed IDs are returned in a failed[] array rather than aborting the batch. It also strongly recommends the nutrients filter to limit response size. This adds meaningful context beyond annotations and does not contradict them.

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 four sentences, each carrying essential information: core purpose, efficiency rationale, unit context, filter recommendation, alternative routing, and failure behavior. No redundancy; front-loaded with the primary action.

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?

The description covers the critical aspects: batch scope, units, failure handling, and recommended filter. An output schema exists (which would explain the success response shape), so its absence here is acceptable. Minor gaps like rate limits or behavior when all IDs fail are not covered, but these are not essential for correct invocation.

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?

Both parameters are fully described in the schema (100% coverage), so the baseline is 3. The description reinforces the nutrients recommendation and adds efficiency context, but does not introduce additional format or semantic details for the parameters beyond what the schema already provides.

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 states a specific verb ('Fetch'), resource ('nutrient profiles'), and scope ('2–20 foods in a single API call'). It explicitly distinguishes itself from siblings by noting efficiency over usda_get_food and directing to usda_compare_foods for formatted tables, and references usda_search_foods and usda_list_nutrients for ID discovery.

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

Usage Guidelines5/5

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

It clearly tells when to use this tool (batch of multiple FDC IDs, more efficient than repeated calls) and points to an alternative (usda_compare_foods for side-by-side tables). It also reinforces the recommended nutrients filter and warns against large responses. The 2–20 range is stated explicitly, covering the main constraint.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: search for foods, retrieve single or batch nutrient profiles, compare foods side-by-side, and look up nutrient reference data. The descriptions explicitly cross-reference when to use which tool, eliminating ambiguity.

Naming Consistency5/5

All tool names follow a consistent 'usda_<verb>_<noun>' pattern, with verbs like search, get, get, list, compare. Plural/singular usage correctly reflects whether the tool handles one or many items, and the naming is predictable and readable.

Tool Count5/5

Five tools is well-scoped for a USDA food data server, covering search, retrieval (single and batch), comparison, and nutrient metadata lookup. Each tool earning its place with no redundancy or bloat.

Completeness5/5

The tool set fully covers the domain of querying USDA FoodData Central: discovery via search, detailed retrieval via get_food/get_foods, comparison via compare_foods, and reference data via list_nutrients. No obvious gaps exist for read-only access.