Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

Resolve a Philippine place name to PSGC

resolve_ph_location
Read-onlyIdempotent

Resolve Philippine place names to official PSGC records, handling nicknames like QC or ambiguous names by returning best match and alternatives.

Instructions

Fuzzy-resolve a Philippine place name to its canonical PSGC record.

Handles common nicknames directly, such as "QC", "Gensan", "CDO", and "Metro Manila". An ambiguous name such as "San Juan" still returns one best match, plus an alternatives list of the other candidates. This tool sets no data_status field on any path. Check matched and upstream_error instead. Examples:

resolve_ph_location("Cebu City") exact city match resolve_ph_location("QC") nickname resolves to Quezon City resolve_ph_location("San Juan") ambiguous name, returns alternatives

On failure, a clean no-match returns matched: false and caveats, with no upstream_error key at all. When the PSGC API itself is unreachable, it returns matched: false, upstream_error: true, and the real error in caveats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesFree-text place name. Examples: "Sta. Mesa, Manila", "Cebu City", "NCR", "Pampanga", "Tagaytay".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

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

The description transparently explains return behavior beyond the annotations: it states that no data_status field is set, that matched and upstream_error should be checked, and precisely describes the two failure modes. This is consistent with the readOnlyHint, idempotentHint, and openWorldHint annotations.

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 concise and well-structured, with a clear opening statement, useful examples, and explicit failure-mode explanations. Every sentence contributes to understanding the tool's behavior without redundancy.

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?

Given the simple one-parameter input and available output schema, the description sufficiently covers expected outcomes, including success, ambiguous matches, and both failure modes. It provides all necessary context for an agent to call the tool correctly.

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?

The schema already describes query as a free-text place name with examples. The description adds meaning by clarifying that fuzzy matching and common nicknames are accepted, which informs how the query parameter is interpreted. No additional parameter details are needed.

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 the tool's specific verb and resource: fuzzy-resolve a Philippine place name to a canonical PSGC record. It also differentiates itself from sibling tools by focusing on place-name resolution rather than data retrieval, and includes concrete examples.

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 by noting that common nicknames are handled, ambiguous names return a best match plus alternatives, and failure modes are distinguishable via matched and upstream_error. It does not explicitly compare against alternate sibling tools, but the usage behavior is well explained.

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