Skip to main content
Glama

Conceder desconto

add_reservation_discount
Destructive

Aplica um desconto (percentual ou valor fixo) na estadia. Exige aprovação.

Escopo: financials:write · Risco: consequential (prévia + aprovação do usuário obrigatória) · Efeitos: Cria Charge DISCOUNT. · INDISPONÍVEL nesta autorização (escopo não concedido ou papel sem o módulo)

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": {
      "reservation_id": "<reservation_id>",
      "mode": "<mode>",
      "value": "<value>"
    },
    "name": "add_reservation_discount"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
valueYes
approval_idNoId de uma aprovação já decidida pelo usuário para esta mesma ação. Omita para receber a prévia e o link de aprovação.
descriptionNo
reservation_idYes
idempotency_keyNoChave de idempotência escolhida pelo cliente; repetir a chave com os mesmos dados devolve o mesmo resultado.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, idempotentHint=false, readOnlyHint=false, and the description adds real context beyond them: a mandatory preview/approval gate, an explicit side effect (Creates Charge DISCOUNT), the required scope (financials:write), and an honest unavailability warning. It does not mention the idempotency_key behavior nor what the preview response contains, but the delta over annotations is substantial.

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 a compact structured line covering scope, risk, effect, and availability. Every element carries operational meaning, though the availability clause is buried at the end where an agent scanning quickly may miss that the tool cannot be called at all.

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 consequential, no-output-schema mutation, the definition covers prerequisite, effect, scope, and availability — the essentials an agent needs to decide and invoke correctly. Missing only the return behavior (preview vs. confirmed charge) and the idempotency-key reuse semantics, both of which the schema partially covers.

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?

With only 33% schema description coverage, the description must compensate, and it partially does by explaining that mode is percent-or-fixed and that approval is required (implying approval_id's role). It says nothing about reservation_id, description, or the interaction between approval_id and idempotency_key, so half the parameters remain unilluminated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (applies a discount to the stay) plus the two supported forms (percentage or fixed value). It is distinguishable from siblings like add_reservation_charge and add_reservation_payment by the 'desconto' framing, though the description never names those alternatives explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

'Exige aprovação' and 'prévia + aprovação do usuário obrigatória' give a clear prerequisite, and the unavailability note correctly steers the agent away. However, there is no guidance on when to choose a discount over add_reservation_charge, or how to proceed in the two-step approval flow.

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.