query_table
Pack: askdata-xk · Endpoint: https://gateway.pipeworx.io/askdata-xk/mcp
POST a PxWeb query to a Kosovo ASKdata table and return observations as json-stat2. body must be {query:[{code, selection:{filter,values}}], response:{format:‘json-stat2’}}. PxWeb caps responses at ~10,000 cells — use codes from table_meta to narrow selections across dimensions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | yes | e.g. “ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px” |
body | object | yes | {query: [{code, selection: {filter, values}}], response: {format: “json-stat2”}} |
selection | unknown | no | |
response | unknown | no |
Example call
Arguments
{
"path": "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px",
"body": {
"query": [
{
"code": "Year",
"selection": {
"filter": "item",
"values": [
"2022",
"2023"
]
}
}
],
"response": {
"format": "json-stat2"
}
}
}
curl
curl -X POST https://gateway.pipeworx.io/askdata-xk/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_table","arguments":{"path":"ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px","body":{"query":[{"code":"Year","selection":{"filter":"item","values":["2022","2023"]}}],"response":{"format":"json-stat2"}}}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query_table', {
"path": "ASKdata/Prices/Consumer Price Index/Annual indicators/T4CPI.px",
"body": {
"query": [
{
"code": "Year",
"selection": {
"filter": "item",
"values": [
"2022",
"2023"
]
}
}
],
"response": {
"format": "json-stat2"
}
}
});
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"askdata-xk": {
"url": "https://gateway.pipeworx.io/askdata-xk/mcp"
}
}
}
See Getting Started for client-specific install steps.