Skip to main content
Glama

get_boundary_by_code

Look up metadata for a single UK boundary by its ONS census code. No geometry.

Use this when you already have a census code (e.g. from search_boundaries_by_name() or find_boundaries_at_point()) and need structured metadata such as area size or type label. If you also need the boundary shape for display or analysis, call get_boundary_geojson_by_code() instead.

ONS census codes (sometimes called GSS codes or LAU codes) are stable identifiers of the form "E09000012" (Hackney), "E10000016" (Kent), etc. The first letter indicates the country: E = England, W = Wales, S = Scotland, N = Northern Ireland.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesONS census / GSS / LAU code, e.g. "E09000012". Case-insensitive — "e09000012" resolves to the same boundary.

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?

No annotations provided, but description compensates by disclosing that it does not return geometry, describes the output as metadata, and explains code format and case-insensitivity. Could mention read-only nature explicitly.

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 with main purpose and constraints. The additional paragraph on ONS codes is helpful but slightly lengthens the description. Still well-structured and efficient.

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 simple tool with one parameter and an output schema, the description covers purpose, usage context, code format, and alternatives. No gaps identified.

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 already describes the code parameter (format, case-insensitivity) with 100% coverage. Description adds value by explaining the meaning of ONS census codes and country prefix, which aids understanding beyond 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?

Description uses specific verb 'look up metadata' for a single UK boundary by ONS census code, and explicitly states 'No geometry', distinguishing it from sibling tools that return geometry.

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?

Clearly states when to use (when you already have a census code and need metadata) and explicitly names an alternative (get_boundary_geojson_by_code for shapes), providing complete guidance.

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