Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ENVIA_API_KEYYesYour Envia.com API key.
ENVIA_QUERIES_URLNoQueries API base URL. Defaults to the Envia sandbox host https://queries-test.envia.com; set to https://queries.envia.com for production.https://queries-test.envia.com
ENVIA_GEOCODES_URLNoGeocodes API base URL. Defaults to https://geocodes.envia.com. Sandbox geocodes is down, so geocodes always uses production.https://geocodes.envia.com
ENVIA_SHIPPING_URLNoShipping API base URL. Defaults to the Envia sandbox host https://api-test.envia.com; set to https://api.envia.com for production.https://api-test.envia.com
ENVIA_DEFAULT_CURRENCYNoDefault currency used by the MCP server. The server defaults to MXN; set this variable to change the default.MXN

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
envia_quoteA

Get shipping rate quotes from 34+ Mexican carriers via Envia.com.

Args: origin_* — Sender address fields (name, street, street_number, neighborhood, city, state, postal_code, phone, email) dest_* — Recipient address fields (same structure) package_weight_kg — Weight in kg package_length_cm, package_width_cm, package_height_cm — Dimensions in cm package_contents — Description of contents declared_value_mxn — Declared value (optional, default 0) carrier — Carrier filter: "dhl", "fedex", "estafeta", etc. Omit to quote ALL carriers. response_format — "markdown" (default) or "json"

Returns: List of rate options sorted by price (cheapest first) with carrier, service, delivery days, and price breakdown.

Examples: Quote all carriers: omit carrier field Quote single carrier: carrier="fedex"

Errors: 400 — Invalid address or package fields 403 — Invalid API key

envia_create_labelA

Purchase a shipping label from Envia.com. THIS COSTS REAL MONEY.

WARNING: This tool is NOT idempotent. Each call creates a NEW shipment and charges your account. Do NOT call this tool multiple times for the same shipment — you will be double-charged. Always confirm with the user before calling this tool.

Args: origin_* — Sender address fields (name, company, street, street_number, neighborhood, city, state, postal_code, phone, email) origin_rfc — RFC / tax ID (default: XAXX010101000 for general public) dest_* — Recipient address fields (same structure) package_name — Short name for the package package_weight_kg, package_length_cm, package_width_cm, package_height_cm — Dimensions package_contents — Description of contents declared_value_mxn — Declared value (optional, default 0) carrier — Carrier string from quote response (e.g., "dhl") service — Service string from quote response (e.g., "ground") print_format — "PDF" (default) or "ZPL" print_size — "STOCK_4X6" (default) or "PAPER_8.5X11" response_format — "markdown" (default) or "json"

Returns: Shipment ID, tracking number, label URL, total price in USD, and remaining balance.

Errors: 400 — Invalid address/package fields or carrier/service mismatch 403 — Invalid API key Insufficient balance — Check current_balance_usd in response

envia_trackA

Track one or more shipments by tracking number.

Args: tracking_numbers — Comma-separated tracking numbers (e.g., "2456698904,2456699011") response_format — "markdown" (default) or "json"

Returns: Tracking status, carrier, dates, URLs, and event history for each shipment.

Examples: Single: tracking_numbers="2456698904" Batch: tracking_numbers="2456698904,2456699011,2456699128"

Errors: 1125 — No shipments found for the given tracking numbers 403 — Invalid API key

envia_cancelA

Cancel a shipment and request a refund. This is a DESTRUCTIVE operation.

WARNING: Cancellation cannot be undone. Confirm with the user before proceeding. If the shipment is already canceled, error 1115 will be returned.

Args: carrier — Carrier string (e.g., "dhl", "fedex", "estafeta") tracking_number — Tracking number of the shipment to cancel response_format — "markdown" (default) or "json"

Returns: Cancellation status, refunded amount, and balance return info.

Errors: 1115 — Shipment is already canceled 400 — Invalid carrier or tracking number 403 — Invalid API key

envia_validate_zipcodeA

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)

envia_get_carriersA

List available shipping carriers on Envia.com for a country.

Mexico has 34+ carriers including DHL, FedEx, Estafeta, PaqueteExpress, Redpack, etc.

Args: country_code — Country code (default: "MX") limit — Max results per page (1-50, default: 20) offset — Pagination offset (default: 0) response_format — "markdown" (default) or "json"

Returns: Paginated list of carriers with ID, name, endpoint, weight limits, and pickup info.

Examples: First page: limit=20, offset=0 Second page: limit=20, offset=20 All MX carriers: limit=50, offset=0

Errors: 403 — Invalid API key

