Skip to main content
Glama

Rank areas inside a container by a metric

rank_areas
Read-onlyIdempotent
Rank the places at one rung inside a container (a local authority, county or
country) by a published metric, with a minimum-sample filter and an optional
recency filter. Use it for "which districts in Hackney have the highest rent".
`within_code` is the container's ONS/GSS code (resolve_place gives it).

At most 50 rows per page (`limit`), `next_cursor` for more. Places with n
below `min_n` (default 10) are dropped and the count is stated in
`basis.decision`. Gross yield is not published for Scotland or conurbations
(covered=false). Region is not a rung yet. Figures are the published 12-month
values; check each row's `period` and `n`.

Do NOT use it to value anything. Free; covered=false or an upstream failure
is not charged. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "within_type": "<within_type>",
      "within_code": "<within_code>",
      "rung": "<rung>",
      "metric": "<metric>"
    },
    "name": "rank_areas"
  }
}

Input Schema

NameRequiredDescriptionDefault
rungYes
limitNo
min_nNo
cursorNo
metricYes
directionNodesc
within_codeYes
within_typeYes
max_age_monthsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses pagination limits (50 rows), cursor-based continuation, min_n filtering behavior, coverage gaps for gross yield in Scotland and conurbations, the 'region is not a rung' limitation, recency filtering, and that covered=false or upstream failures are not charged. This is substantial operational context for correct invocation and interpretation.

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 front-loaded with the core ranking behavior and then layers useful constraints and caveats. It is generally efficient, though the word 'Free' is repeated unnecessarily at the end.

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 the tool's complexity (nine parameters, output schema present), the description covers the key scoping, filtering, pagination, coverage, and cost behavior. It falls short mainly on direction and cursor parameter semantics, but the output schema reduces the need to explain return values.

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 description coverage is 0%, so the description must carry parameter meaning. It explains within_code as an ONS/GSS code, limit as max 50 rows, min_n as a minimum-sample filter with default 10, and recency filtering, but it does not explain the direction parameter or clearly map the cursor parameter (it says 'next_cursor for more'). Several enum parameters are also left to 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 states a specific verb and resource: rank places at one rung inside a container by a published metric. It clarifies the container types and gives a concrete example ('which districts in Hackney have the highest rent'), making the tool's scope immediately clear.

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 a clear use case and explicitly excludes valuation ('Do NOT use it to value anything'), and points to resolve_place for obtaining within_code. It does not explicitly contrast with close siblings such as compare_areas, but the ranking-inside-a-container scope is well communicated.

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