query

Pack: data-bahrain · 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/query for the schema, then POST the same URL with its arguments for the data.

Query records from a Bahrain government open data dataset with ODSQL. Filter (where), aggregate (group_by/select), sort (order_by), paginate (limit/offset).

Parameters

NameTypeRequiredDescription
dataset_idstringyesDataset id from search_datasets.
querystringnoFree-text keyword across all fields (optional).
wherestringnoODSQL filter, e.g. year >= 2020 (overrides query).
selectstringnoODSQL select/aggregation, e.g. count(*) as n, sum(amount).
group_bystringnoODSQL group_by field(s).
order_bystringnoSort, e.g. year desc.
limitnumbernoMax records (1-100, default 20).
offsetnumbernoPagination offset (default 0).

Example call

Arguments

{
  "dataset_id": "economically-active-population-15-years-and-above-by-age-groups-nationality-and-",
  "limit": 50
}

curl

curl -X POST https://gateway.pipeworx.io/data-bahrain/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query","arguments":{"dataset_id":"economically-active-population-15-years-and-above-by-age-groups-nationality-and-","limit":50}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('query', {
  "dataset_id": "economically-active-population-15-years-and-above-by-age-groups-nationality-and-",
  "limit": 50
});

More examples

{
  "dataset_id": "economically-active-population-15-years-and-above-by-age-groups-nationality-and-",
  "select": "sum(population) as total",
  "group_by": "nationality"
}

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 data-bahrain pack
{
  "mcpServers": {
    "data-bahrain": {
      "url": "https://gateway.pipeworx.io/data-bahrain/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 22, 2026