Skip to main content
Glama

Ver carrinho e pedido

get_cart
Read-onlyIdempotent

Situação de um carrinho criado com create_cart: OPEN (esperando o consumidor confirmar), CONFIRMED (virou pedido; order.status diz se a loja aceitou: NEW, ACCEPTED, READY = pronto ou saiu para entrega, COMPLETED, CANCELLED com o motivo) ou EXPIRED (venceu sem confirmar). Enquanto NEW, order.respondBy diz até quando a loja aceita: sem resposta, o pedido é cancelado sozinho (motivo 'A loja não respondeu a tempo.') e você pode oferecer outra loja ao consumidor. order.adjustment: a loja propôs mudar itens (status PENDING: pergunte ao consumidor e use respond_to_adjustment). order.issue: ocorrência de pós-venda (open_issue, close_issue). order.stalled: a loja deixou o pedido parado numa etapa. order.shipping: envio pelo país (prazo em dias úteis, transportadora, código e link de rastreio quando a loja despacha). Pagamento: é com a loja, no mesmo link do pedido (o confirmUrl do create_cart), onde aparecem o pedido e o botão Pagar ou o Pix da loja. Para o consumidor pagar, mande esse mesmo link dizendo 'confira seu pedido e pague'; nunca peça dados de cartão no chat nem mande link de pagamento de outro lugar. Agendamento, serviço e reserva só podem ser pagos depois que a loja aceita (ACCEPTED); visita a imóvel não tem pagamento. order.paymentStatus: PENDING (aguardando), PAID (pago), REFUSED, REFUNDED. order.customerConfirmedAt: o consumidor confirmou presença na visita ou no atendimento pelo WhatsApp (nulo: ainda não confirmou ou não pediu os avisos).

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": {
      "cartId": "<cartId>"
    },
    "name": "get_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
cartIdYesid do carrinho (de create_cart)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses substantial behavior: the auto-cancellation when the store does not respond by order.respondBy, that payment happens on the store's confirmUrl and card data must never be requested in chat, and that scheduling/service payments require ACCEPTED status. These are real operational constraints an agent could not infer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is a long run-on paragraph that mixes return-value interpretation, payment policy, and issue routing. Most sentences carry real information, yet the density makes it harder to scan than a structured list would.

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?

With no output schema, the description carries the burden of explaining return fields (order.status, respondBy, adjustment, issue, stalled, shipping, paymentStatus, customerConfirmedAt) and does so thoroughly. A few fields and the overall response shape are left implicit, keeping it short of perfect.

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 coverage is 100% for the single cartId parameter, and the description only indirectly ties it to create_cart ('carrinho criado com create_cart'). The schema already carries the meaning, so the baseline of 3 applies.

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 opening clause states a specific verb and resource: it returns the 'situação' of a cart created with create_cart, and it enumerates the domain states (OPEN, CONFIRMED, EXPIRED). This clearly separates it from siblings like list_past_orders or create_cart.

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 concrete routing guidance for downstream situations: use respond_to_adjustment when order.adjustment is PENDING, use open_issue/close_issue for order.issue, and offer another store when a NEW order times out. It does not explicitly say 'call this to check status before X', but the contexts are clear.

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