Skip to main content
Glama

Search foods

search_foods
Read-onlyIdempotent

Search the Swedish Food Agency's food composition database by name to retrieve food numbers for further nutrient queries.

Instructions

Search the Swedish Food Agency's food composition database (about 2,600 foods and dishes) by name. Returns food numbers to use with the other tools. All words in the query must appear in the name. Results are ranked, paginated, and include next_cursor when more matches exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo'analysed' = lab-analysed raw foods, 'calculated' = recipes and dishes computed from ingredients.any
limitNoResults per page (1-50).
queryYesWords to find in the food name, e.g. 'oat milk' or 'falukorv'.
cursorNonext_cursor from a previous call with the same query.
languageNoLanguage for food and nutrient names: 'en' (English) or 'sv' (Swedish). Defaults to the server setting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the safety profile is covered. The description adds meaningful behavioral details beyond annotations: exact multi-word matching ('All words must appear'), ranking, pagination, and next_cursor behavior. It does not detail the exact response shape, but for a search tool the description is sufficiently transparent.

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?

Three tight sentences cover purpose, output, matching behavior, and pagination with no filler. The most important facts are front-loaded: what the tool searches and what it returns.

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?

For a search tool with no output schemaanding, the description covers what it searches, how matching works, what it returns, and how pagination works. The remaining parameter details (limit, language, type) are fully covered by the schema, so nothing essential is missing for correct invocation.

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 schema already documents all five parameters. The description adds value by clarifying query semantics ('All words in the query must appear in the name') and the pagination contract tied to cursor ('include next_cursor when more matches exist'). This goes beyond simply restating parameter names.

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?

The description names a specific verb ('Search'), resource ('Swedish Food Agency's food composition database'), and method ('by name'), and states the key output ('food numbers to use with the other tools'). This clearly distinguishes search_foods from sibling tools like get_food or get_nutrients, which operate on already-known foods.

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?

The description implies the primary use case: find food numbers first, then use them with the other tools. It also gives important search behavior ('All words in the query must appear in the name') and pagination semantics. It does not explicitly name alternatives or exclusions, but the 'use with the other tools' statement provides clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.