Skip to main content
Glama

Cancel an assessment run

cancel_run
DestructiveIdempotent

Ask a running assessment to stop -- the counterpart to trigger_assessment, for a run you started against the wrong target or no longer need. The run stops within about five seconds and keeps the findings and probes it already produced, so its results are still worth reading. Returns immediately: poll get_assessment_status until the status leaves 'running'. A run that has already finished is a conflict, not a retryable error. Requires the test:run scope, the same authority as starting one. Treating a cancelled run as a clean bill of health is a mistake: get_assessment_status still returns a min_severity verdict for it, but that verdict only covers the categories in categories_completed, so a run stopped early reads 'pass' simply because it never got far enough to find anything.

Input Schema

NameRequiredDescriptionDefault
run_idYes

Output Schema

NameRequiredDescriptionDefault
run_idYes
statusYesThe run's status immediately after the request: 'running' while it winds down (it stops within about five seconds -- poll get_assessment_status), or 'cancelled' when it had already died and was settled by this call. Either way the run keeps the findings and probes it produced before the stop, so its results are still worth reading.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the run stops in about five seconds, keeps already-produced findings and probes, returns immediately, requires the test:run scope, and treats cancellation of an already-finished run as a conflict. It also gives an important interpretive warning about cancelled-run verdicts and categories_completed. This is substantively richer than the destructiveHint/idempotentHint annotations alone.

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?

The purpose and the key counterpart relationship are front-loaded, and the later sentences carry useful operational and interpretive warnings rather than filler. It is somewhat long for a one-parameter tool, but every section adds concrete value.

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 an output schema present, the description does not need to explain return values, and it still covers timing, polling behavior, conflict handling, required scope, and the important caveat about partial results. An agent has enough context to invoke and interpret the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the sole required parameter, run_id, has no description in the schema. The tool description does not explain what run_id is, where to obtain it, or its expected format, so it fails to compensate for the schema gap.

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 uses a specific verb and resource ('Ask a running assessment to stop') and explicitly distinguishes the tool from its sibling trigger_assessment as its counterpart. It also clarifies the intended scope: a run you started against the wrong target or no longer need.

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

Usage Guidelines5/5

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

It states exactly when to use the tool ('for a run you started against the wrong target or no longer need') and when not to expect success ('A run that has already finished is a conflict, not a retryable error'). It also names the follow-up tool, get_assessment_status, for polling, which effectively routes the agent to the right alternative after cancellation.

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