Skip to main content
Glama

Cancel a previewed action

cancel_action
Idempotent

Discard a pending preview confirmation token when the user decides not to proceed, preventing an unfinished action from being confirmed.

Instructions

Discard a preview's confirmation token when the user decides not to go ahead.

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": {
      "confirmation_token": "<confirmation_token>"
    },
    "name": "cancel_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmation_tokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, idempotentHint=true, and readOnlyHint=false; the description usefully clarifies that what is discarded is the confirmation token rather than the underlying content. It does not say whether the previewed action's data is retained, what happens to an already-used or expired token, or whether a subsequent confirm will fail.

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?

One sentence, front-loaded with the action and object, with zero filler. Every clause carries information.

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

Completeness3/5

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

For a single-parameter tool with safety covered by annotations and no output schema, the core is present. Missing is what an agent needs at the edges: token expiry/failure behavior and explicit confirmation that this pairs with confirm_action as the mutually exclusive path.

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 description coverage is 0%, so the single parameter relies on the description. The description does identify the parameter's meaning ('a preview's confirmation token'), indicating it comes from a prior preview call, but adds no format, length, or sourcing details beyond the schema's minLength.

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 ('Discard') and resource ('a preview's confirmation token'), which is more precise than the name 'cancel_action' alone. It implicitly contrasts with confirming via 'the user decides not to go ahead', but never names the counterpart tool (confirm_action) so the differentiation is only inferred.

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?

Gives a clear triggering condition: invoke when the user declines to proceed after a preview. It does not explicitly name confirm_action as the alternative or state what to do if the user is undecided or the token has already expired, leaving some routing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.