Skip to main content
Glama

search_foods

Read-only

Search USDA FoodData Central and Open Food Facts for foods matching a query, returning candidates with macros and a source you can show the user. IMPORTANT: the macros are PER 100 g (see each candidate's serving) — scale them to the portion the user actually ate before logging with log_meal. A candidate MAY also carry serving_grams/serving_label for ONE household serving (e.g. 48 g / "1 frank") — when present, offer the user 'N servings' instead of asking for grams, but still scale the per-100 g macros to the resolved grams before logging. When you log a chosen candidate, pass its source to log_meal so the diary records real provenance (USDA/Open Food Facts) instead of an estimate. SAFETY: all calorie and macro values here — including carbohydrates — are ESTIMATES (from USDA / Open Food Facts or the user's own entry), approximate and not lab-measured or per-batch. They are for general nutrition tracking ONLY. Do NOT use them for insulin dosing, carb-counting for a bolus, blood-glucose prediction, or any other medical decision, and do NOT compute a dose or glucose estimate from them. For anything medical, direct the user to the product's own label and their care team.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax candidates to return (default 5, clamped to 1–10).
queryYesFood to search, e.g. 'greek yogurt' or 'Chipotle chicken'.

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, it discloses per-100g scaling, optional serving_grams/serving_label usage, provenance passing, and a thorough safety warning about estimates not being for medical decisions. This is rich behavioral context that prevents misuse.

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?

Every sentence serves a purpose: purpose, scaling instruction, serving-size handling, provenance guidance, and safety. The 'IMPORTANT' and 'SAFETY' callouts structure the information effectively. It is long but not wasteful.

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?

With no output schema, it sufficiently explains return values (macros, source, serving_grams/serving_label) and the necessary workflow (scaling, passing source to log_meal). It also includes essential safety context for a nutrition-related tool. The description fully equips the agent to use the tool correctly.

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 descriptions cover 100% of both query and limit, so the description adds no extra parameter-level meaning. The baseline of 3 applies because the structured data already handles parameter semantics.

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 clearly states the specific action (search) and resources (USDA FoodData Central and Open Food Facts), and defines the output (candidates with macros and a source). This distinguishes it from related tools like lookup_barcode or log_meal.

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?

Provides clear context: use for free-text food searching, scale per-100g macros, pass source to log_meal, and note the safety limitation. It doesn't explicitly mention alternatives like lookup_barcode, but it gives strong sequencing guidance with log_meal.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: pantry vs diary vs food search vs preferences vs diagnostics. Even similar tools like get_day/get_range are clearly differentiated by scope, and search_foods/lookup_barcode are distinguished by input type (text vs barcode).

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with lowercase snake_case (add_pantry_item, get_day, log_meal, search_foods). The only exception is whoami, which is a standard diagnostic convention and does not disrupt the overall consistency.

Tool Count5/5

With 12 tools, the server is well-scoped for its food-tracking domain. Each tool covers a necessary function (pantry CRUD, diary CRUD, food search, preferences, diagnostics) without redundancy or bloat.

Completeness5/5

The tool set provides full lifecycle coverage for the core domain: pantry items can be added, read, and removed (upsert covers update); diary entries can be created, read (single/day/range), updated, and deleted; food lookup includes text search and barcode; and preferences are accessible. No obvious gaps hinder agent workflows.

Resources