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

NameTypeRequiredDescription
fieldstringyesA keyword facet field, e.g. “agg-mainTopic”, “agg-author”.
querystringnoOptional full-text scope for the aggregation.
sizenumbernoTop-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

FieldTypeDescription
tooknumber
timed_outboolean
_shardsobject
hitsobject
aggregationsobjectAggregation 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.

Regenerated from source · build July 8, 2026