psa_ph_get_data
Pack: psa-ph · 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/psa_ph_get_data for the schema, then POST the same URL with its arguments for the data.
Get figures from a Philippine Statistics Authority (PSA) table as labelled rows (dimension labels, value, unit text from the table title, period, data_as_of). select maps a dimension (code or label) to what you want: a value label or code, an array of them, ”*” for all, “first”, “last”, or “last:N” for the final N. Matching is by exact code, exact label, then label text. Any dimension you leave out is defaulted — time dimensions to their latest value, every other to its first value (usually the total) — and every default is listed in selection_resolved and note. Selections above 1,500 cells are refused with the sizes so you can narrow them.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
table_id | string | yes | Native table id from psa_ph_search_tables. |
select | object | no | Map of dimension code/label to value(s), e.g. {“Commodity Description”:“0 - ALL ITEMS”,“Year”:“2025”,“Period”:[“Oct”,“Nov”]}. |
Example call
Arguments
{
"table_id": "2M/PI/CPI/2018NEW/0012M4ACP22.px",
"select": {
"Commodity Description": "0 - ALL ITEMS",
"Year": "2026",
"Period": [
"Sep",
"Oct"
]
}
}
curl
curl -X POST https://gateway.pipeworx.io/psa-ph/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"psa_ph_get_data","arguments":{"table_id":"2M/PI/CPI/2018NEW/0012M4ACP22.px","select":{"Commodity Description":"0 - ALL ITEMS","Year":"2026","Period":["Sep","Oct"]}}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('psa_ph_get_data', {
"table_id": "2M/PI/CPI/2018NEW/0012M4ACP22.px",
"select": {
"Commodity Description": "0 - ALL ITEMS",
"Year": "2026",
"Period": [
"Sep",
"Oct"
]
}
});
Response shape
| Field | Type | Description |
|---|---|---|
table_id | string | |
title | string | |
unit_note | string | |
source | string | |
data_as_of | string | |
cells | number | |
selection_resolved | object | |
rows | array | |
note | string |
Full JSON Schema
{
"type": "object",
"properties": {
"table_id": {
"type": "string"
},
"title": {
"type": "string"
},
"unit_note": {
"type": "string"
},
"source": {
"type": "string"
},
"data_as_of": {
"type": "string"
},
"cells": {
"type": "number"
},
"selection_resolved": {
"type": "object",
"properties": {
"Commodity Description": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"chosen": {
"type": "array",
"items": {
"type": "string"
}
},
"how": {
"type": "string"
}
},
"additionalProperties": true
},
"Year": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"chosen": {
"type": "array",
"items": {
"type": "string"
}
},
"how": {
"type": "string"
}
},
"additionalProperties": true
},
"Period": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"chosen": {
"type": "array",
"items": {
"type": "string"
}
},
"how": {
"type": "string"
}
},
"additionalProperties": true
},
"Geolocation": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"chosen": {
"type": "array",
"items": {
"type": "string"
}
},
"how": {
"type": "string"
},
"defaulted": {
"type": "boolean"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Geolocation": {
"type": "string"
},
"Commodity Description": {
"type": "string"
},
"Year": {
"type": "string"
},
"Period": {
"type": "string"
},
"value": {
"type": "number"
}
},
"additionalProperties": true
}
},
"note": {
"type": "string"
}
},
"additionalProperties": true
}
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 psa-ph pack
{
"mcpServers": {
"psa-ph": {
"url": "https://gateway.pipeworx.io/psa-ph/mcp"
}
}
}
See Getting Started for client-specific install steps.