query_table
Pack: statbank-md · 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_table for the schema, then POST the same URL with its arguments for the data.
POST a PxWeb query to a Moldova National Bureau of Statistics (Statbank) 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 — narrow each dimension’s values using codes from table_meta.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | yes | Path ending in the “.px” table id. |
body | object | yes | {query: [{code, selection: {filter, values}}], response: {format: “json-stat2”}} |
selection | unknown | no | |
response | unknown | no |
Example call
Arguments
{
"path": "20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px",
"body": {
"query": [
{
"code": "Ani",
"selection": {
"filter": "item",
"values": [
"2025",
"2026"
]
}
},
{
"code": "Medii",
"selection": {
"filter": "item",
"values": [
"0"
]
}
},
{
"code": "Sexe",
"selection": {
"filter": "item",
"values": [
"0"
]
}
}
],
"response": {
"format": "json-stat2"
}
}
}
curl
curl -X POST https://gateway.pipeworx.io/statbank-md/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query_table","arguments":{"path":"20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px","body":{"query":[{"code":"Ani","selection":{"filter":"item","values":["2025","2026"]}},{"code":"Medii","selection":{"filter":"item","values":["0"]}},{"code":"Sexe","selection":{"filter":"item","values":["0"]}}],"response":{"format":"json-stat2"}}}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('query_table', {
"path": "20 Populatia si procesele demografice/POP010/POPro/POP010100rcl.px",
"body": {
"query": [
{
"code": "Ani",
"selection": {
"filter": "item",
"values": [
"2025",
"2026"
]
}
},
{
"code": "Medii",
"selection": {
"filter": "item",
"values": [
"0"
]
}
},
{
"code": "Sexe",
"selection": {
"filter": "item",
"values": [
"0"
]
}
}
],
"response": {
"format": "json-stat2"
}
}
});
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 statbank-md pack
{
"mcpServers": {
"statbank-md": {
"url": "https://gateway.pipeworx.io/statbank-md/mcp"
}
}
}
See Getting Started for client-specific install steps.