Skip to main content
Glama

BrindesBrasil.com.br

Calcular frete

calcular_frete
Read-onlyIdempotent

Calcula o frete de um pedido para um CEP brasileiro com o mesmo cálculo do carrinho da loja (preço com gravação, produtos agrupados nas mesmas caixas quando cabem e somente as formas de envio habilitadas). Aceita um produto (produto + quantidade) ou vários em "itens" (até 10); o frete de vários produtos é o do pedido inteiro, que difere da soma de cotações separadas. Devolve cada opção com valor e prazo total (produção + entrega).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cepYesCEP de destino no Brasil, 8 dígitos (ex.: 01310-100).
itensNoProdutos do pedido. Use para cotar vários produtos juntos.
produtoNoPara um produto só (alternativa a "itens"): SKU ou ID.
tecnicaNoPara um produto só: técnica de gravação (opcional).
aplicacoesNoPara um produto só: número de gravações (0 = sem gravação).
quantidadeNoPara um produto só: quantidade de peças.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / aplicacoes / description
      Previous value: -"Número de gravações (0 = sem gravação)."New value: +"Para um produto só: número de gravações (0 = sem gravação)."
    • addedInput schema / properties / itens
      Added value: +{
      +  "description": "Produtos do pedido. Use para cotar vários produtos juntos.",
      +  "items": {
      +    "properties": {
      +      "aplicacoes": {
      +        "default": 1,
      +        "description": "Número de gravações (0 = sem gravação).",
      +        "maximum": 4,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "produto": {
      +        "description": "SKU do produto (ex.: SPX-10338-BCO) ou ID numérico.",
      +        "type": "string"
      +      },
      +      "quantidade": {
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "tecnica": {
      +        "description": "Opcional: técnica de gravação (ex.: \"Laser\"). Sem ela, a mais barata para a quantidade.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "produto",
      +      "quantidade"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 10,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / produto / description
      Previous value: -"SKU do produto (ex.: SPX-10338-BCO) ou ID numérico."New value: +"Para um produto só (alternativa a \"itens\"): SKU ou ID."
    • changedInput schema / properties / quantidade / description
      Previous value: -"Quantidade de peças."New value: +"Para um produto só: quantidade de peças."
    • changedInput schema / properties / tecnica / description
      Previous value: -"Opcional: técnica de gravação (ex.: \"Laser\"). Sem ela, usa a mais barata para a quantidade."New value: +"Para um produto só: técnica de gravação (opcional)."
    • changedInput schema / required
      Previous value: -[
      -  "produto",
      -  "quantidade",
      -  "cep"
      -]New value: +[
      +  "cep"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds genuinely useful behavior: it mirrors the cart calculation, respects only enabled shipping methods, groups products into shared boxes, and returns each option with value plus total lead time (production + delivery). It stops short of stating auth needs or rate limits, but goes well beyond the annotations.

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?

Purpose is front-loaded in the first clause, followed by calculation semantics, input modes, and return format in one dense paragraph with little filler. Slightly long, but nearly every clause carries information an agent needs.

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?

With no output schema, the description steps in to describe the return shape (each option's value and total lead time broken into production + delivery), and it covers both input modes and their semantic difference. Nothing material for correct invocation is missing.

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, but the description adds interpretation rules the schema cannot: the 10-item cap framing, the single-product fallback via produto/quantidade, and crucially that quoting itens as a whole is not equivalent to summing individual quotes. That changes how an agent should structure calls.

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 states a precise verb+resource ('Calcula o frete de um pedido para um CEP brasileiro') and pins down the calculation semantics (same as the store cart, with engraving price and box grouping). This clearly separates it from siblings like calcular_preco, which handle price rather than shipping.

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 explains the two accepted input modes (single produto+quantidade vs up to 10 itens) and warns that multi-product freight is the whole order's and differs from summing separate quotes, which tells the agent when to use one shape over the other. It doesn't name a sibling tool as an explicit alternative, so no exclusion language.

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.

Resources