Skip to main content
Glama

Rank foods by a nutrient

nutrient_ranking

Rank whole plant foods by how much of a nutrient they provide per 100 g — the "highest in vitamin C / iron / calcium" question, answered from reconciled multi-source data rather than one national table. Optionally filter by food category. Each result reports how many sources backed the value, so thinly-sourced outliers can be spotted or excluded via min_sources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results, 1–100. Default 20.
categoryNoOptional substring filter on the food category — e.g. "fruit", "legume", "millet".
nutrientYesNutrient slug or name — e.g. "iron", "vitamin-c", "folate".
min_sourcesNoOnly include values backed by at least this many datasets (1–11). Default 1.
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it specifies per-100 g normalization, whole-plant-food scope, reconciled multi-source data, and the fact that each result reports source count. It also mentions min_sources as a way to spot or exclude thinly-sourced outliers, which is useful behavioral detail.

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?

Three sentences, each earning its place: the first defines the core ranking behavior and data provenance, the second covers filtering, the third explains the source-count output and min_sources usage. No filler or repetition.

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?

Although there is no output schema, the description covers the primary return characteristic (source backing count) and the ranking basis. It does not state the sort order explicitly or enumerate all output fields, but for a four-parameter tool the description is sufficiently complete for correct invocation.

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. The description adds meaningful context beyond the schema by explaining the multi-source ranking basis, the per-100 g meaning, and how min_sources relates to spotting or excluding poorly-backed values.

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 uses a specific verb+resource pair: 'Rank whole plant foods by how much of a nutrient they provide per 100 g.' It clearly differentiates itself from siblings like search_foods or lookup_food by framing the 'highest in vitamin C / iron / calcium' use case rather than generic search or lookup.

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 description communicates when to use the tool: for nutrient-ranking questions with optional category filtering and source-threshold exclusion. It does not explicitly name alternatives or state when not to use it, but the intended context is clear enough for an agent to select it appropriately.

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.