Skip to main content
Glama

Cancel an apply

cancel_apply
Idempotent

Stops a running background apply: no further steps start and its Shopify bulk operations are cancelled, while already written data stays intact. Use it to halt an apply or clean up after a server restart.

Instructions

Stop an apply that is running in the background: no further step is started and the Shopify bulk operations it started are cancelled. What was already written stays written (nothing is rolled back or deleted). Also stops bulk operations left running by an apply whose server was restarted. If the apply has already ended, nothing is cancelled and its final state is returned. Returns { plan_id, state (cancelling, or interrupted for an apply from before a restart), note }. Follow with apply_status, then plan_sync to see what is left.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_apply"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idNoThe plan being applied. Default: the most recent apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.4

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations by describing exactly what is and is not destroyed ('What was already written stays written, nothing is rolled back or deleted'), which substantiates destructiveHint=false rather than merely restating it. It also discloses the restart-recovery case, the idempotent no-op behaviour, and the returned fields with their possible state values, all of which the annotations cannot 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?

Front-loaded with the action and its immediate effect, then the edge cases, then the return shape, then the follow-up tools. Every sentence carries new information; nothing repeats the title or the schema.

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?

With no output schema, the description carries the return-shape burden and does so, listing plan_id, state with its two meanings, and note. Coverage is near-complete for a one-parameter mutation; only the interaction with any concurrent apply would be a further addition.

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?

Only one parameter and the schema documents it at 100% coverage, including the default of the most recent apply. The description implies which apply is targeted but adds no format, sourcing, or override detail beyond the schema, so the baseline 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?

States a specific verb and object ('Stop an apply that is running in the background') and immediately bounds the effect: no further step starts and the Shopify bulk operations it launched are cancelled. That scope statement separates it cleanly from apply_status (read state) and plan_sync (reconcile results) without needing their schemas.

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 concrete triggering conditions, including the non-obvious case of bulk operations orphaned by a server restart, and states the already-finished case is a no-op. It also prescribes the follow-up sequence ('apply_status, then plan_sync'). It stops short of an explicit 'do not use this when…' exclusion, so it is strong context rather than complete routing guidance.

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