Skip to main content
Glama

Look Up City

envia_lookup_city
Read-onlyIdempotent

Look up cities by name to find their postal codes, state, and region information, optionally filtered by country code.

Instructions

Look up cities by name to find postal codes, state, and region information.

Uses the Envia Geocodes API which requires no authentication.

Args: city — City name to search for (e.g., "Monterrey", "Guadalajara") country_code — Country code (default: "MX") response_format — "markdown" (default) or "json"

Returns: List of matching cities with state, postal codes, and region info.

Examples: Look up Monterrey: city="Monterrey" Look up with country: city="Monterrey", country_code="MX"

Errors: 500+ — Geocodes API temporarily unavailable (auto-retries with production fallback)

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": {
      "city": "<city>"
    },
    "name": "envia_lookup_city"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityYesCity name to search for (e.g., "Monterrey", "Guadalajara")
country_codeNoCountry code (default: MX)MX
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Output Schema

NameRequiredDescriptionDefault
totalYesNumber of matching cities
citiesYes
city_queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description still adds real value beyond them: no authentication needed, and a non-obvious retry behavior with production fallback on 500+ errors, which an agent would not otherwise know when interpreting failures.

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

Conciseness3/5

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

Front-loaded purpose sentence is good and the Examples and Errors sections earn their space. But the Args and Returns sections duplicate the input schema and output schema almost word for word, adding length without adding information.

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?

With rich annotations and an output schema present, the description covers the important edges: auth-free access, defaults, error/retry behavior. Minor gaps remain — matching semantics (prefix, fuzzy, case sensitivity) and country coverage are unstated — but nothing essential for correct invocation is missing.

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 three parameters are already documented in the schema. The Args section largely restates those schema descriptions verbatim (city, country_code, response_format) rather than adding format rules, matching behavior, or constraints, so the baseline 3 applies.

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 ("Look up cities by name") plus the payload an agent gets back (postal codes, state, region). It is clearly distinguishable from operational siblings like envia_create_label or envia_track, but it never contrasts itself with the closest relative, envia_validate_zipcode, which also deals with postal codes.

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?

Provides usable invocation context ("requires no authentication", default country MX) and two worked examples, so an agent knows how to call it. However, there is no when-to-use vs when-not-to-use guidance and no routing to envia_validate_zipcode for reverse postal-code lookups, leaving the alternative-selection decision to inference.

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