Skip to main content
Glama

Purchase Envia Shipping Label

envia_create_label

Purchase a shipping label from Envia.com with sender, recipient, package, carrier, and service details; returns tracking number, label URL, and cost. Each call creates a new charged shipment.

Instructions

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

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": {
      "origin_name": "<origin_name>",
      "origin_street": "<origin_street>",
      "origin_street_number": "<origin_street_number>",
      "origin_neighborhood": "<origin_neighborhood>",
      "origin_city": "<origin_city>",
      "origin_state": "<origin_state>",
      "origin_postal_code": "<origin_postal_code>",
      "origin_phone": "<origin_phone>",
      "origin_email": "<origin_email>",
      "dest_name": "<dest_name>",
      "dest_street": "<dest_street>",
      "dest_street_number": "<dest_street_number>",
      "dest_neighborhood": "<dest_neighborhood>",
      "dest_city": "<dest_city>",
      "dest_state": "<dest_state>",
      "dest_postal_code": "<dest_postal_code>",
      "dest_phone": "<dest_phone>",
      "dest_email": "<dest_email>",
      "package_name": "<package_name>",
      "package_weight_kg": "<package_weight_kg>",
      "package_length_cm": "<package_length_cm>",
      "package_width_cm": "<package_width_cm>",
      "package_height_cm": "<package_height_cm>",
      "package_contents": "<package_contents>",
      "carrier": "<carrier>",
      "service": "<service>"
    },
    "name": "envia_create_label"
  }
}

Input Schema

NameRequiredDescriptionDefault
carrierYesCarrier string from quote response (e.g., "dhl")
serviceYesService string from quote response (e.g., "ground")
dest_cityYesCity or municipio
dest_nameYesRecipient contact name
dest_emailYesEmail address
dest_phoneYes10-digit phone number
dest_stateYes2-letter state code
origin_rfcNoRFC / tax ID. Use XAXX010101000 for general public.XAXX010101000
print_sizeNoLabel paper sizeSTOCK_4X6
dest_streetYesStreet name
origin_cityYesCity or municipio
origin_nameYesSender contact name
dest_companyNoRecipient company name
origin_emailYesEmail address
origin_phoneYes10-digit phone number
origin_stateYes2-letter state code
package_nameYesShort name for the package
print_formatNoLabel format. PDF recommended — ZPL may return PDF regardless.PDF
origin_streetYesStreet name
origin_companyNoSender company name
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
dest_postal_codeYes5-digit postal code
package_contentsYesDescription of contents
package_width_cmYesPackage width in centimeters
dest_neighborhoodYesColonia / neighborhood
package_height_cmYesPackage height in centimeters
package_length_cmYesPackage length in centimeters
package_weight_kgYesPackage weight in kilograms
declared_value_mxnNoDeclared value in MXN
dest_street_numberYesExterior/street number
origin_postal_codeYes5-digit postal code
origin_neighborhoodYesColonia / neighborhood
origin_street_numberYesExterior/street number

Output Schema

NameRequiredDescriptionDefault
carrierYes
serviceYes
currencyYes
label_urlYes
track_urlYes
shipment_idYes
total_price_usdYes
tracking_numberYes
current_balance_usdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond annotations, the description discloses that the call costs real money, is non-idempotent, creates a new shipment each time, risks double-charging, and requires user confirmation. It also documents return fields and key error conditions, adding substantial behavioral context.

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?

The warning is front-loaded, and the Args/Returns/Errors structure is easy to scan for a 33-parameter tool. The parameter list is long and duplicates schema documentation, but the grouping is useful given the complexity and financial risk.

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 high-risk purchase operation with 33 parameters, the description covers cost, idempotency, user confirmation, required quote-derived inputs, defaults, returns, and relevant errors. With an output schema and annotations present, no critical calling information 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 every parameter, including defaults and enum values. The description groups parameters by origin, destination, package, and label options, but mostly restates schema-provided meaning rather than adding new semantic detail.

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: "Purchase a shipping label from Envia.com." It clearly distinguishes this from read-only quote or tracking siblings by emphasizing that each call creates a new shipment and charges the account.

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?

It gives strong usage constraints: confirm with the user, do not call multiple times for the same shipment, and obtain carrier/service from a quote response. It does not explicitly name envia_quote as a prerequisite sibling, but the quote-response dependency is clear.

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