Skip to main content
Glama

Prévia de mudança na proposta

preview_order_proposal_change
Read-onlyIdempotent

NADA É ALTERADO: mostra como a proposta ficaria com a mudança (itens, endereço, frete, cupom) e o novo total. Diga à cliente o que vai mudar e pergunte se pode aplicar; só então chame change_order_proposal com o previa_id. Vale para propostas abertas que a cliente ainda não começou a pagar.

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": {
      "id": "<id>",
      "versao": "<versao>"
    },
    "name": "preview_order_proposal_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesReferência da proposta, ex.: P-1234.
cupomNoCupom; vazio remove.
freteNoid da opção de frete (de get_cart.opcoes_frete, cotado para o endereço da proposta).
itensNoA lista completa de itens como deve ficar (os que faltarem saem da proposta).
versaoYesversao da proposta que você leu (get_order_proposal).
endereco_idNoOutro endereço salvo (list_addresses).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/destructiveHint=false, but the description adds the two-step confirm-then-apply protocol, the handoff key (previa_id) to the mutating sibling, and the eligibility restriction on proposals in payment. This is genuine behavioral context beyond what structured fields convey.

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

Conciseness5/5

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

The safety guarantee is front-loaded in the first clause, followed by the workflow and then the eligibility scope. Three short sentences, each carrying distinct information with no repetition of the title or annotations.

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?

Covers purpose, preview contents, client-confirmation workflow, and eligibility, which is sufficient to call it correctly even without an output schema. Minor gaps remain: nothing on preview validity/expiry or what to do if the versao is stale, which matters for a two-step preview-then-apply flow.

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%, so every parameter is already documented with format hints (versao read from get_order_proposal, frete ids from get_cart.opcoes_frete, full item list semantics). The description only names the change categories, adding a mental model but no syntax or constraint detail beyond the schema; baseline 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?

Opens with a specific verb and effect ('NADA É ALTERADO: mostra como a proposta ficaria com a mudança') plus the resource and the dimensions previewed (itens, endereço, frete, cupom, novo total). The read-only preview is clearly distinguished from the sibling mutation tool change_order_proposal, which is named explicitly.

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?

States a mandatory sequencing rule (tell the client, ask permission, and only then call change_order_proposal with the previa_id) and an eligibility boundary (only open proposals the client hasn't started paying). Positive and negative conditions plus the named follow-up tool leave nothing to infer.

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