Skip to main content
Glama

Resolve an address to a district

resolve_district
Read-onlyIdempotent

Resolves a structured address (governorate / city / area) to one bookable delivery district id. Returns { match, candidates }: when the address resolves exactly, match holds the districtId; when it does not, match is null and candidates lists the closest districts. A free-text district is rejected at booking.

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": {
      "store": "<store>"
    },
    "name": "resolve_district"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoThe district / neighbourhood.
cityNoCity within the governorate.
storeYesThe store, from find_stores or search_all_stores (its `store` field).
governorateNoArabic or English name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / city / description
      Added value: +"City within the governorate."
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuine context beyond that: the exact return shape (`{ match, candidates }`), the null-match fallback with closest candidates, and the downstream booking rule rejecting free-text districts. It stops short of saying how candidates are ranked or how many are returned.

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?

Three tight sentences: purpose first, return contract second, booking caveat last. No filler, and the most decision-relevant information (exact match vs candidates) is front-loaded.

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?

With no output schema, the description fully carries the return contract by spelling out `match` and `candidates` semantics. Combined with 100% schema coverage and strong annotations, an agent has everything needed to invoke and interpret this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented, including that `store` comes from find_stores/search_all_stores. The description adds the composite framing of governorate/city/area as an address hierarchy and that governorate accepts Arabic or English, but nothing on matching tolerance or which fields are optional in practice.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Resolves a structured address ... to one bookable delivery district id') and names the input dimensions (governorate / city / area) and the returned field (districtId). It implicitly separates itself from free-text district lookup by insisting on a structured address, though it never names search_districts as the alternative.

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 clearly enough: call this when you have a structured governorate/city/area plus a store and need a bookable district id. The closing note that 'a free-text district is rejected at booking' hints at when not to pass raw text, but no alternative tool or explicit exclusion is stated.

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.