Skip to main content
Glama

Count planning decisions

aggregate_applications
Read-onlyIdempotent

Count planning applications by LPA, year, decision outcome and application type, each with its base (applications held; applications with searchable documents); filter by any of them, so a householder refusal rate is one call. Count by validation date or by decision date (decided_from/decided_to, group_by decision_year). Narrow by the scheme facts read from each description: kind of work (work_kind, e.g. new_building), development category and net new homes (min_net_new_homes / max_net_new_homes), so refused new-build schemes of one to nine homes since 2023 are one call. Optionally count only applications with a document mentioning a word or phrase (English full-text search). A mention is not a finding. examples_per_group returns randomly chosen example ids with example_records (each one's description, decision, outcome, kind of work and net new homes), with or without text: without text they are drawn at random from every application the filters keep, so ten random refusals decided in the last six months, from any council, is one call (filters.outcome ['refused'], decided_from/decided_to, no group_by, examples_per_group 10). Prefer that to a phrase when the filters alone say what is wanted. It does not search for people's names or home addresses: a query for one is refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "aggregate_applications"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNooptional: count only applications with a document that mentions this. Web-search syntax — "quoted phrases", OR, -exclusion; English stemming (newts matches newt). A mention is not a finding.
limitNomaximum groups returned, largest first (by matching in text mode, by held in typed mode); truncated=true when more exist
filtersNooptional, AND-combined filters: LPA slugs, a valid-date window, a decision-date window, decision outcomes, application types and the scheme facts (kind of work, development category, net new homes)
group_byNo0-2 of lpa | year | outcome | application_type | decision_year; year is the year the application was validated, decision_year the year it was decided; empty = totals only
examples_per_groupNoup to this many randomly chosen application ids (lpa_slug:app_ref) per group, for the caller to open and cite; example_records gives each one's description, decision, outcome and net new homes. Works in typed mode (no text): drawn at random from every application the filters keep, so ten random refusals decided in a window is filters.outcome ['refused'] with decided_from/decided_to and examples_per_group 10. In text mode drawn from the matching applications. At most 5 per group with group_by; up to 10 without group_by, where they are drawn over all applications in scope and returned on totals.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the read-only, idempotent annotations, the description explains bases ('applications held; applications with searchable documents'), that a text mention 'is not a finding,' that unread applications never match, and how examples are sampled with or without text. It also discloses that queries for people's names or home addresses are refused.

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 purpose and main filtering model are front-loaded, and the dense sentences mostly earn their place for a complex aggregation tool. Some examples_per_group details are repeated from the schema, making it longer than strictly necessary.

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?

For a complex, multi-filter aggregation tool with no output schema, the description covers grouping, bases, examples, text-search caveats, and exclusions well. It could more explicitly describe the returned shape around limit/truncated and coverage counts, but the core calling behavior is sufficiently clear.

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?

Schema coverage is 100%, so the schema already carries the parameter definitions. The description adds practical meaning beyond the schema by tying parameters to concrete calls, such as application_type ['householder'] with group_by ['outcome'], and by explaining examples_per_group behavior in typed versus text mode.

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 opens with a specific verb and resource: 'Count planning applications by LPA, year, decision outcome and application type.' It also distinguishes this from search-style siblings, including the explicit note that it does not search for people's names or home addresses.

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 scenarios such as 'a householder refusal rate is one call' and advises preferring filters over a phrase when the filters alone express the request. It also states an exclusion around names and addresses, though it does not explicitly compare against sibling search tools like search_applications.

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.