Skip to main content
Glama

Cancel stock movement

cancel_stock_movement
Destructive

Cancel a draft stock movement. Posted movements are refused with 409. Inventory is not reversed because a draft was never posted. Two-step confirm_token: the first call without confirm_token only returns confirmation_required, a summary, and confirm_token. That call does not write, delete, cancel, or send. The second call must repeat the same arguments plus that confirm_token; that is the write. A confirm boolean is ignored. The token expires in 5 minutes and works once.

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": {
      "movement_id": "<movement_id>"
    },
    "name": "cancel_stock_movement"
  }
}

Input Schema

NameRequiredDescriptionDefault
movement_idYes
confirm_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructive=true and idempotent=false, and the description independently confirms and enriches that: the token is single-use, expires in five minutes, the first call performs no write/delete/cancel/send, and a 'confirm' boolean is silently ignored. It also discloses the side effect boundary (inventory is not reversed) and the 409 failure mode for posted movements.

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?

Front-loaded with the operation and its precondition, then the confirmation protocol; every sentence adds a distinct constraint with no filler. Dense but well organized for a flow this easy to get wrong.

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?

With no output schema and no parameter descriptions in the schema, the description supplies the state preconditions, the error case, the exact two-step call contract, token lifetime, and the side-effect answer. There is nothing further an agent needs to invoke this correctly.

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 0%, so the description carries the load and does: confirm_token is fully specified (obtained from call one, must be echoed with identical arguments, single use, 5-minute TTL) and the ignored 'confirm' boolean is pre-empted. movement_id is only covered implicitly as the identifier of the draft movement.

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?

Names a specific verb and resource ("Cancel a draft stock movement") and immediately scopes it to the draft state, which is the key distinction from post_stock_movement and delete_stock_movement. An agent can tell what this does and on which subset of records without opening anything else.

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?

Explicit when-to-use (draft movements) and when-not (posted movements refused with 409), plus a full procedural walkthrough of the two-call confirmation flow. It stops short of naming alternative siblings such as delete_stock_movement for a hard removal, leaving that inference to the agent.

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