get_food

Pack: usda-fdc · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/get_food for the schema, then POST the same URL with its arguments for the data.

Full food record by FDC id.

Parameters

NameTypeRequiredDescription
fdc_idnumberyesFDC id (e.g. 1102704)
formatstringnoabridged | full (default full)
nutrientsstringnoComma-sep nutrient numbers to restrict response

Example call

Arguments

{
  "fdc_id": 1102704
}

curl

curl -X POST https://gateway.pipeworx.io/usda-fdc/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_food","arguments":{"fdc_id":1102704}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_food', {
  "fdc_id": 1102704
});

More examples

{
  "fdc_id": 1102704,
  "format": "abridged",
  "nutrients": "208,205,291"
}

Response shape

FieldTypeDescription
fdcIdnumberFDC food identifier
descriptionstringFood description
dataTypestringType of food data
publishedDatestringDate food was published
foodNutrientsarrayArray of nutrient data for food
Full JSON Schema
{
  "type": "object",
  "description": "Full food record from USDA FDC",
  "properties": {
    "fdcId": {
      "type": "number",
      "description": "FDC food identifier"
    },
    "description": {
      "type": "string",
      "description": "Food description"
    },
    "dataType": {
      "type": "string",
      "description": "Type of food data"
    },
    "publishedDate": {
      "type": "string",
      "description": "Date food was published"
    },
    "foodNutrients": {
      "type": "array",
      "description": "Array of nutrient data for food",
      "items": {
        "type": "object",
        "properties": {
          "nutrient": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Nutrient name"
              },
              "number": {
                "type": "string",
                "description": "Nutrient identifier number"
              },
              "unitName": {
                "type": "string",
                "description": "Unit of measurement"
              }
            }
          },
          "amount": {
            "type": "number",
            "description": "Nutrient amount"
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the usda-fdc pack
{
  "mcpServers": {
    "usda-fdc": {
      "url": "https://gateway.pipeworx.io/usda-fdc/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 5, 2026