Skip to main content
Glama

Psa Ph Get Data

psa_ph_get_data
Read-onlyIdempotent

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.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "select": {
        "Year": "2026",
        "Period": [
          "Sep",
          "Oct"
        ],
        "Commodity Description": "0 - ALL ITEMS"
      },
      "table_id": "2M/PI/CPI/2018NEW/0012M4ACP22.px"
    },
    "name": "psa_ph_get_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectNoMap of dimension code/label to value(s), e.g. {"Commodity Description":"0 - ALL ITEMS","Year":"2025","Period":["Oct","Nov"]}.
table_idYesNative table id from psa_ph_search_tables.

Output Schema

NameRequiredDescriptionDefault
noteNo
rowsNo
cellsNo
titleNo
sourceNo
table_idNo
unit_noteNo
data_as_ofNo
selection_resolvedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (readOnly, idempotent, non-destructive), and the description adds behavior they cannot express: omitted dimensions are defaulted (time to latest, others to first/total), defaults are echoed in `selection_resolved` and `note`, and selections above 1,500 cells are refused with the sizes returned. That is exactly the non-obvious runtime behavior an agent needs to recover from a failed call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with purpose then selector syntax, then defaulting, then the size guard — each sentence carries distinct information with no restatement of the name or title. Density is high but appropriate for a tool with an embedded query language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with nested selection logic, an output schema, and full annotation coverage, the description closes the important gaps: selector syntax, matching order, default resolution, and the oversized-selection failure mode. Only minor edge cases (e.g. behavior on an unrecognized dimension name) are unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description supplies a whole selector mini-language the schema does not: a label/code, an array, "*", "first", "last", "last:N", and the matching precedence (exact code, then exact label, then label text). It also documents fade-out semantics for absent dimensions, which the schema leaves entirely open.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get figures from a PSA table') plus the exact shape of the result (labelled rows with dimension labels, value, unit text, period, data_as_of). That output framing inherently separates it from the metadata-oriented siblings (psa_ph_search_tables, psa_ph_table_info) without the agent needing to open another schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: table_id comes from psa_ph_search_tables (in the schema), and the description explains how to build a `select` map and what happens to omitted dimensions. It stops short of explicit when-not-to-use guidance, e.g. telling the agent to call psa_ph_table_info first to discover valid dimension codes before selecting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.