Skip to main content
Glama

Fazer o pedido

place_order

Fecha o pedido com o carrinho da sessão, depois que o cliente aprovou itens, frete e total. Exige verify_email_code, CPF e telefone (set_customer_details) e endereço com número. "confirm_total" é o total que você mostrou ao cliente; se mudou, o pedido é recusado com o novo total. "idempotency_key" (um UUID novo por pedido) evita pedido duplicado se você repetir a chamada. Pagamento: "pix" devolve o PIX copia e cola; "link" devolve o link onde o cliente paga no site (PIX ou cartão); "cartao" só se o cliente pedir para informar o cartão aqui — prefira "link", e nunca repita nem guarde os dados do cartão.

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": {
      "session_token": "<session_token>",
      "confirm_total": "<confirm_total>",
      "idempotency_key": "<idempotency_key>",
      "pagamento": "<pagamento>"
    },
    "name": "place_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
cartaoNoSó com pagamento "cartao".
parcelasNoSó cartão. Padrão: 1.
pagamentoYes
confirm_totalYesTotal aprovado pelo cliente, em reais, ex.: "56.00".
session_tokenYesO session_token devolvido por start_session.
idempotency_keyYesUUID novo por pedido.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses a concrete failure mode: if the total changed, the order is refused and the new total is returned. It also explains idempotency semantics for safe retries and describes what each payment method returns (PIX copy-paste string vs. payment link), which the agent cannot infer from 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?

The action is front-loaded, then prerequisites, total confirmation, idempotency, and payment routing in a logical order. Every sentence carries distinct information, though the prerequisite sentence packs several requirements together and could be split for scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter mutation with no output schema, the description covers inputs, prerequisites, refusal behavior and payment outputs well. It stops short of saying what the successful response contains (order id, status, next steps such as get_order_status) and whether the order can later be changed or cancelled.

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?

Schema coverage is already 83%, but the description adds real meaning: confirm_total is defined as the total shown to and approved by the customer, with mismatch behavior; idempotency_key is a fresh UUID per order used to prevent duplicates. It also clarifies the pagamento enum's runtime output per value, which the schema only lists.

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 ("Fecha o pedido com o carrinho da sessão") plus the precondition that the customer approved items, shipping and total. It is clearly distinguishable from siblings like add_to_cart or get_checkout_link, which only prepare the cart.

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?

Explicit prerequisites are named with the sibling tools that satisfy them (verify_email_code, set_customer_details for CPF/phone, address with number). It also gives an explicit preference rule among payment options: prefer "link", use "cartao" only when the customer asks, and never store card data.

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