Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

Search the PSA OpenSTAT catalog

search_psa_catalog
Read-onlyIdempotent

Search Philippine Statistics Authority OpenSTAT datasets by keyword to locate relevant data without manual browsing.

Instructions

Find a PSA OpenSTAT dataset by keyword, without browsing level by level.

Matches a case-insensitive substring against every dataset title and path in the catalog. The first call after a cold start walks the whole ~2,900-table tree and can take a few minutes. The flattened index then caches for 24 hours, so a later search answers from memory. Examples:

search_psa_catalog("fertility") datasets with "fertility" in the title or path search_psa_catalog("poverty incidence", limit=5) at most 5 matches

On failure: data_status is "invalid_request" for an empty keyword or a bad limit, and "unavailable" for an OpenSTAT outage during the catalog walk. validation_error or upstream_error is set to match. The real error sits in caveats. Neither failure is cached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matches to return (1-100, default 20).
keywordYesCase-insensitive substring to match against a dataset title or path, for example "fertility", "poverty incidence", "CPI".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
limitNo
sourceYesUpstream data source name.
caveatsYes
keywordYes
licenseNo
matchesYes
source_urlYesCanonical OpenSTAT URL used.
data_statusNo
match_countYes
upstream_errorNoTrue when OpenSTAT was unreachable. Not an empty result.
total_availableNo
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.8.0

TDQS

A4.5/5.0
Behavior5/5

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

The description fully discloses behavioral traits: read-only, idempotent, first-call latency, 24-hour caching, and specific error conditions (invalid_request, unavailable). It goes beyond annotations by explaining the cold start and caching behavior, with no contradictions.

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

Conciseness4/5

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

The description is well-structured with clear sections for purpose, examples, and failure modes. It is detailed but not excessively verbose, providing all necessary operational context without redundancy.

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

Completeness4/5

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

The presence of an output schema covers return format, and the description explains error responses and caching behavior. It gives an agent enough context to decide when to call this tool and what to expect. Could mention output fields, but the output schema handles that.

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

Parameters4/5

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

Both parameters (keyword, limit) are fully described in the schema with defaults and examples. The description reinforces the keyword matching behavior and provides concrete usage examples, adding value beyond the schema itself. Schema coverage is 100%, so this is above the baseline.

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?

Clearly states the tool searches the PSA OpenSTAT catalog by keyword, explicitly contrasting with browsing level by level. The verb 'find' and resource 'PSA OpenSTAT dataset' are specific, and it distinguishes itself from sibling tools like browse_psa_catalog by emphasizing keyword-based search.

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?

Implies when to use this tool (when you need to find a dataset by keyword rather than browsing) and provides useful performance details (cold start delay, caching) and failure modes. However, it does not explicitly contrast with other search tools like search_hdx_datasets or search_procurement, leaving some inference to the reader.

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