Skip to main content
Glama

Validate Mexican Postal Code

envia_validate_zipcode
Read-onlyIdempotent

Validate a 5-digit Mexican postal code and return address details such as city, state, neighborhoods, coordinates, and timezone for shipping or location checks.

Instructions

Validate a Mexican postal code and return address details (city, state, neighborhoods, coordinates).

Uses the Envia Geocodes API which requires no authentication.

Args: postal_code — 5-digit Mexican postal code (e.g., "06700") country_code — Country code (default: "MX") response_format — "markdown" (default) or "json"

Returns: Validity status, city, state, state codes, neighborhoods, coordinates, and timezone.

Examples: Valid code: postal_code="06700" -> Roma Norte, Ciudad de Mexico Invalid code: postal_code="99999" -> { valid: false }

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": {
      "postal_code": "<postal_code>"
    },
    "name": "envia_validate_zipcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
postal_codeYes5-digit Mexican postal code (e.g., "06700")
country_codeNoCountry code (default: MX)MX
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Output Schema

NameRequiredDescriptionDefault
cityNo
stateNo
validYes
timezoneNo
coordinatesNo
postal_codeYes
neighborhoodsNo
state_code_2digitNo
state_code_3digitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/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 adds genuinely useful context beyond that: no authentication required, the upstream Geocodes API identity, the { valid: false } shape for invalid codes, and 500+ behavior with automatic retry against a production fallback.

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 purpose sentence followed by tight Args/Returns/Examples/Errors sections. Each block is short, scannable and carries distinct information; even the examples add a concrete valid and invalid case rather than padding.

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 three-parameter read-only lookup with a full output schema, the description covers purpose, inputs, outputs, both success and failure examples, and error/retry behavior. Nothing an agent needs in order to invoke it correctly or interpret a failure 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 the schema already documents all three parameters, their default values and the response_format enum. The description restates them with the same example code ("06700") and adds no new syntax, format constraints or edge cases, so baseline 3 applies.

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 description opens with a specific verb and resource ("Validate a Mexican postal code") and states the payload returned (city, state, neighborhoods, coordinates). That is clearly distinguishable from siblings like envia_lookup_city or envia_quote without opening any schema.

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 purpose and by the valid/invalid examples, which show the expected input shape. However, it never states when to prefer this over nearby siblings such as envia_lookup_city, nor any preconditions or exclusions, so an agent must infer the routing decision.

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