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: 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. No real label numbers yet -> 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 the tool does not recognize is skipped and reported back in the result, never silently dropped.

SELECTOR: exactly one; id if known, else name (exact case-insensitive match, then a unique case-insensitive prefix match). Ambiguous or unmatched name -> error listing candidate ids, nothing written.

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": {
      "nutrients": "<nutrients>"
    },
    "name": "set_supplement_nutrients"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoSupplement/medication ID.
nameNoItem name: an exact match if one exists, else a unique prefix match, case-insensitive.
replaceNotrue (default) replaces all stored nutrients for this item; false merges, 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

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"Supplement/medication ID. Alternative to name."New value: +"Supplement/medication ID."
    • changedInput schema / properties / name / description
      Previous value: -"Alternative to id: resolved as an exact match if one exists, else a unique prefix match, case-insensitive."New value: +"Item name: an exact match if one exists, else a unique prefix match, case-insensitive."
    • changedInput schema / properties / nutrients / items / properties / nutrient / description
      Previous value: -"Nutrient name as printed on the label (e.g. \"vitamin d\", \"calcium\", \"magnesium\")."New value: +"Nutrient name as printed on the label, e.g. \"vitamin d\", \"calcium\", \"magnesium\"."
    • changedInput schema / properties / nutrients / items / properties / unit / description
      Previous value: -"Unit as printed on the label (e.g. mg, mcg, IU, g)."New value: +"Unit as printed on the label, e.g. mg, mcg, IU, g."
    • changedInput schema / properties / replace / description
      Previous value: -"true (default) replaces all stored nutrients for this item; false merges these into the existing set, overwriting only the given nutrient keys."New value: +"true (default) replaces all stored nutrients for this item; false merges, overwriting only the given nutrient keys."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (non-read-only, idempotent, non-destructive, closed-world), and the description adds behavior the annotations cannot convey: unrecognized nutrient names or units are 'skipped and reported back in the result, never silently dropped,' and an ambiguous selector produces an error listing candidates with 'nothing written.' It also discloses the hard constraint that values must never be estimated, which governs whether the agent should call at all.

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?

Front-loaded with purpose, then usage triggers, then the hard constraint, then dose semantics, then the selector rule — a sensible ordering with labeled sections. It is slightly long and repeats some schema content (selector resolution, replace semantics), but no sentence is filler.

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 values needn't be described, and the description still flags the one return behavior that matters (skipped unrecognized nutrients reported back). For a mutation tool with four parameters and full schema coverage, nothing an agent needs in order to call it correctly 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 description coverage is 100%, so the baseline is 3; the description earns an increment by clarifying the per-dose denominator of the amounts and the derivation of daily totals from frequency_type/times_per_period, plus restating the selector resolution order (id first, then exact case-insensitive name, then unique prefix). It does not add usage examples or edge-case guidance for the replace/merge flag beyond what the schema already says.

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 specific verb and resource with an explicit scope: 'Set the nutrient content of ONE configured dose of a medication or supplement, as printed on its label.' It also pre-empts confusion with adjacent concepts by declaring the amounts are 'not per individual unit and not a daily total,' which separates it from target-setting and logging siblings without naming them.

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

Usage Guidelines5/5

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

Provides an explicit 'use:' trigger list (user shares a Supplement Facts panel, states amounts from a label, corrects a stored value) and a concrete when-not rule: 'No real label numbers yet -> ask for the label instead of calling this.' That is both positive and negative routing guidance, which is rare and directly actionable.

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.