Skip to main content
Glama

top_foods

Read-only

Rank foods by protein, carbs, fat, or calories per 100 g with optional category filtering and ascending or descending order; sport supplements are excluded unless requested.

Instructions

Rank foods by a nutrient per 100 g, e.g. the most protein among fish, or the lowest-calorie fruits. Sport supplements are left out unless asked for, so the ranking shows real food.

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": {
      "nutrient": "<nutrient>"
    },
    "name": "top_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
lowestNoTrue = least of the nutrient instead of most
categoryNoOptional category filter, see list_categories
nutrientYes
include_supplementsNoInclude protein powders and other sport supplements (category 'Спорт')

Output Schema

NameRequiredDescriptionDefault
resultYes

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 only declare readOnlyHint and openWorldHint, so the description carries the interesting behavioral detail itself: results are normalized per 100 g (not per serving), and sport supplements are silently filtered out by default. It doesn't mention the 50-item cap or how ties/zero-value foods are handled, but the default-filter disclosure is the kind of non-obvious behavior an agent needs.

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?

Two sentences, front-loaded with the core action, and the examples do real work by illustrating both directions of ranking. No filler or restated title.

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?

An output schema exists, so return values need no explanation, and annotations cover the safety profile. For a five-parameter ranking tool, the description supplies the essential framing (basis, direction, default filter) and omits only the trivial 'limit'.

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 60%, and the description compensates for the key ones: the ranking direction maps to 'lowest', 'among fish' maps to 'category', and 'left out unless asked for' maps to 'include_supplements'. The per-100g anchor adds meaning beyond the bare enum on 'nutrient'. The 'limit' parameter remains undocumented in both places.

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 — 'Rank foods by a nutrient per 100 g' — and immediately grounds it with two contrasting examples ('most protein among fish', 'lowest-calorie fruits'). The ranking framing plus the per-100g basis makes it clearly distinct from a lookup like get_food or a search tool without needing to name them.

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 examples show concrete use cases (top-N by nutrient, either direction), and the second sentence gives a clear data-scope rule: supplements are excluded unless requested. It does not name alternatives such as search_foods for non-ranked queries, so an agent must infer that boundary.

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