Skip to main content
Glama

Calcular frete (Correios)

get_shipping_rates

Calculate Brazilian Correios shipping rates (SEDEX, PAC, ...) for a cart, from the authenticated store's origin CEP and enabled services. Returns each enabled service with price (BRL) and delivery estimate, plus free shipping when eligible. Every call returns a supportCode: pass it to diagnose_quote_issue to investigate that quote later instead of quoting again. Calls are subject to the store's plan limits; when setup or the plan is missing, reason and actionUrl say what the merchant must finish.

Input Schema

NameRequiredDescriptionDefault
itemsYesCart line items.
requestIdNoIdempotency/correlation id. Auto-generated when omitted.
instanceIdNoMerchant/store id. Ignored on authenticated servers (the merchant comes from the API key); used only on local/unauthenticated servers.
destinationCepYesDestination Brazilian postal code (CEP). 8 digits; dashes/spaces are ignored.

Output Schema

NameRequiredDescriptionDefault
ratesYes
reasonNoWhy no rates were returned, when the list is empty.
actionUrlNoWhen set (e.g. reason=subscription_required), send the merchant here to finish setup.
supportCodeNo
excludedServicesNoServices the store has enabled but that didn't come back in `rates` for this cart (e.g. the package exceeds that service's size/weight limit). Share this with the merchant/customer instead of silently omitting the service.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / items / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / items / items / properties / dimensionsCm / additionalProperties
      Removed value: -false
    • addedInput schema / properties / items / items / properties / quantity / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / supportCode / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations at all, the description carries the safety/behavior burden and does well: it discloses that calls are subject to plan limits, that a missing setup/plan yields `reason` and `actionUrl`, and that every call returns a `supportCode`. Some of the return description (price in BRL, delivery estimate) duplicates what the output schema already carries, which keeps it from a 5.

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?

Four sentences, front-loaded with purpose, then return shape, then the supportCode workflow, then failure/limits behavior. Every sentence carries information; only the return-value clause slightly overlaps the output schema.

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 no-annotation, output-schema-backed quoting tool with full schema coverage, this covers purpose, implicit inputs, return contents, plan/quota constraints, degraded-setup behavior, and the correct follow-up tool. An agent has everything needed to call it and to handle the failure path.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description still adds genuine meaning beyond per-field docs: origin CEP and service selection are implicit (store config + enabled services, not parameters), and pricing is tied to cart line items with BRL unit prices. It doesn't restate `destinationCep` format or `requestId`/`instanceId` semantics, but the schema covers those.

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?

States a specific verb and resource ('Calculate Brazilian Correios shipping rates (SEDEX, PAC...) for a cart') and pins the scope to the authenticated store's origin CEP and enabled services. That verb+resource pairing cleanly separates it from every sibling (generate_label, diagnose_*, track_shipment) without needing to open a schema.

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 explicitly routes a follow-up case to a sibling: 'pass it to diagnose_quote_issue to investigate that quote later instead of quoting again', which tells the agent when not to re-quote. What's missing are boundaries for the primary call itself (e.g., when to skip a quote in favor of an existing one, or whether it can be called before label generation).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.