Skip to main content
Glama

Aprovar ou recusar ajuste do pedido

respond_to_adjustment
Destructive

Responde, em nome do consumidor, ao ajuste que a loja propôs no pedido (faltou item, troca por similar, quantidade ou preço). Antes, mostre ao consumidor order.adjustment do get_cart (itens com change: REMOVED, REDUCED, INCREASED, ADDED, PRICE; totalBefore e totalAfter) e só responda com a decisão dele. approve true aplica os itens novos; false mantém o pedido como estava, ou cancela com cancelOrder true. Sem resposta até order.adjustment.expiresAt: ajuste que só reduz vale sozinho, o resto expira e a loja decide.

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>",
      "approve": "<approve>"
    },
    "name": "respond_to_adjustment"
  }
}

Input Schema

NameRequiredDescriptionDefault
cartIdYesid do carrinho (de create_cart)
approveYestrue para aprovar o ajuste, false para recusar
cancelOrderNoAo recusar: true cancela o 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?

Annotations already flag destructiveHint=true, but the description adds much more: approve=true applies new items, false leaves the order unchanged, and cancelOrder=true cancels the order. The expiresAt behavior and the auto-approval rule for reduction-only adjustments are behavioral facts unobtainable from the schema or 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?

Front-loaded with the action, then the prerequisite display step, then the outcome semantics, then expiry. Every sentence carries load, though the expiry sentence is dense and packs two distinct rules together, slightly reducing scanability.

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 destructive, non-idempotent mutation with no output schema, the description covers decision semantics, cancellation side effect, and the consequences of not responding in time. An agent has everything needed to call it correctly and safely.

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 baseline is 3, but the description adds real meaning: it explains the approve/cancelOrder interaction ('false mantém o pedido como estava, ou cancela com cancelOrder true') and that approve=true applies the new items. cartId is left to the schema, which already documents it as coming from create_cart.

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 names a specific verb ('Responde... ao ajuste') and resource (the store's proposed order adjustment), then enumerates the exact adjustment types it covers (missing item, similar-item swap, quantity, price). This clearly separates it from siblings like get_cart (which merely reads order.adjustment) and respond_to_quote.

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?

It prescribes the prerequisite workflow explicitly: first show the consumer order.adjustment from get_cart (with the change types and totalBefore/totalAfter) and only submit the consumer's actual decision. It also states the no-response policy (reduction-only adjustments auto-apply; others expire and the store decides), leaving no ambiguity about when and how to call it.

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