Skip to main content
Glama

Get Nutrient Contributions

get_nutrient_contributions
Read-only

Which foods in the user's diary supplied a nutrient on a given day, largest first, optionally for one meal.

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": {
      "date": "<date>",
      "code": "<code>"
    },
    "name": "get_nutrient_contributions"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesNutrient code from list_components, such as FE for iron.
dateYesThe day, YYYY-MM-DD.
mealNoLimit to one meal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, non-destructive, closed world), so the description's job is to add semantics beyond that — and it does, disclosing that results are ordered largest-first and scoped to diary entries for one day. It stops short of describing units, cutoffs, or how foods with zero contribution are handled.

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?

A single sentence that front-loads the core question (which foods supplied a nutrient) followed by the day scope, ordering, and optional meal narrowing. No filler and nothing redundant.

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?

For a read-only, three-parameter lookup with fully documented schema and annotation coverage, the description supplies what an agent needs to call it correctly, including the ordering of results. The absence of an output schema means the return shape is only loosely conveyed, which keeps it from a 5.

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%, with code, date format, and the meal enum all documented in the schema itself. The description restates the day and optional meal scoping but adds no syntax or constraint detail beyond that, so 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?

The description names a specific retrieval: the foods in the user's diary that supplied a given nutrient on a given day. That is clearly distinct from siblings like get_nutrient_stats and get_nutrient_gaps, which are aggregate/gap-oriented rather than source-attribution. It does not explicitly name those alternatives, which keeps it just short of a 5.

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 'which foods supplied X on a given day' framing implies the use case (source attribution) well enough for an agent to select it. However, there is no explicit when-to-use versus when-not guidance and no named alternative for the adjacent questions (stats, gaps, high-in-nutrient search).

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