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
| Name | Type | Required | Description |
|---|---|---|---|
fdc_id | number | yes | FDC id (e.g. 1102704) |
format | string | no | abridged | full (default full) |
nutrients | string | no | Comma-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
| Field | Type | Description |
|---|---|---|
fdcId | number | FDC food identifier |
description | string | Food description |
dataType | string | Type of food data |
publishedDate | string | Date food was published |
foodNutrients | array | Array 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.