Skip to main content
Glama

Preparar proposta de pedido

place_order_proposal
Destructive

Cria uma proposta de pedido com o carrinho da conta da cliente, depois que ela aprovou itens, endereço (set_shipping_address com endereco_id), frete e total. Não é o pedido: ela confere e paga no site, e só então vira pedido. "versao_carrinho" é o de get_cart (se o carrinho mudou, a chamada é recusada). Repetir a chamada igual (mesma versão, itens, endereço, frete e cupom) devolve a mesma proposta. "confirm_total" é o total que você mostrou, como texto ("56.00"); com "itens", é o total só desses itens (se diferir, a resposta traz o total certo para confirmar com ela). "itens" (opcional) limita a proposta a alguns itens do carrinho. Uma proposta aberta já com um destes itens: altere-a com preview_order_proposal_change, não crie outra. Mostre o link à cliente: ela confere e paga no site. Nada é enviado sem a confirmação dela.

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": {
      "versao_carrinho": "<versao_carrinho>",
      "confirm_total": "<confirm_total>"
    },
    "name": "place_order_proposal"
  }
}

Input Schema

NameRequiredDescriptionDefault
itensNoSó estes itens do carrinho (padrão: todos).
confirm_totalYesTotal aprovado pela cliente, em reais, ex.: "56.00".
versao_carrinhoYesversao_carrinho de get_cart.

Output Schema

NameRequiredDescriptionDefault
linkYes
cupomNo
freteNo
itensNo
moedaNo
prazoNo
totalYes
statusYes
versaoNo
propostaYesReferência, ex.: P-1234.
repetidaNo
pedido_idNo
diferencasNo
prazo_textoYes
canais_avisadosNo
texto_para_mostrarYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false and destructiveHint=true, and the description adds substantial context beyond them: the cart-version guard that rejects stale calls, the deduplication of identical calls, and the rule that nothing is sent without the client's confirmation. One nuance sits awkwardly with idempotentHint=false – the description claims an identical repeat returns the same proposal – but that reads as a same-payload dedup guard rather than a claim that the tool is a pure read.

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?

Front-loaded with the core action, then preconditions, then the sibling redirect, then per-parameter notes – a sensible order with no filler. It is dense and repeats the 'ela confere e paga no site' idea twice, which costs a little tightness.

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 write tool with annotations and an output schema, the description covers everything an agent needs: prerequisites, stale-version failure, idempotent repeats, total confirmation flow, item scoping, and the hand-off to the human for payment. Return-value detail can be left to the output schema.

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

Parameters5/5

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

Adds real meaning beyond a 100%-covered schema: versao_carrinho must come from get_cart and a stale value causes rejection; confirm_total is the total the agent already displayed, passed as text, and a divergence makes the response return the correct total to re-confirm; itens optionally narrows the proposal and interacts with existing open proposals.

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 ('Cria uma proposta de pedido com o carrinho da conta da cliente') and immediately draws the boundary against the real order ('Não é o pedido: ela confere e paga no site'). An agent can distinguish it from preview_order_proposal_change and get_checkout_link 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit preconditions (client approved items, address via set_shipping_address with endereco_id, shipping, total) and an explicit exclusion rule: if an open proposal already contains one of these items, use preview_order_proposal_change instead of creating another. It also states the repeat-call condition (same version/items/address/shipping/coupon) and what happens when the cart changed (call refused).

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