Skip to main content
Glama

Nutrition & Calories: Calculate a meal or recipe

nutrition_calculateMeal
Read-onlyIdempotent

Calculate a meal or recipe

The nutrients of a meal or recipe: items lists <food>:<grams> pairs, comma-separated (up to 30). A food is an id or a name (the best match is used and named in the answer, so check it); grams as 150, 150g or 1.5kg. Answers each item's amounts and meta.totals; meta.partial lists nutrients some item had no value for (their totals add the known ones). Use when the user asks for the calories or macros of a dish, a recipe or a day's meals.

GET /v1/nutrition/calculate on Nutrition & Calories (SBX-BESIN). Costs 1 credit per call.

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": {
      "items": "<items>"
    },
    "name": "nutrition_calculateMeal"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYese.g. `domates:150,beyaz peynir:50,zeytinyağı:10g` or `170457:150`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety and idempotency, yet the description adds real behavioral context: cost of 1 credit per call, the 30-item cap, best-match name resolution with a warning to verify, and the meaning of meta.partial when nutrient values are missing. Return semantics are disclosed rather than left implicit; only error behavior for unresolvable foods is unaddressed.

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?

Front-loaded with the purpose line and then dense, all-information-bearing detail; nothing is filler. The middle sentence is long and run-on, which costs a little readability, but no sentence is redundant.

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?

No output schema exists, and the description compensates by explaining the per-item answers plus meta.totals and meta.partial. For a single-parameter, annotation-rich tool with disclosed cost and input limits, the definition covers what an agent needs; only failure behavior for bad food names is missing.

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

Parameters4/5

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

Schema coverage is 100% and the schema already shows a formatted example, but the description still adds meaning: the 30-pair limit, accepted gram formats (150 / 150g / 1.5kg), and that an item may be a numeric id or a name resolved by best match. That is substantive beyond the schema, though the shape itself is already hinted at by the schema example.

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?

'Calculate a meal or recipe' plus 'The nutrients of a meal or recipe' is a specific verb+resource, and the description distinguishes it from food-lookup siblings by noting that food names must be resolved and appear in the answer. An agent can tell this is the aggregation/macro-computation tool rather than a lookup tool.

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?

Explicit trigger given: 'Use when the user asks for the calories or macros of a dish, a recipe or a day's meals,' which is a clear use case. It does not, however, state when not to use it or point to a sibling (e.g. searchFoods) for resolving an unknown food name, so alternatives are only implied by the 'check it' caveat.

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