Skip to main content
Glama

Scale a portion

calculate_portion
Read-only

Scale one food to a gram weight and return calories and macros. Use after search_foods when the user gives an amount.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gramsYesWeight in grams
food_idYesfood_id from search_foods

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds that it returns calories and macros, but that is largely redundant with the existing output schema; no auth, rate-limit, or accuracy caveats are disclosed. Adequate given the annotation coverage, but not rich.

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 short sentences, front-loaded with the action and result, with the usage rule second. No filler or 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?

With an output schema documenting the return values and annotations covering the safe-read profile, the description needs only to state the transformation and the entry condition, which it does. Nothing essential is missing, though it could note how it differs from get_food_nutrition.

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?

Schema description coverage is 100%, so both parameters (grams, food_id) are already documented, including that food_id comes from search_foods. The description adds no syntax, unit, or range detail beyond the schema, so the baseline 3 applies.

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 specific verb (scale), resource (one food), input basis (a gram weight), and output (calories and macros), so the agent knows exactly what it does. It doesn't explicitly contrast with the closer sibling get_food_nutrition, leaving the boundary to inference.

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?

"Use after search_foods when the user gives an amount" is a clear sequencing rule and trigger condition, which is genuinely useful. It stops short of an explicit exclusion (e.g. when to prefer get_food_nutrition), so it is clear context rather than full when/when-not guidance.

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