Skip to main content
Glama

Matdata – Swedish food composition data

Compare foods

compare_foods
Read-only

Compare 2–6 foods side by side on the main nutrients per 100 g.

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": {
      "ids": "<ids>"
    },
    "name": "compare_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesFood ids from search_foods
langNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description usefully discloses that output is normalized per 100 g and limited to 'main nutrients', but it does not say which nutrients qualify, whether result order matches the input id order, or how unknown/invalid ids are handled — real behavioral questions for a comparison call with no output schema.

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?

One tight sentence with the key constraint and normalization basis front-loaded; nothing is padded. It is arguably too terse for the amount it leaves unsaid, but there is no wasted wording.

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

Completeness3/5

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

For a simple read-only tool with no output schema, the description covers the essentials, but 'main nutrients' is undefined and an agent must guess what gets returned. A brief note on nutrient coverage and on the get_reference_values sibling would close the gap.

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?

The '2–6' range merely restates minItems/maxItems already enforced by the schema, adding no new meaning. The ids parameter is documented in the schema itself (food ids from search_foods), while lang is only self-explanatory through its sv/en enum; at 50% description coverage the description neither compensates for lang nor clarifies semantics such as ordering or id resolution.

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?

A specific verb (compare) plus resource (foods), with cardinality and normalization basis (per 100 g) stated up front. That scope naturally separates it from the single-item get_food sibling, though no sibling is named 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 by the plural 'compare 2–6 foods side by side' — the agent can infer this is the multi-item path, but there is no explicit when-to-use, when-not-to-use, or pointer to get_food/top_foods as the alternative for single or ranked lookups.

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