Skip to main content
Glama

Cancel a design run

cancel_design_run
DestructiveIdempotent

Ask a design run to stop, for example when the brief was wrong. Returns the run as it stands right after the request. A queued run comes back 'failed' with error code 'cancelled' and never starts. A running run comes back still 'running' and stops at its next step. A run cut short settles as 'failed' with error code 'cancelled', or 'execution_failed' if saving its changes failed. It keeps what it saved, removals included, listed in data.result.operations, and uses credits only when that list is not empty. A run that finishes before it stops settles as 'completed'. A run that had already settled comes back unchanged. The project stays locked until the run settles, so poll get_design_run before starting another run. A run that stopped responding settles as 'failed' with error code 'execution_timeout' 15 minutes after creation.

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": {
      "projectId": "<projectId>",
      "runId": "<runId>"
    },
    "name": "cancel_design_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYesRun id from data.runId in a design result.
projectIdYesProject id from an item's id in list_projects, or data.id in create_project.

Output Schema

NameRequiredDescriptionDefault
dataYes
projectUrlYesOpen link for the project. Share it with your user.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / data / properties / result / properties / operations / description
      Previous value: -"Screen creations, screen updates, theme changes and removals saved by the run."New value: +"What the run saved: screens created and updated, theme changes, new variants and styles, which ones are in use, and removals. New kinds may be added."
    • changedOutput schema / properties / data / properties / result / properties / operations / items / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "componentId": {
      -        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      },
      -      "screenName": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "screen_created",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId",
      -      "screenName",
      -      "componentId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "componentId": {
      -        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "screen_updated",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId",
      -      "componentId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "theme_updated",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "screenId": {
      -        "description": "Id of the screen the run deleted.",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "screen_removed",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "componentId": {
      -        "description": "The variant the run removed. The screen keeps its others.",
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "variant_removed",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId",
      -      "componentId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "styleId": {
      -        "description": "The style the run removed, with its screens.",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "style_removed",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "styleId"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "screenName": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_created",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "screenName",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_updated",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "type": {
      +        "const": "theme_updated",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "The new variant of the screen, beside the one it shows. Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "variant_created",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "The variant the screen shows now. Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "variant_used",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "styleId": {
      +        "description": "The new style, with its own screens.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "style_created",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "styleId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "styleId": {
      +        "description": "The style the project uses now.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "style_used",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "styleId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "screenId": {
      +        "description": "Id of the screen the run deleted.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "The variant the run removed. The screen keeps its others.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "variant_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "styleId": {
      +        "description": "The style the run removed, with its screens.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "style_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "styleId"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed3 schema fields changed
    • changedOutput schema / properties / data / properties / result / properties / operations / description
      Previous value: -"Screen creations, screen updates, and theme changes saved by the run."New value: +"Screen creations, screen updates, theme changes and removals saved by the run."
    • changedOutput schema / properties / data / properties / result / properties / operations / items / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "componentId": {
      -        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      },
      -      "screenName": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "screen_created",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId",
      -      "screenName",
      -      "componentId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "componentId": {
      -        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "screen_updated",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "screenId",
      -      "componentId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "type": {
      -        "const": "theme_updated",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "screenName": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_created",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "screenName",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "Use as componentId to fetch HTML or in componentIds to render screenshots.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_updated",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "type": {
      +        "const": "theme_updated",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "screenId": {
      +        "description": "Id of the screen the run deleted.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "screen_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "description": "The variant the run removed. The screen keeps its others.",
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "variant_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "screenId",
      +      "componentId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "styleId": {
      +        "description": "The style the run removed, with its screens.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "style_removed",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "styleId"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / properties / data / properties / result / properties / refused / items / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "change": {
      -        "description": "A new variant of the screen, or putting a variant in use.",
      -        "enum": [
      -          "variant_created",
      -          "variant_used"
      -        ],
      -        "type": "string"
      -      },
      -      "componentId": {
      -        "description": "The variant the run would have made or put in use.",
      -        "type": "string"
      -      },
      -      "reason": {
      -        "description": "moved: the user put another variant in use while the run worked. missing: the screen or the variant was deleted. refused: the screen can't hold variants, or the variant was removed.",
      -        "enum": [
      -          "moved",
      -          "missing",
      -          "refused"
      -        ],
      -        "type": "string"
      -      },
      -      "screenId": {
      -        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "change",
      -      "screenId",
      -      "componentId",
      -      "reason"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "change": {
      -        "const": "style_used",
      -        "description": "Putting a style in use.",
      -        "type": "string"
      -      },
      -      "reason": {
      -        "description": "moved: the user put another style in use while the run worked. missing: the style was deleted. refused: the style was removed.",
      -        "enum": [
      -          "moved",
      -          "missing",
      -          "refused"
      -        ],
      -        "type": "string"
      -      },
      -      "styleId": {
      -        "description": "The style the run would have put in use.",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "change",
      -      "styleId",
      -      "reason"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "change": {
      +        "description": "A new variant of the screen, putting a variant in use, or removing one.",
      +        "enum": [
      +          "variant_created",
      +          "variant_used",
      +          "variant_removed"
      +        ],
      +        "type": "string"
      +      },
      +      "componentId": {
      +        "description": "The variant the run would have made, put in use or removed.",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "moved: the user put another variant in use while the run worked. missing: the screen or the variant was deleted. refused: the screen can't hold variants, the variant was removed, or the variant to remove is in use.",
      +        "enum": [
      +          "moved",
      +          "missing",
      +          "refused"
      +        ],
      +        "type": "string"
      +      },
      +      "screenId": {
      +        "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "change",
      +      "screenId",
      +      "componentId",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "change": {
      +        "description": "Putting a style in use, or removing one.",
      +        "enum": [
      +          "style_used",
      +          "style_removed"
      +        ],
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "moved: the user put another style in use while the run worked. missing: the style was deleted. refused: the style was removed, or the style to remove is in use.",
      +        "enum": [
      +          "moved",
      +          "missing",
      +          "refused"
      +        ],
      +        "type": "string"
      +      },
      +      "styleId": {
      +        "description": "The style the run would have put in use or removed.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "change",
      +      "styleId",
      +      "reason"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed1 schema field changed
    • addedOutput schema / properties / data / properties / result / properties / refused
      Added value: +{
      +  "description": "Changes the project refused because someone else's edit won. The user's edit stands and the run's other changes are saved.",
      +  "items": {
      +    "oneOf": [
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "change": {
      +            "description": "A new variant of the screen, or putting a variant in use.",
      +            "enum": [
      +              "variant_created",
      +              "variant_used"
      +            ],
      +            "type": "string"
      +          },
      +          "componentId": {
      +            "description": "The variant the run would have made or put in use.",
      +            "type": "string"
      +          },
      +          "reason": {
      +            "description": "moved: the user put another variant in use while the run worked. missing: the screen or the variant was deleted. refused: the screen can't hold variants, or the variant was removed.",
      +            "enum": [
      +              "moved",
      +              "missing",
      +              "refused"
      +            ],
      +            "type": "string"
      +          },
      +          "screenId": {
      +            "description": "Id of the screen. Pass it to a later run to edit this screen.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "change",
      +          "screenId",
      +          "componentId",
      +          "reason"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "additionalProperties": false,
      +        "properties": {
      +          "change": {
      +            "const": "style_used",
      +            "description": "Putting a style in use.",
      +            "type": "string"
      +          },
      +          "reason": {
      +            "description": "moved: the user put another style in use while the run worked. missing: the style was deleted. refused: the style was removed.",
      +            "enum": [
      +              "moved",
      +              "missing",
      +              "refused"
      +            ],
      +            "type": "string"
      +          },
      +          "styleId": {
      +            "description": "The style the run would have put in use.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "change",
      +          "styleId",
      +          "reason"
      +        ],
      +        "type": "object"
      +      }
      +    ]
      +  },
      +  "type": "array"
      +}
  4. Changed3 schema fields changed
    • addedOutput schema / properties / data / properties / error / properties / limit
      Added value: +{
      +  "description": "The plan or credit limit that caused this error.",
      +  "enum": [
      +    "agent_access",
      +    "credits",
      +    "projects"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / data / properties / statusUrl
      Removed value: -{
      -  "description": "Relative REST path for polling this run.",
      -  "type": "string"
      -}
    • changedOutput schema / properties / data / required
      Previous value: -[
      -  "runId",
      -  "status",
      -  "statusUrl"
      -]New value: +[
      +  "runId",
      +  "status"
      +]
  5. Changed1 schema field changed
    • changedOutput schema / properties / data / properties / error / properties / url / description
      Previous value: -"Where the caller's user can resolve this error (e.g. top up credits). Relay it to the user."New value: +"Where the caller's user can resolve this error. Relay it to the user."
  6. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare destructive/idempotent/no-open-world; the description goes far beyond them with a full state machine: queued runs become 'failed'/'cancelled' and never start, running runs keep going to their next step, interrupted runs settle as 'failed' with 'cancelled' or 'execution_failed', completed and previously settled runs return unchanged, and timeouts settle at 15 minutes. It also discloses the side effects an agent most needs — saved operations (including removals) persist in data.result.operations, credits are consumed only when that list is non-empty, and the project remains locked until settle.

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?

It is front-loaded with purpose and the synchronous return contract before the edge cases, and virtually every sentence carries distinct information. The middle section is a dense prose block of state outcomes that would scan faster as a list or table, but nothing is redundant.

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?

For a destructive, asynchronous-adjacent mutation with only two parameters and an output schema, the description covers the return contract, credit implications, lock behavior, and every settle state. The agent knows how to call it correctly and what to expect in the response without extra clarification.

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%: runId and projectId already document their provenance (data.runId, list_projects ids, create_project data.id). The description adds no further semantics about parameter format or mutual constraints, so the baseline 3 is appropriate.

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?

The description opens with a specific verb and resource: "Ask a design run to stop." It also distinguishes itself from the read-oriented sibling by telling the agent to poll get_design_run afterwards, so the agent can separate cancel from inspect without opening either schema.

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?

It gives a concrete motivating case ("for example when the brief was wrong") and a clear operational rule: poll get_design_run before starting another run because the project stays locked. It stops short of stating when an agent should not cancel (e.g. already-settled runs are handled behaviorally rather than as guidance) and names no alternative cancellation path.

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.