Skip to main content
Glama

Spatial India

Rank districts

rank_districts
Read-only

Use for best/worst/highest/lowest questions over many districts — "worst 20 districts for child stunting in Uttar Pradesh". Check the indicator's polarity in the result before calling a tail "worst": for a higher-worse indicator the worst districts are order: "desc", for higher-better they are order: "asc". Districts the source never covered sort last in both directions and are never presented as an extreme.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many districts to return. Defaults to 20.
orderNodesc = highest value first. Defaults to desc.
scopeNoA state name to rank within. Omit to rank every district of India.
indicatorYesOne indicator id from find_indicator.

Schema Changelog

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

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the read-only safety profile, so the description adds value by disclosing the polarity-checking behavior and the handling of districts the source never covered: they sort last and are never presented as an extreme. This is meaningful behavioral context beyond the annotations and helps the agent interpret results correctly.

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 compact and front-loaded with the main use case, then follows with the critical polarity caveat and the missing-data behavior. Every sentence contributes to correct tool invocation without padding or repetition.

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?

For a ranking tool with no output schema, the description adequately covers when to use it, how to choose the order parameter, and how missing districts are handled. The parameter guidance combined with the fully documented input schema gives an agent everything needed to invoke it 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 documents all parameters at 100% coverage, so the baseline is 3. The description adds valuable semantics by explaining how the 'order' parameter should be derived from the indicator's polarity, and clarifies the behavior for uncovered districts. This goes beyond the bare schema definitions.

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 states a specific verb ('rank'), a clear resource ('districts'), and the exact question types it serves ('best/worst/highest/lowest questions over many districts'). The example 'worst 20 districts for child stunting in Uttar Pradesh' removes any ambiguity, and the 'many districts' framing helps distinguish it from sibling tools like compare_districts and get_district.

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?

It gives clear usage context: use for best/worst/highest/lowest questions across many districts, with a concrete example. It does not explicitly name alternatives or say when not to use this tool, but the scope phrasing and sibling names make the appropriate choice reasonably clear.

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.

Resources