get_hierarchy
Get the full administrative hierarchy for a PSGC entity. Returns the chain from the entity up through its parent city/municipality, province, and region.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 10-digit PSGC code |
Get the full administrative hierarchy for a PSGC entity. Returns the chain from the entity up through its parent city/municipality, province, and region.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 10-digit PSGC code |
Changes observed during successful MCP inspections. Dates show when Glama detected each change.
Input schema / properties / code / patternAdded value: +"^\\d{10}$"Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It explicitly states the traversal direction (up through parents) and the components of the hierarchy (city/municipality, province, region), providing meaningful behavioral context. Minor gaps remain (e.g., handling of top-level entities, whether the entity itself is included), but the core behavior is well disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two sentences, front-loaded with the verb and resource, and contains no filler. Every word adds value, clearly explaining both the action and the return structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has a single parameter and no output schema. The description adequately explains the return value (the hierarchy chain) and the entity type (PSGC), giving an AI enough context to select the tool. It doesn't detail exact output formatting, but that is unlikely necessary for tool selection given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage of the single parameter ('code') with a clear description ('10-digit PSGC code'). The tool description adds no additional parameter information, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Get the full administrative hierarchy') and resource ('PSGC entity'), then specifies exactly what is returned (chain up through city/municipality, province, and region). This distinguishes it from sibling tools like list_children (which likely goes downward) and lookup (which likely returns a single entity).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the use case clear: when you need the full upward hierarchy for a PSGC code. It doesn't explicitly name sibling tools or contrast them, but the description's specificity provides enough context to infer when this tool is appropriate (vs. list_children for downward traversal or lookup for a single entity).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.
Each tool has a clearly distinct purpose: lookup single code, batch lookup, search by name, list by geographic level, list children, get hierarchy, and query by population. There is no overlap; even the two lookup tools are differentiated by batch vs single.
Most tools follow a verb_noun pattern in snake_case (e.g., batch_lookup, get_hierarchy, list_children), but 'lookup' and 'search' are single words, and 'list_by_type' and 'query_by_population' include prepositions. The naming is clear and readable but not perfectly uniform.
7 tools is well-scoped for a geographic entity server. Each tool provides a distinct function without being too few (covering essential lookups, search, and listing) or too many (no redundancy).
The tool set covers all common read operations for geographic entities: single and batch lookup, name search, listing by type and children, hierarchy, and population queries. There are no obvious gaps for the intended read-only domain.