Skip to main content
Glama

Get Food

get_food
Read-only

Full detail for one food by id: nutrition, measures, ingredients if it is a recipe (each quantity counts its unit, a measure of that ingredient, and grams is the weight), data sources, variants, the other versions of the same food, and compared_in, the national food composition databases that also have this food, for a side-by-side comparison. Each nutrition value has its unit and is for nutrition_per_grams grams of the food: 100 g for most foods, one serving for some recipes. Energy (ENERC) is in kJ: divide by 4.184 for kcal, which US labels and users call calories. A nutrient marked estimated was worked out rather than measured or printed for this food, for example from a label's ingredients or from other nutrients: a fair approximation, not an error. Database values describe a typical version of a food, so a specific product can differ.

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": {
      "food_id": "<food_id>"
    },
    "name": "get_food"
  }
}

Input Schema

NameRequiredDescriptionDefault
food_idYesThe food id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already cover the read-only/non-destructive/closed-world profile, and the description adds genuinely new behavioral context: that nutrients may be marked `estimated` (approximation, not error), that values describe a typical food so specific products can differ, and that ENER C is in kJ requiring division by 4.184. These interpretation rules cannot be derived from the annotations or 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?

Front-loaded with the core purpose in the first clause, and every subsequent sentence carries substantive meaning. It is a dense single block of run-on clauses, though, and could be broken up for scanability.

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?

With no output schema, the description carries the burden of explaining return values and does so thoroughly: ingredient quantity semantics, variants, compared_in, and nutrient units. It omits error behavior for an unknown food_id and any size/truncation expectations for recipes.

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?

Only one parameter (food_id) with 100% schema description coverage, so the baseline is 3. The description restates that lookup is by id but adds no format, range, or sourcing guidance beyond the schema.

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?

States a specific verb and resource: "Full detail for one food by id", and enumerates what the payload contains (nutrition, measures, ingredients, data sources, variants, compared_in). The 'one food by id' phrasing implicitly separates it from list/search siblings like find_foods_high_in_nutrient, though it never names an alternative.

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: the agent must infer it should call this when it already holds a food_id and needs full detail rather than a list. There is no explicit when-to-use/when-not guidance or prerequisite (e.g. 'obtain ids from a search tool first'), leaving routing to inference.

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