Skip to main content
Glama

set_supplement_nutrients

Idempotent

Set the nutrient content of ONE configured dose of a medication or supplement, as printed on its label. Use when the user shares a Supplement Facts / Nutrition Facts panel, states specific nutrient amounts from a label, or corrects a previously stored value.

VALUES MUST COME FROM THE PRODUCT LABEL OR THE USER'S EXPLICIT STATEMENT. Never estimate or guess a nutrient amount. If the user hasn't given real label numbers, ask for the label instead of calling this.

Amounts are per the dose already configured on the row (dose_amount/dose_unit, e.g. "2 capsules"), not per individual unit and not a daily total. Daily totals are derived separately from frequency_type/times_per_period. A nutrient name or unit this tool doesn't recognize is skipped and reported back in the result rather than silently dropped.

SELECTOR: pass id if known, or name: resolved as an exact case-insensitive match, then a unique case-insensitive prefix match. Ambiguous or unmatched name errors listing candidate ids, without writing. Exactly one of id or name is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSupplement/medication ID. Alternative to name.
nameNoAlternative to id: resolved as an exact match if one exists, else a unique prefix match, case-insensitive.
replaceNotrue (default) replaces all stored nutrients for this item; false merges these into the existing set, overwriting only the given nutrient keys.
nutrientsYesThe label's Supplement Facts per serving, for one configured dose. See the VALUES MUST COME FROM THE PRODUCT LABEL note above.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations (readOnly=false, idempotent=true, destructive=false): unrecognized nutrient names/units are skipped and reported in the result rather than silently dropped, and ambiguous or unmatched names error out listing candidate ids without writing. It also clarifies the dose-basis semantics and the replace-vs-merge default that the schema only sketches.

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 and the strongest constraint (values must come from the label) are front-loaded, and the paragraphing separates values, dose basis, and selector logic. It runs long for four parameters, and the all-caps warning in mid-text is a touch heavy, but nearly every sentence carries actionable content.

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?

An output schema exists, so return-value explanation is unnecessary, and the description still notes the useful result signal (skipped nutrients reported back). Guidance, guardrails, dose semantics, and selector/error behavior are all covered for a 4-parameter mutation tool.

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%, so baseline is 3, but the description goes further: amounts are per the already-configured dose (dose_amount/dose_unit), not per individual unit and not a daily total, and it spells out the selector resolution order (id, else exact case-insensitive name, else unique prefix). Both points reinforce, rather than merely restate, the schema.

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?

States a precise verb+resource+scope: setting nutrient content for ONE configured dose of a supplement/medication, as printed on the label. This clearly separates it from siblings like set_nutrient_target (daily targets), manage_supplement (supplement CRUD), and log_supplement_taken. An agent can identify the tool from the first sentence alone.

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 triggering conditions are given (user shares a Supplement Facts panel, states label amounts, or corrects a stored value) plus a hard exclusion: never estimate, ask for the label instead if the user hasn't given real numbers. The gap is that it never names the sibling to use instead for adjacent tasks (e.g. manage_supplement to create the item, set_nutrient_target for daily targets).

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.