Skip to main content
Glama

nutrition_recipe

Calculate total nutritional values for a recipe by summing weighted ingredients. Use for meal planning and recipe analysis.

Instructions

Sum nutrition across a recipe of weighted ingredients. Use this for meal planning, recipe analysis, or any "what are the totals if I combine X grams of A with Y grams of B" task. Each food's per-100g nutrition is scaled by grams/100 then summed. Charges $0.005 USDC per call.

Args: ingredients: List of {"fdc_id": int, "grams": float} pairs. At least one; weights in grams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ingredientsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations provided, so description carries full burden. It explains the scaling and summation logic. Discloses pricing but does not mention rate limits or error handling. Overall transparent for a pure computation tool.

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?

4 sentences, each valuable: purpose, usage examples, technical detail, parameter spec. Front-loaded with key info, no redundancy.

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 output schema exists, description covers purpose, usage, parameter, cost, and computation. Missing error scenarios but adequate for a single-param tool with good structure.

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

Parameters5/5

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

Schema coverage 0% means description is crucial. It specifies ingredient list must contain fdc_id (int) and grams (float) pairs, min length 1, and weights in grams. This fully compensates for the vague schema.

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?

Clearly states the tool sums nutrition across weighted ingredients, with specific verb 'Sum' and resource 'nutrition across a recipe'. It distinguishes from siblings (compare, detail, search) by focusing on aggregation.

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?

Provides explicit use cases: meal planning, recipe analysis, combining ingredients. Mentions cost per call. Lacks explicit when-not-to-use or direct comparison to siblings, but usage context is clear.

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/Younghef/nutriref-api'

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