Skip to main content
Glama

Find their foods

search_foods
Read-onlyIdempotent

Use this when the person tells you a food they ate without a photo, before log_foods. Find the person's own foods before anything else, by name or by kind: the words they used ("protein powder", "milk", "my usual bread"), not a brand you guess. mine is their saved foods that fit, each with an id, macros per 100 g, their usual grams (lastGrams), match (name: its name holds the words; kind: it is that kind of food, so "protein powder" finds their whey; word: only the last of their words, the one that says what it is, fits, so it is a different food of that sort, never theirs unless they say so) and lastEatenAt. When none fits by name, recent lists the saved foods they logged lately: read it too, because their food is often named by brand (a protein powder called Impact Lean Whey, a milk called Light Start). list is at most three plain foods from the food list, each with a foodKey; logging one saves it as a new food of theirs. Use their own food (mine or recent) when it is the same thing, or the kind of food they named (their milk for "milk", their whey for "protein powder"); a food that only sounds alike or shares a word is not it (corn flour is not corn, dark soy sauce is not dark chocolate). "My most recent" or "my usual" means the one they ate latest. Use list, an estimate or create_food only when none of theirs is it, and say it's new. Search before estimating, and log what it finds by grams. A meal of several foods is one search: put them in one query separated by semicolons ("egg pasta; halloumi; butter; olive oil") and foods comes back with one result for each, so you can log the whole meal in your next step. A recipe has recipe set: its foods and their grams, serves, cookedGrams and gramsLeft, what's left of the pot. Do not use to read a photo; use read_meal_photo.

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": {
      "query": "<query>"
    },
    "name": "search_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe words they used for the food, such as "protein powder" or "my usual bread"; several foods separated by semicolons ("oats; milk; whey") come back as foods, one result each.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / query / description
      Added value: +"The words they used for the food, such as \"protein powder\" or \"my usual bread\"; several foods separated by semicolons (\"oats; milk; whey\") come back as foods, one result each."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive and closed-world, and the description adds genuine context on top: what the three match values mean (name/kind/word), that a 'word' match is a different food and 'never theirs unless they say so', that recent exists because their foods are often brand-named, and that list returns at most three foods that become new saved foods when logged. It also discloses the recipe payload fields. Some of this return-shape detail overlaps with the output schema, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The trigger and the when-not rule are front-loaded, which is good, but the middle collapses into a dense multi-clause parenthetical enumerating match values and their edge cases that is hard to parse in one pass. The content mostly earns its place, yet it would be clearer as short separate sentences or a compact list.

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 single-parameter, read-only search with an output schema and full annotation coverage, the description supplies the trigger, the precedence among mine/recent/list, the multi-food batching behavior, and the recipe payload shape. Nothing an agent needs in order to call it correctly is missing; the remaining gap is readability rather than omitted information.

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 coverage is 100%, so the baseline is 3, and the description adds meaning beyond it: use the person's own words rather than a brand the agent guesses, and semicolons fan out into one result per food so a whole meal can be logged next step. The long parenthetical on match semantics is about results rather than the query parameter, so the added value is real but partly misplaced.

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 and resource (find the person's saved foods) and pins the trigger precisely: 'when the person tells you a food they ate without a photo, before log_foods.' It explicitly separates itself from read_meal_photo and log_foods, so an agent can route correctly without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives when-to-use, when-not-to-use ('Do not use to read a photo; use read_meal_photo'), fallbacks in priority order (mine, then recent, then list/estimate/create_food), and a search-before-estimating rule. It also tells the agent to batch a whole meal into one semicolon-separated query, which is a concrete invocation instruction rather than vague advice.

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.