Skip to main content
Glama

Resolve a pasted map link

resolve_map_url
Read-onlyIdempotent

Pasted Google/Apple/OpenStreetMap/geo: map link -> its coordinate and place.

Instructions

Pasted Google/Apple/OpenStreetMap/geo: map link -> its coordinate and place.

One call for the "meet here: https://maps.app.goo.gl/..." message: hand
over the link as pasted (scheme optional; a wrapping <...> and trailing
punctuation are tolerated) and get back {"lat", "lon", "provider"} plus
whatever the link itself carried — "zoom" when it had one, "label" when
it named a place or search ("Ferry Building", URL-decoded), "note" for a
directions link whose coordinate is only the viewport centre.

Parsed offline, no API key: Google Maps (/maps/place/<name>/@lat,lon,17z,
/maps/@lat,lon, the !3d!4d pin inside data= — preferred over the viewport
centre when both exist — ?q=lat,lon, ?ll=, ?z=, /maps/search/, /maps/dir/,
any google.<tld> host), Apple Maps (?ll=, ?q=, ?address=, ?sll=, ?z=),
OpenStreetMap (#map=z/lat/lon, ?mlat=&mlon= — the marker wins over the
viewport) and geo:lat,lon?z= URIs. The only network hop is a Google short
link (maps.app.goo.gl, goo.gl/maps, g.co): its redirects are followed
(at most 5, 5 s each) and the destination parsed; then "resolved_via" is
"redirect" and "final_url" is the page it landed on. Otherwise
"resolved_via" is "url". A link that names a place but carries no
coordinate (google.com/maps?q=Ferry+Building, Apple ?address=) is
resolved by name through resolve_place — "resolved_via": "name", with
the top hit's coordinate and "match": {"name", "id"}.

include_place (default true) adds "place": the reverse_geocode answer for
the coordinate (nearest address and containing admin areas), or that
call's own error dict — a place lookup failure never fails this call.
Pass false for the bare coordinate.

Errors are structured, never raised: "unsupported_url" (with the
"supported" provider list) for a link on none of these hosts,
"no_location" for a link with no usable coordinate or name (a Google
?cid= id, an OSM /node/<id> page, out-of-range coordinates, or a name
the place search cannot find — then "label" is kept), "redirect_failed"
(with "status" when HTTP said so) for a short link that would not
expand, "bad_request" for an empty or non-string url.

Input Schema

NameRequiredDescriptionDefault
urlYes
include_placeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: parsing is offline with no API key, the only network hop is a short-link expansion limited to 5 redirects of 5s each, and errors are structured rather than raised, with each error code enumerated. It also discloses that a place-lookup failure never fails the call. This is exactly the operational context an agent needs.

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 the one-line purpose, then progressively detailed. The provider-syntax parenthetical is dense and long, but every clause conveys a supported format or precedence rule (e.g., pin preferred over viewport centre), so little is purely decorative.

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 complex multi-provider parser it covers inputs, fallback behaviour, error taxonomy, and the resolved_via/final_url/match outputs. Even though an output schema exists, the description completes the picture without redundancy that misleads.

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

Parameters5/5

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

Schema coverage is 0%, so the description must carry the parameters and it does: url accepts the link as pasted with optional scheme and tolerated wrapping/trailing punctuation, and include_place (default true) adds the reverse_geocode 'place' object, with false returning the bare coordinate.

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 first line states a precise transformation: a pasted Google/Apple/OpenStreetMap/geo map link into its coordinate and place. It is unmistakably distinct from siblings like geocode_address, resolve_place, or reverse_geocode, which operate on names or coordinates rather than pasted links.

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

Usage Guidelines4/5

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

Names the triggering scenario explicitly (the 'meet here: https://maps.app.goo.gl/...' message) and explains the internal fallback to resolve_place for name-only links. It does not contrast against siblings such as geocode_address for the no-link case, but the niche is clear enough to route correctly.

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