Skip to main content
Glama

Analyze a meal

analyze_meal
Read-onlyIdempotent

Totals nutrients across several foods and assesses the meal.

assessment.shortfalls lists missed targets, worst first, and assessment.over_limit lists exceeded limits. not_reported lists nutrients with no data in the food records; those are unknown, not zero. failed lists items left out of the total, and partial is true when there are any.

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": "analyze_meal"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesFoods in the meal, 1-25, each an fdc_id with grams, e.g. [{"fdc_id": 168462, "grams": 150}].

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world, so the safety profile is free. The description adds real behavioral disclosure beyond that: 'failed' items are silently excluded from the total and 'partial' flags that condition, which is critical for an agent interpreting results. It also clarifies that unreported nutrients are unknown rather than zero. It does not say where the target/limit values come from (presumably the profile), which would have completed the picture.

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?

Purpose is front-loaded in the first sentence, followed by a compact field-semantics block. Sentences are short and earn their place; the only mild weakness is that field names like 'failed' and 'shortfalls' are explained without a framing clause tying them to the assessment object.

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 tool is simple (one param, output schema present), and the description still explains how to read the assessment fields, which the schema alone would not convey. The main omission is the origin of the targets and limits the meal is judged against, which an agent would need in order to explain results to a user.

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?

There is a single parameter with 100% schema description coverage, and the schema already documents the fdc_id/grams shape, the default of 100 grams, and the 1-25 bound. The description adds nothing about parameters, which is acceptable at this coverage level but is the baseline, not a value-add.

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?

States a concrete verb+resource: 'Totals nutrients across several foods and assesses the meal.' That clearly distinguishes it from lookups like get_food_nutrition or compare_foods. It does not explicitly differentiate itself from analyze_recipe or analyze_plan, so it stops short of a 5.

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

Usage Guidelines2/5

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

There is no explicit when/when-not guidance and no named alternative. The agent must infer that this is the multi-food aggregation path versus analyze_recipe (recipe context) or get_food_nutrition (single food) from the wording 'several foods' alone. Usage is only implied, not stated.

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