query_dataset
Pack: datos-co · Endpoint: https://gateway.pipeworx.io/datos-co/mcp
Query rows from a datos.gov.co dataset using SoQL. datasetId is the Socrata 4x4 code from
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
datasetId | string | yes | Socrata 4x4 id, e.g. “gt2j-8ykr”. |
select | string | no | Columns or aggregates, e.g. “departamento_nom, count(*)”. |
where | string | no | SQL-like filter, e.g. “edad > 60 AND sexo=‘F’”. |
order | string | no | Sort, e.g. “fecha_reporte_web desc”. |
group | string | no | Group-by field(s) for aggregation. |
q | string | no | Full-text search across the whole row. |
limit | number | no | Rows to return (default 50). |
offset | number | no | Pagination offset (default 0). |
Example call
Arguments
{
"datasetId": "gt2j-8ykr",
"$select": "departamento_nom, count(*)",
"$group": "departamento_nom",
"$order": "count desc"
}
curl
curl -X POST https://gateway.pipeworx.io/datos-co/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_dataset","arguments":{"datasetId":"gt2j-8ykr","$select":"departamento_nom, count(*)","$group":"departamento_nom","$order":"count desc"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query_dataset', {
"datasetId": "gt2j-8ykr",
"$select": "departamento_nom, count(*)",
"$group": "departamento_nom",
"$order": "count desc"
});
More examples
{
"datasetId": "gt2j-8ykr",
"$select": "fecha, valor",
"$where": "departamento_nom='BOGOTA' AND fecha >= '2023-01-01'",
"$limit": 100
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"datos-co": {
"url": "https://gateway.pipeworx.io/datos-co/mcp"
}
}
}
See Getting Started for client-specific install steps.