Skip to main content
Glama

search_foods

Read-only

Search USDA FoodData Central, Open Food Facts and Forkmate's curated restaurant menus for a named food. Returns up to 5 candidates, each with macros per 100 g, a source label ('USDA', 'Open Food Facts', 'Forkmate' or 'product label', a packaged product's published label read from a cited page and not yet checked by Forkmate), and, when known, serving_grams/serving_label for one household serving. Curated chain-menu candidates include a provenance object that may carry a portion caveat. A query names a food (at least 2 letters, no wildcards); there is no paging. For a bare generic dish ("a burger", "coffee"), the reply also lists details_that_change_it: the details that change that dish's numbers most, such as where it is from, which item, its size and add-ons. All calorie and macro values, including carbohydrates, are estimates from USDA FoodData Central, Open Food Facts, the user's own entry or an AI assistant's estimate — approximate, not lab-measured or specific to a package or batch, and not suitable for insulin dosing (including carb counting for a meal bolus), blood-glucose prediction or any other medical decision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax candidates to return (default and maximum 5).
queryYesFood to search, e.g. 'greek yogurt' or 'Chipotle chicken'. At least 2 letters; wildcards are not supported.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesYes
details_that_change_itNoFor a bare generic dish: the details that change its numbers most (where it's from, which item, size, add-ons).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / details_that_change_it
      Added value: +{
      +  "description": "For a bare generic dish: the details that change its numbers most (where it's from, which item, size, add-ons).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / candidates / items / properties / provenance / description
      Previous value: -"Chain-menu citation: the chain, its data date, its published page, the assumed build and a caveat."New value: +"Citation: the chain or a product label's brand, its data date, its published page, the assumed build and a caveat."
  3. Changed9 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Max candidates to return (default 5, clamped to 1–10)."New value: +"Max candidates to return (default and maximum 5)."
    • changedInput schema / properties / query / description
      Previous value: -"Food to search, e.g. 'greek yogurt' or 'Chipotle chicken'."New value: +"Food to search, e.g. 'greek yogurt' or 'Chipotle chicken'. At least 2 letters; wildcards are not supported."
    • addedOutput schema / properties / candidates / items / properties / provenance
      Added value: +{
      +  "description": "Chain-menu citation: the chain, its data date, its published page, the assumed build and a caveat.",
      +  "properties": {
      +    "as_of": {
      +      "description": "A local date, YYYY-MM-DD.",
      +      "type": "string"
      +    },
      +    "assumed_build": {
      +      "type": "string"
      +    },
      +    "caveat": {
      +      "type": "string"
      +    },
      +    "chain": {
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "chain",
      +    "as_of"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / candidates / items / properties / serving / description
      Added value: +"The basis the macros are for, e.g. '100 g'."
    • addedOutput schema / properties / candidates / items / properties / serving_approx
      Added value: +{
      +  "description": "serving_grams is estimated from a drink's volume.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / candidates / items / properties / source / description
      Added value: +"Where the figures came from, as a label."
    • addedOutput schema / properties / candidates / items / properties / source / enum
      Added value: +[
      +  "USDA",
      +  "Open Food Facts",
      +  "Forkmate",
      +  "your entry",
      +  "estimate"
      +]
    • addedOutput schema / properties / candidates / items / properties / unknown_macros
      Added value: +{
      +  "description": "Macros missing from the source data: shown as 0 but unknown, not a real zero.",
      +  "items": {
      +    "enum": [
      +      "protein_g",
      +      "carb_g",
      +      "fat_g"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / candidates / items / required
      Previous value: -[
      -  "name",
      -  "macros",
      -  "source"
      -]New value: +[
      +  "name",
      +  "serving",
      +  "macros",
      +  "source"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "candidates": {
      +      "items": {
      +        "description": "A food match. Macros are PER 100 g — scale to the portion before logging.",
      +        "properties": {
      +          "macros": {
      +            "description": "Calories and macros. Estimates, not lab-measured; not for insulin dosing.",
      +            "properties": {
      +              "carb_g": {
      +                "type": "number"
      +              },
      +              "fat_g": {
      +                "type": "number"
      +              },
      +              "kcal": {
      +                "type": "number"
      +              },
      +              "protein_g": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "kcal",
      +              "protein_g",
      +              "carb_g",
      +              "fat_g"
      +            ],
      +            "type": "object"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "serving": {
      +            "type": "string"
      +          },
      +          "serving_grams": {
      +            "type": "number"
      +          },
      +          "serving_label": {
      +            "type": "string"
      +          },
      +          "source": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "macros",
      +          "source"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "candidates"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.