Skip to main content
Glama

Resolve a location

resolve_location
Read-onlyIdempotent

Turns free text such as 20 miles of Leeds, Yorkshire or LS1 into region, county, town, postcode or radius filters, each with a count and a ready filter. Ambiguous places come back as candidates with a question, so ask the user which they meant rather than choosing. Free and needs no account, though a radius under 5 miles needs an account. Add the chosen filter to the audience, then call count_audience. Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

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": {
      "text": "<text>"
    },
    "name": "resolve_location"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesFree text such as "20 miles of Leeds", "Yorkshire" or "SW1".
datasetNoThe dataset an audience draws from. uk_contacts is live; ie_contacts and global_contacts are listed but not yet served.
radius_milesNo

Output Schema

NameRequiredDescriptionDefault
textYes
questionYes
ambiguousYesTrue when more than one candidate fits; ask the person which they meant.
candidatesYes
disclosureYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / SinceFilter / properties / field / enum
      Previous value: -[
      -  "contact.last_validated_at",
      -  "email.last_verified_at",
      -  "signal.type",
      -  "signal.observed_at"
      -]New value: +[
      +  "contact.last_validated_at",
      +  "contact.last_confirmed_at",
      +  "contact.privacy_notice_last_sent_at",
      +  "contact.privacy_notice_first_sent_at",
      +  "email.last_verified_at",
      +  "signal.type",
      +  "signal.observed_at"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and closed-world safety, yet the description still adds real context: ambiguous input returns candidates plus a question, the call is free and accountless, and the sub-5-mile radius gating. It also discloses the default compliance posture (UK GDPR 6(1)(f), PECR corporate-subscribers-only, sole traders excluded unless toggled), which materially affects result interpretation. Slight ding for not stating whether counts are exact or estimated.

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-loads the core transformation and the ambiguity rule, then appends workflow and compliance context. It is dense but not padded; the only drag is the long final compliance sentence, which packs three distinct facts into one line.

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?

Even though an output schema exists and return values needn't be spelled out, the description still explains what comes back (filters with counts, or candidate places with a question). Combined with the account precondition and compliance defaults, an agent has everything needed to call it and to route its output correctly.

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 67%; the one undocumented parameter is radius_miles, and the description compensates by revealing the 5-mile account threshold, which is not in the schema. The text parameter's accepted forms are reinforced with examples beyond the schema's own. The dataset parameter is already fully explained in the schema, so no credit there.

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: free text (with concrete examples '20 miles of Leeds', 'LS1') into region/county/town/postcode/radius filters with counts and ready filters. The verb and resource are unambiguous and the 'resolve geography' role is clearly distinct from audience-counting or filter-listing siblings.

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?

Gives explicit downstream workflow ('Add the chosen filter to the audience, then call count_audience') and a decision rule for ambiguity ('ask the user which they meant rather than choosing'). It also flags the precondition that a radius under 5 miles requires an account, which changes whether the agent can proceed.

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.

Resources