Skip to main content
Glama

query_by_population

Query PSGC entities by population range. Returns entities sorted by population. Useful for finding the largest/smallest cities, municipalities, or provinces. Barangay queries require a parent_code to narrow scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort order by population (default: desc)
levelYesGeographic level to query
limitNoMax results to return (default 10, max 100)
offsetNoNumber of records to skip (default 0)
parent_codeNoFilter to entities within this parent (required for Bgy). Uses code prefix matching.
max_populationNoMaximum population (inclusive)
min_populationNoMinimum population (inclusive)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the sorting guarantee and the Barangay parent_code requirement, but these are also present in the schema. It doesn't mention if there are any side effects (though it's a query), nor does it explain the response structure or pagination behavior beyond what the schema already covers.

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 four concise sentences, each serving a distinct purpose: purpose, behavior, use case, and a key constraint. No redundancy or filler.

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

Completeness3/5

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

With 7 parameters and no output schema, the description explains the tool's intent and key constraint but does not describe the return format or default pagination behavior. The schema covers parameter defaults, but the lack of output schema leaves a gap in understanding what fields are returned.

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

Parameters3/5

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

Schema coverage is 100% with detailed descriptions for all 7 parameters, so the baseline is 3. The description only reinforces the parent_code requirement and the population range concept, adding little new semantic value beyond 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 the tool's purpose with a specific verb ('Query'), resource ('PSGC entities'), and scope ('by population range'). It also mentions the output behavior ('Returns entities sorted by population') and differentiates from sibling tools by focusing on population-based queries.

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 a clear use case ('finding the largest/smallest cities, municipalities, or provinces') and notes a prerequisite for Barangay queries (parent_code). It doesn't explicitly compare with alternatives, but provides sufficient context for when to use the tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.2/5.0
Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

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).

Completeness5/5

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.

Resources