envia_get_servicesA

List available services for a specific carrier on Envia.com.

Service counts vary by carrier: DHL=31, FedEx=130, Estafeta=8.

Args: carrier — Carrier string (e.g., "dhl", "fedex", "estafeta") country_code — Country code (default: "MX") limit — Max results per page (1-100, default: 20) offset — Pagination offset (default: 0) response_format — "markdown" (default) or "json"

Returns: Paginated list of services with ID, name, description, delivery estimate, and capabilities.

Examples: DHL services: carrier="dhl" FedEx page 2: carrier="fedex", limit=20, offset=20

Errors: 400 — Invalid carrier name 403 — Invalid API key

envia_shipment_historyA

Get shipment history for a given month and year.

Args: month — Month number (1-12) year — Year (2020 or later) response_format — "markdown" (default) or "json"

Returns: List of shipments with tracking number, carrier, status, route, price, and label URL.

Errors: 400 — Invalid month or year 403 — Invalid API key

envia_schedule_pickupA

Schedule a carrier pickup for one or more packages. This is a DESTRUCTIVE operation — it creates a real pickup request.

WARNING: Duplicate calls may create duplicate pickups. Confirm with the user before proceeding.

Args: origin_* — Pickup address fields (name, street, street_number, neighborhood, city, state, postal_code, phone, email) carrier — Carrier string (e.g., "dhl", "fedex", "estafeta") tracking_numbers — Comma-separated tracking numbers to pick up date — Pickup date in YYYY-MM-DD format time_from — Pickup window start hour (0-23) time_to — Pickup window end hour (0-23) total_weight — Total weight in kg total_packages — Number of packages instructions — Special instructions (optional) response_format — "markdown" (default) or "json"

Returns: Pickup confirmation number, carrier, date, time window, and status.

Errors: 400 — Invalid address, carrier, or time fields 403 — Invalid API key

envia_classify_hscodeA

Classify a product description into a Harmonized System (HS) code for customs declarations.

Args: description — Product description to classify (e.g., "ceramic brake pads for automobiles") destination_countries — Comma-separated destination country codes (optional, e.g., "US,CA") include_alternatives — Include alternative HS codes (default: true) response_format — "markdown" (default) or "json"

Returns: HS code, description, confidence score, and alternative codes.

Errors: 400 — Invalid or empty description 403 — Invalid API key

envia_lookup_cityA

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)

Prompts

Interactive templates invoked by user choice

NameDescription
diagnose-shipmentInvestigate a shipment's tracking status and identify any issues
compare-ratesQuote all carriers for a route and compare price vs speed
verify-addressValidate a Mexican postal code and return full address information
prepare-international-shipmentStep-by-step guide for preparing an international shipment

Resources

Contextual data attached and managed by the client

NameDescription
Envia API OverviewWhat Envia is, 3 API hosts, sandbox vs production, auth model
Mexico Address FormatRequired fields, state codes (2-digit), colonia/suburbs mapping
Carrier Reference170+ carriers across 18 countries, service counts, weight limits, pickup windows
Rate Response FormatPrice breakdown, costSummary, additionalCharges, MXN currency
Label Response FormatUSD currency, permanent S3 URLs, no idempotency, tracking numbers
Error ReferenceError codes 400, 401, 402, 422, 1115, 1125, and how to handle them
International ShippingHS codes, commercial invoices, currency configuration, duties payment

TDQS

A4/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct resource+action: quote (read rates), create_label (write/purchase), track, cancel, plus discovery (carriers, services) and geocoding (validate_zipcode, lookup_city). The only near-overlap is validate_zipcode vs lookup_city, but they are differentiated by input (postal code → address vs city name → postal codes). An agent can reliably select the right tool.

Naming Consistency4/5

All tools share the envia_ prefix and mostly follow a verb_noun pattern (create_label, validate_zipcode, get_carriers, schedule_pickup, classify_hscode, lookup_city). Minor deviations exist: envia_quote, envia_track, envia_cancel are verb-only, and envia_shipment_history is noun-only. Still highly readable and predictable.

Tool Count5/5

11 tools is well within the ideal band and each maps to a real shipping workflow step (quote, buy, track, cancel, pickup, history, discovery, address resolution, customs). No redundant or filler tools.

Completeness4/5

Full lifecycle coverage from quoting through label purchase, tracking, cancellation/refund, and pickup, plus supporting lookups (carriers, services, zipcode, city, HS codes). Minor gap: no explicit tool to retrieve a specific shipment/label detail or reprint a label by shipment ID independent of tracking.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues