Skip to main content
Glama

getFoodMacros

Read-onlyIdempotent

Get per-100 g macros and portion weights for a USDA food ID, plus the energy nutrient used, to support accurate recipe and portion math.

Instructions

Per-100 g macros for one USDA food id, with its portion weights. Also reports which energy nutrient was used, since Foundation foods report Atwater factors rather than a plain energy value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fdcIdYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fdcIdYes
budgetYes
per100gYes
dataTypeYes
portionsYes
fromCacheYes
descriptionYes
energySourceYes
foodCategoryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered. The description adds genuinely useful behavioral nuance: Foundation foods report Atwater factors rather than a plain energy value, and the tool reports which energy nutrient was used. This goes beyond what annotations or the schema alone would convey.

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?

Two sentences with no filler. The main function is front-loaded, and the second sentence adds a relevant edge case without bloating the description. Every sentence earns its place.

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 single-parameter, read-only tool with a rich output schema and strong annotations, the description is nearly complete. It covers output content, portion weights, and an important energy-value nuance. The only missing piece is guidance on where fdcId comes from or when to prefer a sibling tool, but that is not critical for invoking it correctly.

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

Parameters2/5

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

With schema description coverage at 0%, the description carries the full burden, but it only says 'USDA food id.' The schema already shows fdcId is a positive integer, so the description adds little beyond restating the property name. It does not explain how to obtain a valid fdcId or connect it to searchFood.

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 returns per-100 g macros for one USDA food id, plus portion weights. It is specific about scope ('one USDA food id') and output, which separates it from batch tools like computeBatchMacros. However, it never explicitly names a sibling or contrast, so it falls just short of full differentiation.

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?

Usage is implied: call this when you need macros for a single USDA food id. There is no explicit when-to-use, when-not-to-use, or alternative routing despite siblings like searchFood, lookupBarcode, and computeBatchMacros existing. The context is clear enough, but exclusions are absent.

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