Skip to main content
Glama

get_boundary_geojson_by_code

Fetch the full GeoJSON geometry for a UK boundary by its ONS census code.

Returns a GeoJSON Feature object (WGS-84 / EPSG:4326) suitable for rendering on a map or performing geometric analysis. The geometry can be large — county and ceremonial county polygons are especially heavy. Only call this when you specifically need the shape; for metadata only use get_boundary_by_code() instead.

IMPORTANT — Leaflet / web maps: use get_boundary_geojson_simplified() instead. The full geometry is large enough to exhaust your context window before you can finish writing the page. The simplified version is safe to embed directly in HTML and indistinguishable from the full shape at normal map zoom levels.

Use this tool only when you need full-fidelity geometry for server-side analysis (e.g. precise point-in-polygon checks, area calculations, clipping).

Obtain the census code from search_boundaries_by_name() or find_boundaries_at_point() before calling this.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesONS census / GSS / LAU code, e.g. "E09000012" for Hackney. Case-insensitive.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

Warns about large geometry size and context window exhaustion, and states the output format. Without annotations, it provides sufficient behavioral context, though could mention potential error cases.

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?

Front-loaded main purpose, then adds important warnings and guidance. Slightly verbose but every sentence adds value.

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?

Covers output format, use cases, alternatives, and performance caveats comprehensively for a simple single-parameter tool with output schema.

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?

Input schema has 100% coverage and description adds example code, case-insensitivity note, and code types, enriching the schema's minimal description.

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 fetches full GeoJSON geometry for a UK boundary by ONS code, and distinguishes it from siblings like get_boundary_by_code and get_boundary_geojson_simplified.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use (full-fidelity for server-side analysis) and when not (web maps, use simplified version), and directs to sibling tools for obtaining codes.

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.7/5.0
Disambiguation5/5

Each tool targets a distinct operation: point lookup, bounding box, metadata by code, full geometry, simplified geometry, type codes listing, and name search. Even the two geometry tools are clearly differentiated by simplification level.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case (e.g., find_boundaries_at_point, get_boundary_bbox, list_boundary_type_codes). The naming is predictable and clear.

Tool Count5/5

Seven tools is well-scoped for a UK boundary lookup service. It covers all core operations without being excessive or insufficient.

Completeness5/5

The toolset provides complete coverage for readonly boundary access: name search, point lookup, metadata retrieval, bounding box, and geometry (full and simplified). No obvious gaps for the intended domain.

Resources