Skip to main content
Glama

setCookedYield

Read-onlyIdempotent

Convert batch macro totals into per-100 g cooked values using measured cooked weight, your own yield factor, or a USDA yield lookup.

Instructions

Convert batch totals into per-100 g cooked values. Pass the measured cooked weight when you have it. Failing that, pass a yield factor you measured yourself, or a yieldHint to look one up in the bundled USDA tables. A hint matching several rows returns unresolved with candidates rather than choosing one. Note that rice and dried legumes gain weight: their yield factors are above 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawGYes
cookedGNoMeasured cooked weight. Wins over everything else.
yieldHintNoLook a factor up in the bundled USDA tables. Used only when neither cookedG nor yieldFactor is given, and only when exactly one row matches.
totalMacrosYes
yieldFactorNoYour own measured factor. Second choice.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawGYes
basisYes
statusYes
cookedGYes
warningsYes
yieldRowYes
arithmeticYes
candidatesYes
yieldFactorYes
per100gCookedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already provide readOnlyHint and idempotentHint. The description adds valuable non-obvious behavior: ambiguous yield hints return unresolved with candidates rather than auto-selecting, and rice/dried legumes have yield factors above 1. No contradiction with annotations.

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?

Four concise sentences with no filler. The purpose is front-loaded, and each sentence carries operational information: what the tool does, input precedence, ambiguity behavior, and a domain caveat.

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?

Covers purpose, parameter precedence, ambiguity handling, and a useful real-world caveat. An output schema exists, so return-value details are handled elsewhere; the only minor gap is lack of direct sibling differentiation.

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 60%, and the description compensates by explaining the meaning and precedence of cookedG, yieldFactor, and yieldHint, including when yieldHint is used. rawG and totalMacros are not deeply described, but their roles are inferable from the phrase 'batch totals' and the schema structure.

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?

Description states a specific operation: 'Convert batch totals into per-100 g cooked values', and identifies the key inputs (cooked weight, yield factor, yield hint). It is clear and distinct from the sibling list, though it does not explicitly name a sibling alternative.

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 an explicit precedence chain: cookedG first, then yieldFactor, then yieldHint, and notes the ambiguity behavior for multi-row hints. It gives clear context for how to choose inputs, though it does not contrast with related tools like portionBatch.

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