get_categories
Pack: open-food-facts · Endpoint: https://gateway.pipeworx.io/open-food-facts/mcp
List popular food product categories from Open Food Facts. Returns category names and product counts. Useful for discovering what categories are available for filtering searches.
Example call
Arguments
{}
curl
curl -X POST https://gateway.pipeworx.io/open-food-facts/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_categories","arguments":{}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_categories', {});
Response shape
Always returns: count, categories
| Field | Type | Description |
|---|---|---|
count | number | Number of categories returned |
categories | array | List of category objects |
Full JSON Schema
{
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "Number of categories returned"
},
"categories": {
"type": "array",
"description": "List of category objects",
"items": {
"type": "object",
"properties": {
"id": {
"type": [
"string",
"null"
],
"description": "Category ID"
},
"name": {
"type": [
"string",
"null"
],
"description": "Category name"
},
"product_count": {
"type": "number",
"description": "Number of products in category"
}
},
"required": [
"id",
"name",
"product_count"
]
}
}
},
"required": [
"count",
"categories"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"open-food-facts": {
"url": "https://gateway.pipeworx.io/open-food-facts/mcp"
}
}
}
See Getting Started for client-specific install steps.