Skip to main content
Glama

Matdata – Swedish food composition data

Get food nutrition

get_food
Read-only

All nutrient values for one food (energy, macronutrients, fatty acids, vitamins, minerals), per 100 g or scaled to a given amount in grams. Includes portion sizes, category and source attribution.

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": {
      "id": "<id>"
    },
    "name": "get_food"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesFood id from search_foods
gramsNoOptional amount in grams to scale values to (default 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real behavioral value beyond that: it discloses the scaling rule (per 100 g default, or scaled to a given gram amount) and what the payload contains, including portion sizes and source attribution.

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?

It is a single well-formed sentence that front-loads the core resource and then the return contents and scaling rule. Every clause carries information, though the nutrient parenthetical is slightly long relative to its value.

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?

There is no output schema, so the description must carry return-value information, and it does by listing the nutrient groups plus portion sizes, category, and source. For a simple two-parameter read tool, the only real gap is the absence of routing guidance to the sibling comparison and reference-value tools.

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%, so both parameters are already documented in structured form. The description restates the grams scaling and the 100 g default but adds no new syntax, bounds, or edge-case behavior (e.g., value rounding when scaling), so it sits at the baseline.

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 resource ('all nutrient values for one food') and enumerates the nutrient groups and ancillary data (portion sizes, category, source attribution) that come back. The phrase 'for one food' distinguishes it in scope from compare_foods or search_foods, though it never names those siblings 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?

Usage is only implied: an agent can infer this is the detail-fetch step after search_foods, since the description scopes it to a single food. There is no explicit when-to-use, when-not-to-use, or pointer to compare_foods/get_reference_values for the alternative cases.

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