Skip to main content
Glama
xmpuspus

ph-civic-data-mcp

by xmpuspus

PSIC industrial classification search

search_psic_codes
Read-onlyIdempotent

Search Philippine Standard Industrial Classification (PSIC) codes by keyword or numeric prefix. Returns matching codes and descriptions.

Instructions

Find a PSIC code by description keyword or by code prefix.

Matches a query of only digits against the PSIC code prefix. Matches any other query by whole-word text against the class description, case-insensitive. PSA publishes the full table (roughly 1,360 rows) on one page, so the first call fetches and caches it for 24 hours. Examples:

search_psic_codes("rice") every description with "rice" as a whole word search_psic_codes("0111") every code that starts with "0111" search_psic_codes("mining", limit=5) at most 5 matches

On failure: data_status is "invalid_request" for an empty, over-long, or non-printable query, or for a limit outside 1-100. A Cloudflare challenge in place of the table gives "unavailable". A missing, empty, or partial PSIC table gives "indeterminate". Neither failure is cached, and the real error sits in caveats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matches to return (1-100).
queryYesDigits for a code-prefix match, or text for a whole-word match against the description, case-insensitive. 1 to 100 printable characters.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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?

Beyond the standard read-only and idempotent annotations, the description discloses that the first call fetches and caches the full PSA table for 24 hours. It also transparently enumerates possible failure states (invalid_request, unavailable, indeterminate) and explains that failures are not cached. This goes well beyond the basic annotations.

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 somewhat long but well-structured: it opens with the core purpose, then provides examples, and finally covers failure modes. Each paragraph serves a clear function, and the content is not redundant. It is slightly verbose but justified by the need to explain caching and edge cases.

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?

Given that an output schema exists (though not shown in the prompt), the description does not need to detail return values. It does cover important context such as caching, failure behavior, and matching rules, which is sufficient for an agent to invoke the tool and interpret results. The only minor gap is not explicitly describing the output structure, but that is covered by the output schema.

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 (query and limit) are fully described in the input schema, and the description reinforces this with detailed examples of digit vs. text queries and the valid range for limit. The examples add practical clarity beyond the schema's dry descriptions, making the expected input formats unambiguous.

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 purpose: find a PSIC code by description keyword or code prefix. It uses a specific verb ('find') and resource ('PSIC code'), and provides concrete examples that distinguish it from other search tools. The name and description align perfectly.

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 explains the matching logic (digit prefix vs. whole-word text) and failure modes, giving agents enough context to decide when to use this tool. It does not explicitly contrast with sibling search tools, but the specific reference to PSIC codes makes the usage context clear enough for most cases.

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