Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

Browse the PSA OpenSTAT catalog

browse_psa_catalog
Read-onlyIdempotent

Navigate the PSA OpenSTAT catalog level by level to locate statistical tables without needing table IDs. Browse subjects and folders until dataset entries appear.

Instructions

List one level of the PSA OpenSTAT statistical catalog.

OpenSTAT publishes roughly 2,900 tables across 27 subjects. This walks that tree one level at a time, so an agent can find a dataset without guessing a table id. A dataset entry is a .px table. Pass its path to describe_psa_dataset before calling query_psa_dataset. Folder depth varies by subject, so keep browsing until entries come back as datasets. Examples:

browse_psa_catalog() the 27 top-level subjects browse_psa_catalog("1F") one level into the Poverty subject browse_psa_catalog("1F/FY") the Full Year Poverty Statistics tables

On failure: data_status is "invalid_request" for a rejected argument and "unavailable" for an OpenSTAT outage. A bad path sets validation_error true before any request goes out. An unreachable catalog sets upstream_error true, with the real error in caveats. Both return an empty entries list, which never means an empty folder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoRelative catalog path such as "1F" or "1F/FY". None or "" returns the 27 top-level subjects. Use the `path` field of an entry from a previous call to go one level deeper.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
pathNoRelative path browsed.
sourceYesUpstream data source name.
caveatsYes
entriesYes
licenseNo
source_urlYesCanonical OpenSTAT URL used.
parent_pathNo
folder_countNo
dataset_countNo
upstream_errorNoTrue when OpenSTAT was unreachable. Not an empty result.
validation_errorNoTrue when the caller's arguments were rejected before any request.
data_retrieved_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

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

The description thoroughly explains failure modes (validation_error, upstream_error, data_status values) and clarifies that an empty list does not mean an empty folder. This goes well beyond the readOnlyHint/idempotentHint annotations, providing detailed behavioral expectations.

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?

The description is well-organized, uses bullet-like examples, and conveys all necessary information without unnecessary verbosity. It is concise yet comprehensive.

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 simple one-parameter tool, the description provides sufficient context about the tree structure, failure handling, and integration with sibling tools. The existence of an output schema covers return format, so no critical information is missing.

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?

Even though the input schema already fully describes the 'path' parameter, the description adds valuable examples ('1F', '1F/FY') and clarifies the navigation rule 'keep browsing until entries come back as datasets', which is absent from the schema.

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?

The description clearly states that the tool lists one level of the PSA OpenSTAT catalog, providing examples and explaining its role in navigating the catalog tree. It also distinguishes itself by mentioning 'find a dataset without guessing a table id', making the purpose specific and actionable.

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?

The description gives practical usage guidance, including examples and how to use the 'path' field to go deeper, and mentions sequencing with describe_psa_dataset. However, it does not explicitly contrast this tool with sibling search_psa_catalog, which could confuse an agent about when to browse versus search.

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