Skip to main content
Glama
SpyrosBou

USDA FoodData Central MCP Server

by SpyrosBou

Macros for Portion

macros_for_portion
Read-onlyIdempotent

Retrieve calorie, protein, fat, and carbohydrate values for a specified portion size of a USDA FoodData Central food item.

Instructions

Return calories, protein, fat, and carbohydrates for a specific USDA-defined portion of a FoodData Central entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fdcIdYes
portionIdNo
portionIndexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
summaryYes
nutrientsYes
Behavior3/5

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

Annotations already declare read-only and idempotent behavior, so the safety profile is clear. The description adds no further behavioral details, such as how portionId vs portionIndex are resolved or error cases. It is sufficient but not enriching.

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 a single, front-loaded sentence that clearly states the action and result. No extra words or redundancy.

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

Completeness3/5

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

With an output schema present, return values are covered. However, the description does not explain which parameter to use under which circumstances, leaving ambiguity around portionId vs portionIndex. It is minimally complete for a read-only tool but misses crucial context for correct invocation.

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?

Input schema has 0% coverage and no descriptions. The description mentions 'FoodData Central entry' and 'USDA-defined portion', which loosely maps to fdcId and portionId/portionIndex, but does not explain the distinction between portionId and portionIndex or that fdcId is required. The description fails to fully compensate for the schema's lack of parameter documentation.

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 clearly states the tool returns calories, protein, fat, and carbohydrates for a specific USDA-defined portion of a FoodData Central entry. This distinguishes it from siblings like get_macros (which likely returns macros for a whole food entry) and list_portions (which lists portions).

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

Usage Guidelines4/5

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

The description implies the tool is used when you need macro values for a specific portion rather than the entire food entry. It provides context but does not explicitly mention alternatives or when not to use it. The mention of 'USDA-defined portion' gives a clear use case.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SpyrosBou/USDA-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server