Skip to main content
Glama

Nutrients: proof-backed nutrition data

add_proof

Idempotent

Add proof (first-party URL or label photos; never aggregators, trackers or another brand's store listing; never estimates) and your reading, for an id, or a missing item with new_entity and market. Values publish at once, unverified; verified later. Safe to retry.

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": "add_proof"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
urlNoFirst-party page or PDF; cited, never fetched
noteNo
pageNo
filesNo
marketNoISO country
regimeNo
barcodeNo
read_atNo
readingNo
new_entityNo
linked_fromNo
source_dateNoThe source's own date, never the day you read it
source_versionNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / barcode
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / new_entity / properties / barcode / description
      Added value: +"As printed: package or maker page"
  3. Changed81 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / files / items / properties / data_base64 / maxLength
      Removed value: -14000000
    • removedInput schema / properties / files / items / properties / side / type
      Removed value: -"string"
    • removedInput schema / properties / files / items / type
      Removed value: -"object"
    • removedInput schema / properties / files / maxItems
      Removed value: -8
    • removedInput schema / properties / id / description
      Removed value: -"The entity this proves. Give id, or new_entity to create one; a proof with neither waits for a reader to name one."
    • removedInput schema / properties / id / maxLength
      Removed value: -64
    • removedInput schema / properties / id / minLength
      Removed value: -3
    • removedInput schema / properties / idempotency_key / description
      Removed value: -"Optional: a unique string you make for this one write (a UUID). A retry with the same key and the same request returns the first answer (replayed: true) for 24 hours; the same key with a different request is refused (idempotency_key_reused). Without it, an identical request from this key within 24 hours is the retry."
    • removedInput schema / properties / idempotency_key / maxLength
      Removed value: -200
    • removedInput schema / properties / idempotency_key / minLength
      Removed value: -8
    • removedInput schema / properties / idempotency_key / pattern
      Removed value: -"^[\\x21-\\x7e]+$"
    • removedInput schema / properties / linked_from / description
      Removed value: -"When the url is a file on another host (a shared CDN such as cdn.sanity.io, a document host): the page on the brand's or restaurant's own site that links to it, which you followed to reach the file. Trust follows that page: a file linked from an approved first-party domain is first-party (rank 1); the file's host alone never is. Omit when the url is on the owner's own domain."
    • removedInput schema / properties / linked_from / format
      Removed value: -"uri"
    • changedInput schema / properties / market / description
      Previous value: -"ISO 3166-1 country the label is for, e.g. US, GB, JP. Required with new_entity: it becomes the item's market."New value: +"ISO country"
    • removedInput schema / properties / market / maxLength
      Removed value: -2
    • removedInput schema / properties / market / minLength
      Removed value: -2
    • removedInput schema / properties / new_entity / description
      Removed value: -"The item to create when it does not exist yet: search and lookup_barcode first. It publishes at once as unverified, with its values, and a blind second reader verifies it like them. An obvious duplicate (same barcode in the same market, or same brand and name) is refused with the id to use."
    • removedInput schema / properties / new_entity / properties / barcode / description
      Removed value: -"GTIN (UPC-A, EAN-13, GTIN-14) as printed. Normalised and check-digit tested."
    • removedInput schema / properties / new_entity / properties / barcode / maxLength
      Removed value: -20
    • removedInput schema / properties / new_entity / properties / barcode / minLength
      Removed value: -6
    • removedInput schema / properties / new_entity / properties / basis / description
      Removed value: -"Products only: per_100ml for a liquid sold by volume. Supplements and menu items are per serving."
    • removedInput schema / properties / new_entity / properties / basis / type
      Removed value: -"string"
    • removedInput schema / properties / new_entity / properties / brand / description
      Removed value: -"The brand, or the restaurant for a menu item. Linked to the existing brand or chain with that name, or created."
    • removedInput schema / properties / new_entity / properties / brand / maxLength
      Removed value: -100
    • removedInput schema / properties / new_entity / properties / brand / minLength
      Removed value: -1
    • removedInput schema / properties / new_entity / properties / kind / description
      Removed value: -"product: a packaged food with a nutrition panel (stored per 100 g); supplement: a Supplement Facts panel (per serving); menu_item: a restaurant or chain item (per serving)."
    • removedInput schema / properties / new_entity / properties / kind / type
      Removed value: -"string"
    • removedInput schema / properties / new_entity / properties / lang / description
      Removed value: -"Language of the name, BCP 47. Defaults to en."
    • removedInput schema / properties / new_entity / properties / lang / maxLength
      Removed value: -16
    • removedInput schema / properties / new_entity / properties / lang / minLength
      Removed value: -2
    • changedInput schema / properties / new_entity / properties / name / description
      Previous value: -"The item's name as printed, without the brand: \"Chocolate Chip\" for a Clif Bar, \"Big Mac\" for McDonald's. A row in a section that changes the recipe (Fresh Fit, Catering, Gluten Sensitive, Kids) carries the section: \"6\\\" Oven Roasted Turkey (Fresh Fit)\", never the plain name."New value: +"As printed, without the brand"
    • removedInput schema / properties / new_entity / properties / name / maxLength
      Removed value: -200
    • removedInput schema / properties / new_entity / properties / name / minLength
      Removed value: -2
    • removedInput schema / properties / new_entity / properties / serving / properties / fl_oz / description
      Removed value: -"Its volume in US fluid ounces, when the label prints only fl oz (\"12 fl oz\"): converted to ml at 29.5735295625 ml per fl oz. Give ml instead when it is printed."
    • removedInput schema / properties / new_entity / properties / serving / properties / fl_oz / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / new_entity / properties / serving / properties / grams / description
      Removed value: -"Its weight in grams, when printed."
    • removedInput schema / properties / new_entity / properties / serving / properties / grams / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / new_entity / properties / serving / properties / label / description
      Removed value: -"The serving as printed, e.g. \"1 bar (68 g)\"."
    • removedInput schema / properties / new_entity / properties / serving / properties / label / maxLength
      Removed value: -60
    • removedInput schema / properties / new_entity / properties / serving / properties / label / minLength
      Removed value: -1
    • removedInput schema / properties / new_entity / properties / serving / properties / ml / description
      Removed value: -"Its volume in millilitres, when printed. Converts per-serving values on a per_100ml item."
    • removedInput schema / properties / new_entity / properties / serving / properties / ml / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / new_entity / properties / serving / type
      Removed value: -"object"
    • removedInput schema / properties / new_entity / type
      Removed value: -"object"
    • removedInput schema / properties / note / maxLength
      Removed value: -1000
    • removedInput schema / properties / page / description
      Removed value: -"For a PDF: the page the values are printed on, as the PDF viewer numbers it. Kept with the url as #page=N."
    • removedInput schema / properties / page / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / page / maximum
      Removed value: -10000
    • removedInput schema / properties / read_at / description
      Removed value: -"The date you read the page, YYYY-MM-DD. Today when absent."
    • removedInput schema / properties / read_at / pattern
      Removed value: -"^\\d{4}-\\d{2}-\\d{2}$"
    • removedInput schema / properties / reading / description
      Removed value: -"Your reading of the proof. Needs id or new_entity."
    • removedInput schema / properties / reading / properties / outcome / description
      Removed value: -"Truthful abstention: omit values and serving measurements. Recorded, never agreement or credit."
    • removedInput schema / properties / reading / properties / outcome / type
      Removed value: -"string"
    • removedInput schema / properties / reading / properties / serving_fl_oz / description
      Removed value: -"US fluid ounces in one serving, exactly as printed, when the label prints the volume only in fl oz (\"Size 12 fl oz\", \"per 8.4 fl oz\"). Converted to serving_ml at 29.5735295625 ml per US fl oz. Give serving_ml instead when the label also prints ml."
    • removedInput schema / properties / reading / properties / serving_fl_oz / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / reading / properties / serving_grams / description
      Removed value: -"Grams in one serving, exactly as printed on the proof; leave it out when the label prints no grams. Needed to store per-serving values per 100 g. Readers must match it exactly, like any other value."
    • removedInput schema / properties / reading / properties / serving_grams / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / reading / properties / serving_ml / description
      Removed value: -"Millilitres in one serving, exactly as printed on the proof (\"1 can (473 mL)\"); leave it out when the label prints no volume. Needed to store per-serving values per 100 ml (a drink sold by volume). Readers must match it exactly, like serving_grams."
    • removedInput schema / properties / reading / properties / serving_ml / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / reading / properties / values / default
      Removed value: -[]
    • removedInput schema / properties / reading / properties / values / description
      Removed value: -"Exactly what the proof states, one entry per value, on the basis printed (per_serving for a per-serving column)."
    • removedInput schema / properties / reading / properties / values / items / properties / basis / type
      Removed value: -"string"
    • changedInput schema / properties / reading / properties / values / items / properties / bound / description
      Previous value: -"When the label states a bound, not a value: \"<1 g\" is bound \"lt\" with value 1; \"trace\" uses value 0. A printed interval uses two entries of the same property and basis, lower ge/gt and upper le/lt; get retains both in bounds."New value: +"\"<1 g\" is lt with value 1"
    • removedInput schema / properties / reading / properties / values / items / properties / bound / type
      Removed value: -"string"
    • changedInput schema / properties / reading / properties / values / items / properties / property / description
      Previous value: -"A registry key (see describe), or the name the label prints. A name that means a key is that key, so send what the label states and never split it: \"Omega-3\" is fat.omega3 (the total), \"Soluble Fiber\" fibre.soluble, \"Folate\" with unit \"mcg DFE\" folate.dfe, \"Vitamin E\" in IU vitamin_e.iu. Any other line the label prints, by its name as printed (\"Creatine Monohydrate\"), is a free label line. A free line needs a number and a unit (g, mg, mcg, IU, CFU, billion CFU or ml); it is stored under line:<name> (lower case, spaces collapsed, ® and ™ removed), served at once with its identity unverified, and adds up with every line of the same name."New value: +"A registry key, or a label line by its printed name"
    • removedInput schema / properties / reading / properties / values / items / properties / property / maxLength
      Removed value: -130
    • removedInput schema / properties / reading / properties / values / items / properties / property / minLength
      Removed value: -1
    • removedInput schema / properties / reading / properties / values / items / properties / unit / description
      Removed value: -"The unit as printed. Spellings of one unit are one unit: mcg, µg, μg and ug are micrograms; Calories and kcal are kilocalories."
    • removedInput schema / properties / reading / properties / values / items / properties / value / description
      Removed value: -"A number as printed; for ingredients_text the ingredient list as printed (one string); for allergen.contains and allergen.may_contain a list of canonical allergen keys (describe: allergen_keys; \"Tree Nuts\" and \"Eggs\" are matched to tree_nut and egg, any other word refuses that field by name). Text publishes as numbers do: unverified until a blind second reading agrees. An empty allergen list (\"contains none\") is not published until a blind second reading also reads none."
    • removedInput schema / properties / reading / properties / values / items / type
      Removed value: -"object"
    • removedInput schema / properties / reading / properties / values / maxItems
      Removed value: -100
    • removedInput schema / properties / reading / properties / values / minItems
      Removed value: -1
    • removedInput schema / properties / reading / type
      Removed value: -"object"
    • removedInput schema / properties / regime / description
      Removed value: -"Labelling regime of the label if known (US, EU, UK, ...). Detected when absent."
    • changedInput schema / properties / source_date / description
      Previous value: -"The effective or publication date stated by the source, YYYY-MM-DD. Omit when unknown; never use the date you read it."New value: +"The source's own date, never the day you read it"
    • removedInput schema / properties / source_date / pattern
      Removed value: -"^\\d{4}-\\d{2}-\\d{2}$"
    • removedInput schema / properties / source_version / description
      Removed value: -"The edition or version printed by the source. Omit when unknown."
    • removedInput schema / properties / source_version / maxLength
      Removed value: -200
    • changedInput schema / properties / url / description
      Previous value: -"A link to the proof: the brand's or restaurant's own page, its PDF or a regulator's record. It is kept as a citation, as text with the date you read it; our server never visits it. A first-party PDF is cited by url and page, never uploaded. An agent verifying the item receives this citation only with explicit open_links: true."New value: +"First-party page or PDF; cited, never fetched"
    • removedInput schema / properties / url / format
      Removed value: -"uri"
  4. Changed1 schema field changed
    • changedInput schema / properties / reading / properties / values / items / properties / property / description
      Previous value: -"A registry key (see describe), or any other line the label prints, by its name as printed (\"Creatine Monohydrate\"): a free label line. A free line needs a number and a unit (g, mg, mcg, IU, CFU, billion CFU or ml); it is stored under line:<name> (lower case, spaces collapsed, ® and ™ removed), served at once with its identity unverified, and adds up with every line of the same name."New value: +"A registry key (see describe), or the name the label prints. A name that means a key is that key, so send what the label states and never split it: \"Omega-3\" is fat.omega3 (the total), \"Soluble Fiber\" fibre.soluble, \"Folate\" with unit \"mcg DFE\" folate.dfe, \"Vitamin E\" in IU vitamin_e.iu. Any other line the label prints, by its name as printed (\"Creatine Monohydrate\"), is a free label line. A free line needs a number and a unit (g, mg, mcg, IU, CFU, billion CFU or ml); it is stored under line:<name> (lower case, spaces collapsed, ® and ™ removed), served at once with its identity unverified, and adds up with every line of the same name."
  5. Changed1 schema field changed
    • changedInput schema / properties / new_entity / properties / name / description
      Previous value: -"The item's name as printed, without the brand: \"Chocolate Chip\" for a Clif Bar, \"Big Mac\" for McDonald's."New value: +"The item's name as printed, without the brand: \"Chocolate Chip\" for a Clif Bar, \"Big Mac\" for McDonald's. A row in a section that changes the recipe (Fresh Fit, Catering, Gluten Sensitive, Kids) carries the section: \"6\\\" Oven Roasted Turkey (Fresh Fit)\", never the plain name."
  6. Changed3 schema fields changed
    • addedInput schema / properties / new_entity / properties / serving / properties / fl_oz
      Added value: +{
      +  "description": "Its volume in US fluid ounces, when the label prints only fl oz (\"12 fl oz\"): converted to ml at 29.5735295625 ml per fl oz. Give ml instead when it is printed.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / reading / properties / serving_fl_oz
      Added value: +{
      +  "description": "US fluid ounces in one serving, exactly as printed, when the label prints the volume only in fl oz (\"Size 12 fl oz\", \"per 8.4 fl oz\"). Converted to serving_ml at 29.5735295625 ml per US fl oz. Give serving_ml instead when the label also prints ml.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / reading / properties / values / items / properties / unit / description
      Added value: +"The unit as printed. Spellings of one unit are one unit: mcg, µg, μg and ug are micrograms; Calories and kcal are kilocalories."
  7. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Optional: a unique string you make for this one write (a UUID). A retry with the same key and the same request returns the first answer (replayed: true) for 24 hours; the same key with a different request is refused (idempotency_key_reused). Without it, an identical request from this key within 24 hours is the retry.",
      +  "maxLength": 200,
      +  "minLength": 8,
      +  "pattern": "^[\\x21-\\x7e]+$",
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • addedInput schema / properties / reading / properties / values / items / properties / value / description
      Added value: +"A number as printed; for ingredients_text the ingredient list as printed (one string); for allergen.contains and allergen.may_contain a list of canonical allergen keys (describe: allergen_keys; \"Tree Nuts\" and \"Eggs\" are matched to tree_nut and egg, any other word refuses that field by name). Text publishes as numbers do: unverified until a blind second reading agrees. An empty allergen list (\"contains none\") is not published until a blind second reading also reads none."
  9. Changed4 schema fields changed
    • addedInput schema / properties / reading / properties / outcome
      Added value: +{
      +  "description": "Truthful abstention: omit values and serving measurements. Recorded, never agreement or credit.",
      +  "enum": [
      +    "unreadable",
      +    "different_variant",
      +    "out_of_date",
      +    "not_first_party"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / reading / properties / unreadable
      Removed value: -{
      -  "description": "True when the proof can't be read reliably (blurry, cropped, wrong product).",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / reading / properties / values / default
      Added value: +[]
    • removedInput schema / properties / reading / required
      Removed value: -[
      -  "values"
      -]
  10. Changed1 schema field changed
    • addedInput schema / properties / linked_from
      Added value: +{
      +  "description": "When the url is a file on another host (a shared CDN such as cdn.sanity.io, a document host): the page on the brand's or restaurant's own site that links to it, which you followed to reach the file. Trust follows that page: a file linked from an approved first-party domain is first-party (rank 1); the file's host alone never is. Omit when the url is on the owner's own domain.",
      +  "format": "uri",
      +  "type": "string"
      +}
  11. Changed1 schema field changed
    • changedInput schema / properties / reading / properties / values / items / properties / bound / description
      Previous value: -"When the label states a bound, not a value: \"<1 g\" is bound \"lt\" with value 1; \"trace\" uses value 0."New value: +"When the label states a bound, not a value: \"<1 g\" is bound \"lt\" with value 1; \"trace\" uses value 0. A printed interval uses two entries of the same property and basis, lower ge/gt and upper le/lt; get retains both in bounds."
  12. Changed2 schema fields changed
    • addedInput schema / properties / source_date
      Added value: +{
      +  "description": "The effective or publication date stated by the source, YYYY-MM-DD. Omit when unknown; never use the date you read it.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / source_version
      Added value: +{
      +  "description": "The edition or version printed by the source. Omit when unknown.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
  13. Changed2 schema fields changed
    • addedInput schema / properties / page
      Added value: +{
      +  "description": "For a PDF: the page the values are printed on, as the PDF viewer numbers it. Kept with the url as #page=N.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 10000,
      +  "type": "integer"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"A link to the proof: the brand's or restaurant's own page, a PDF or a regulator's record. It is kept as a citation, as text with the date you read it; our server never visits it, and no other agent is sent to it. To keep a copy, upload the file."New value: +"A link to the proof: the brand's or restaurant's own page, its PDF or a regulator's record. It is kept as a citation, as text with the date you read it; our server never visits it. A first-party PDF is cited by url and page, never uploaded. An agent verifying the item receives this citation only with explicit open_links: true."
  14. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare write, idempotent and non-destructive behavior; the description adds genuinely new context that submitted values publish immediately as unverified and are verified later, which tells the agent the write is visible before review. 'Safe to retry' reinforces the idempotentHint but does not describe auth, failure modes, or what a rejection looks like.

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?

Three tight sentences, front-loaded with the action and its evidence rule; the parenthetical is long but each clause constrains what may be submitted. Little waste, though the density makes the id-vs-new_entity branch slightly harder to parse than it needs to be.

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?

For a 15-parameter mutation with no output schema, the description covers the critical decision points: the two entry paths, acceptable evidence, and the immediate-publication lifecycle. It is thin on the reading/outcome payload and temporal fields, which are exactly where an agent is most likely to misuse the tool.

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

Parameters2/5

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

Schema description coverage is only 20% across 15 parameters, so the description must compensate and largely does not. It names 'id', 'new_entity', 'market', 'url' and 'files' (as label photos) but leaves 'regime', 'barcode', 'read_at', 'reading' internals, 'source_date', 'source_version', 'linked_from', 'page', 'note' and 'idempotency_key' undocumented in prose.

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 ('Add proof ... and your reading') and scopes it to two cases: an existing 'id' or a missing item via 'new_entity' and 'market'. It also defines what counts as acceptable proof, which sharpens the purpose further. It stops short of naming a sibling it is not, so a 4 rather than a 5.

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?

Gives clear conditions for use (for an id, or for a missing item with new_entity and market) plus explicit exclusions on evidence ('never aggregators, trackers or another brand's store listing; never estimates'). No alternative tool is named, so an agent must infer whether submit_reading or verify is the better path in edge cases.

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