Skip to main content
Glama

search_foods

Read-only

Search the food database (page through with page/pageSize); use get_food_details for servings and nutrition.

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
pageNo
queryYes
pageSizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

The readOnlyHint annotation already tells the agent this is a safe read, so the description only needs to add operational context. It correctly discloses pagination behavior (page/pageSize) and the handoff to a detail call, but says nothing about match semantics (fuzzy vs exact vs ranked) or what a result row contains. Reasonable for a read-only search, but thin.

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?

A single sentence, parenthetically structured, with zero filler. The paging note and the sibling handoff are both front-loaded rather than buried.

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?

There is no output schema, so the description is the only place an agent could learn what a search returns and, critically, that results carry the food identifier needed to call get_food_details. The description never states that link, leaving a real gap for a multi-step workflow.

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 0%, so the description must compensate for all three parameters. It names page and pageSize and frames them as paging controls, which adds purpose beyond the bare integer schema, but it never characterizes the required query parameter (matching behavior, expected format) and omits the pageSize cap of 50 that constrains clients.

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?

States a specific verb and resource ("Search the food database") and immediately distinguishes itself from the sibling get_food_details by scoping this tool to lookup rather than detail retrieval. An agent can tell the two apart without opening either schema.

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?

Explicitly routes the agent to get_food_details when servings and nutrition are needed, which is the key chaining decision for this domain. It does not address lookup_food_barcode, the other plausible alternative in the sibling list, so the routing guidance is clear but not exhaustive.

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.