query
Pack: data-qatar · Endpoint: https://gateway.pipeworx.io/data-qatar/mcp
Query records from a Qatar government open data dataset with ODSQL. Filter (where), aggregate (group_by/select), sort (order_by), paginate (limit/offset). Field labels come back as label_en/label_ar — dataset_ids and field names stay in their native form.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dataset_id | string | yes | Dataset id from search_datasets. |
query | string | no | Free-text keyword across all fields (optional). |
where | string | no | ODSQL filter, e.g. year >= 2020 (overrides query). |
select | string | no | ODSQL select/aggregation, e.g. count(*) as n, sum(amount). |
group_by | string | no | ODSQL group_by field(s). |
order_by | string | no | Sort, e.g. year desc. |
limit | number | no | Max records (1-100, default 20). |
offset | number | no | Pagination offset (default 0). |
Example call
Arguments
{
"dataset_id": "percentage-distribution-of-population-by-sex-and-municipality-census-2015",
"where": "gender=\"Males\"",
"limit": 50
}
curl
curl -X POST https://gateway.pipeworx.io/data-qatar/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query","arguments":{"dataset_id":"percentage-distribution-of-population-by-sex-and-municipality-census-2015","where":"gender=\"Males\"","limit":50}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query', {
"dataset_id": "percentage-distribution-of-population-by-sex-and-municipality-census-2015",
"where": "gender=\"Males\"",
"limit": 50
});
More examples
{
"dataset_id": "percentage-distribution-of-population-by-sex-and-municipality-census-2015",
"select": "sum(number_of_population_dd_lskn) as total",
"group_by": "gender"
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"data-qatar": {
"url": "https://gateway.pipeworx.io/data-qatar/mcp"
}
}
}
See Getting Started for client-specific install steps.