Skip to main content
Glama

parseIngredientLine

Read-onlyIdempotent

Parse an ingredient line into structured quantity, unit, ingredient, and preparation note, flagging ambiguous descriptors instead of resolving them.

Instructions

Split one ingredient line into quantity, unit, ingredient and preparation note. Reports what is ambiguous instead of resolving it: '1 medium onion' comes back flagged as a size descriptor, never as a weight in grams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawYes
nameYes
unitYesNormalized unit id such as 'tablespoon'. Null for bare counts.
unitRawYes
quantityYes
confidenceYes
ambiguitiesYes
preparationYesText after the first comma, such as 'diced'.
quantityMaxYesUpper bound when the line gives a range.
isGroupHeaderYes
sizeDescriptorYesWords like 'medium' or 'large'. Reported, never converted to grams.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The description goes beyond the annotations by disclosing a key behavioral trait: it reports ambiguity rather than resolving it, with a concrete example ('1 medium onion' flagged as a size descriptor). This is exactly the kind of contextual behavioral detail that helps an agent anticipate tool output, especially with readOnly and idempotent hints already present.

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?

The description is two sentences, front-loaded with the primary function and followed by a helpful behavioral example. There is no filler or redundant repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return structure, annotations cover harmlessness and idempotency, and the description covers the important ambiguity-handling nuance. For a single-parameter parser with rich surrounding structured data, nothing necessary for correct invocation 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 0%, so the description carries the weight. It explains that the 'line' parameter is an ingredient line and illustrates the expected structure via the example and output categories. It does not specify formatting rules or edge cases, but with only one simple string parameter, this is a strong compensation.

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?

The description clearly states the verb 'Split' and the resource, 'one ingredient line', and enumerates the output categories: quantity, unit, ingredient, and preparation note. It also distinguishes itself from siblings by focusing on a single line, unlike parseRecipe, and defines its parsing scope explicitly.

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

Usage Guidelines3/5

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

The description makes it clear that this tool operates on a single ingredient line, which implies when it should be used. However, it does not explicitly state when not to use it, mention parseRecipe as the alternative for multi-line/recipe input, or provide exclusion criteria.

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