Count planning decisions
aggregate_applicationsCount 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
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | optional: 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. | |
| limit | No | maximum groups returned, largest first (by matching in text mode, by held in typed mode); truncated=true when more exist | |
| filters | No | optional, 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_by | No | 0-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_group | No | up 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. |