Skip to main content
Glama

Nutrients: proof-backed nutrition data

query

Read-only

Filter and sort the whole database on any nutrient, per 100 g, 100 kcal or serving. Misses carry contribute.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNo
hasNo
perNoper_100g
sortNo
brandNo
kindsNo
limitNo
whereNo
facetsNo
fieldsNo
marketNo
offsetNo
brand_idNo
datasetsNo
max_rankNo
categoriesNo
has_barcodeNo
include_inconsistentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed49 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / brand / description
      Removed value: -"Brand name contains this."
    • removedInput schema / properties / brand / maxLength
      Removed value: -100
    • removedInput schema / properties / brand_id / description
      Removed value: -"Exactly this brand (a br_ id)."
    • removedInput schema / properties / brand_id / maxLength
      Removed value: -40
    • removedInput schema / properties / categories / description
      Removed value: -"Only rows whose source category contains one of these words, e.g. [\"yogurt\", \"yoghurt\"]: excludes yogurt-coated bars and yogurt cheese. With facets, the category facet lists the exact names. Rows a source gives no category are excluded."
    • removedInput schema / properties / categories / items / maxLength
      Removed value: -60
    • removedInput schema / properties / categories / items / minLength
      Removed value: -2
    • removedInput schema / properties / categories / maxItems
      Removed value: -10
    • removedInput schema / properties / datasets / description
      Removed value: -"Source datasets, e.g. \"Foundation\", \"SR Legacy\", \"CIQUAL 2025\", \"Branded\", \"NIH DSLD\", \"Health Canada LNHPD\". Facets list them."
    • removedInput schema / properties / datasets / items / maxLength
      Removed value: -60
    • removedInput schema / properties / datasets / maxItems
      Removed value: -10
    • removedInput schema / properties / facets / default
      Removed value: -false
    • removedInput schema / properties / facets / description
      Removed value: -"Also count matches by kind, brand, dataset, market and proof rank. Each facet counts what passes every other filter."
    • removedInput schema / properties / fields / description
      Removed value: -"Values to return per row. Defaults to energy, macros and anything filtered or sorted on. A group name (\"vitamin_a\") returns each of its keys separately; where and sort take one key."
    • removedInput schema / properties / fields / maxItems
      Removed value: -30
    • removedInput schema / properties / has / default
      Removed value: -[]
    • removedInput schema / properties / has / description
      Removed value: -"Only rows with a known value for each of these properties (registry keys or line:<name>)."
    • removedInput schema / properties / has / maxItems
      Removed value: -12
    • removedInput schema / properties / include_inconsistent / default
      Removed value: -false
    • removedInput schema / properties / kinds / default
      Removed value: -[
      -  "food",
      -  "product"
      -]
    • removedInput schema / properties / kinds / items / type
      Removed value: -"string"
    • removedInput schema / properties / limit / default
      Removed value: -20
    • removedInput schema / properties / limit / maximum
      Removed value: -100
    • removedInput schema / properties / limit / minimum
      Removed value: -1
    • removedInput schema / properties / market / description
      Removed value: -"Country code, e.g. US, CA, FR."
    • removedInput schema / properties / market / maxLength
      Removed value: -2
    • removedInput schema / properties / market / minLength
      Removed value: -2
    • removedInput schema / properties / max_rank / description
      Removed value: -"Only rows whose strongest proof is at least this strong (1 strongest)."
    • removedInput schema / properties / max_rank / maximum
      Removed value: -5
    • removedInput schema / properties / max_rank / minimum
      Removed value: -1
    • removedInput schema / properties / offset / default
      Removed value: -0
    • removedInput schema / properties / offset / maximum
      Removed value: -990
    • removedInput schema / properties / offset / minimum
      Removed value: -0
    • removedInput schema / properties / per / description
      Removed value: -"per_100g compares foods and products; per_serving covers supplements and products with a serving weight; per_100kcal needs at least 20 kcal on the basis of the row (per 100 g, or per serving), below that the row is left out; native shows each row on its own basis, for mixed lists. Each row says what its values are per in values_per."
    • removedInput schema / properties / per / type
      Removed value: -"string"
    • removedInput schema / properties / q / description
      Removed value: -"Keywords in any language. Omit to scan everything that matches the filters."
    • removedInput schema / properties / q / maxLength
      Removed value: -200
    • removedInput schema / properties / sort / default
      Removed value: -[]
    • removedInput schema / properties / sort / items / properties / by / description
      Removed value: -"A property key, \"relevance\" or \"name\"."
    • removedInput schema / properties / sort / items / properties / order / type
      Removed value: -"string"
    • removedInput schema / properties / sort / items / type
      Removed value: -"object"
    • removedInput schema / properties / sort / maxItems
      Removed value: -3
    • removedInput schema / properties / where / default
      Removed value: -[]
    • removedInput schema / properties / where / description
      Removed value: -"Ranges on the chosen basis (per). A property is a registry key or a free label line, line:<name> (see label_lines)."
    • removedInput schema / properties / where / items / properties / unit / description
      Removed value: -"Free label lines only: the unit of min and max (g, mg, mcg, IU, CFU, billion CFU, ml). Mass converts. Needed when label_lines lists more than one unit for the line; else its one unit (mass lines are stored in mg)."
    • removedInput schema / properties / where / items / properties / unit / maxLength
      Removed value: -20
    • removedInput schema / properties / where / items / type
      Removed value: -"object"
    • removedInput schema / properties / where / maxItems
      Removed value: -12
  2. Changed1 schema field changed
    • addedInput schema / properties / categories
      Added value: +{
      +  "description": "Only rows whose source category contains one of these words, e.g. [\"yogurt\", \"yoghurt\"]: excludes yogurt-coated bars and yogurt cheese. With facets, the category facet lists the exact names. Rows a source gives no category are excluded.",
      +  "items": {
      +    "maxLength": 60,
      +    "minLength": 2,
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array"
      +}
  3. First observed

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered by structured data rather than the text. The description adds almost nothing behavioral: no mention of default result counts, pagination, cost, or what 'Misses carry contribute' actually means — that fragment is too garbled to convey useful behavior.

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?

Two short sentences with the main capability front-loaded, so there is little padding. But the second sentence ('Misses carry contribute.') is ungrammatical and does not parse into an actionable rule, consuming space without conveying meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter, fully undocumented query tool with no output schema, this definition is nowhere near sufficient — an agent could not construct a correct call from it. The only structured guidance available is the annotation set, and the description fails to fill the substantial remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 18 parameters at 0% schema description coverage, the description must carry the full semantic load that the schema does not. It explains only the per-basis notion, which is already obvious from the 'per' enum values, and leaves q, has, where, facets, fields, datasets, max_rank, include_inconsistent, market, brand_id, categories, has_barcode, and the rest entirely undefined.

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?

'Filter and sort the whole database on any nutrient' states a concrete verb pair and resource scope, which is far more informative than the bare name 'query'. It does not, however, differentiate itself from siblings like 'search' or 'get', so an agent cannot tell from the text which one to reach for.

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?

The description implies usage (broad filtering/sorting across the database on nutrient values) and the per-basis options hint at comparison-style queries. It gives no explicit when-to-use or when-not-to-use guidance and never names an alternative tool such as 'search', 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