Skip to main content
Glama

latlon_to_gridref

Convert WGS84 latitude and longitude coordinates to an Ordnance Survey grid reference with configurable precision, enabling location mapping and referencing.

Instructions

Convert WGS84 latitude/longitude to an OS grid reference.

Args: lat: latitude in decimal degrees. lon: longitude in decimal degrees. digits: total figures in the reference (2-10, even). 6 = 100 m precision.

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": {
      "lat": "<lat>",
      "lon": "<lon>"
    },
    "name": "latlon_to_gridref"
  }
}

Input Schema

NameRequiredDescriptionDefault
latYes
lonYes
digitsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it discloses the conversion semantics and the precision mapping for digits, but not the shape of the returned reference string, nor what happens for coordinates outside the OS grid domain or invalid digit values. For a low-risk pure-computation tool this is adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose followed by a tight Args block; every line conveys new information and nothing is redundant with the schema beyond the default already stated.

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 simple three-parameter conversion with no output schema, the description covers purpose, units, and precision control. The main remaining gap is the output format — whether the reference is returned with or without a space/separator — which an agent cannot infer from any structured field.

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 description coverage is 0%, so the description must compensate, and it largely does: it names units (decimal degrees) for lat/lon and adds constraints for digits that the schema lacks entirely (range 2-10, must be even, and the concrete 6 = 100 m precision mapping). It stops short of explaining the precision of other values or sign conventions for southern/western coordinates.

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?

States a specific transformation with both source and target reference systems ('WGS84 latitude/longitude' to 'OS grid reference'), which inherently distinguishes it from the inverse sibling gridref_to_latlon. No ambiguity about direction or resource.

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

Usage Guidelines3/5

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

Usage is implied by the conversion direction rather than stated — there is no explicit 'use this when' guidance, no mention of coordinate-domain limits (e.g., coordinates must fall within Great Britain), and no reference to the inverse tool as the alternative. An agent can infer the use case but must supply the conditions itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.