facets
Pack: pangaea · Endpoint: https://gateway.pipeworx.io/pangaea/mcp
Aggregate matching datasets by a facet — top values of a category field (e.g. “agg-mainTopic”, “agg-author”, “agg-method”, “agg-location”, “agg-campaign”) with counts. Optionally scoped to a full-text query.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
field | string | yes | A keyword facet field, e.g. “agg-mainTopic”, “agg-author”. |
query | string | no | Optional full-text scope for the aggregation. |
size | number | no | Top-N buckets (default 25). |
Example call
Arguments
{
"field": "source"
}
curl
curl -X POST https://gateway.pipeworx.io/pangaea/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"facets","arguments":{"field":"source"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('facets', {
"field": "source"
});
More examples
{
"field": "topic",
"q": "paleoclimate",
"size": 15
}
Response shape
| Field | Type | Description |
|---|---|---|
took | number | |
timed_out | boolean | |
_shards | object | |
hits | object | |
aggregations | object | Aggregation results |
Full JSON Schema
{
"type": "object",
"description": "Facet aggregation results on specified field",
"properties": {
"took": {
"type": "number"
},
"timed_out": {
"type": "boolean"
},
"_shards": {
"type": "object"
},
"hits": {
"type": "object",
"properties": {
"total": {
"type": "object"
},
"max_score": {
"type": [
"number",
"null"
]
},
"hits": {
"type": "array"
}
}
},
"aggregations": {
"type": "object",
"description": "Aggregation results",
"properties": {
"facet": {
"type": "object",
"properties": {
"buckets": {
"type": "array",
"description": "Facet buckets",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "Facet value"
},
"doc_count": {
"type": "number",
"description": "Document count"
}
}
}
}
}
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"pangaea": {
"url": "https://gateway.pipeworx.io/pangaea/mcp"
}
}
}
See Getting Started for client-specific install steps.