Skip to main content
Glama

grok_cancel

Cancels an in-flight prompt turn in a remote Grok Build session via ACP, stopping the active request and returning a cancelled status.

Instructions

Cancel an in-flight prompt turn via ACP session/cancel notification. The corresponding grok_prompt call should then finish with stopReason cancelled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesACP session id whose in-flight turn should be cancelled

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does state a concrete behavioral consequence: the corresponding grok_prompt call should finish with stopReason cancelled. It also discloses the notification mechanism. It stops short of describing idempotency or error behavior, but the core side effect is clear.

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?

The description is two sentences with no filler. The primary action and target are front-loaded, and the second sentence adds the essential expected outcome. Every clause earns its place.

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?

For a single-parameter tool with no output schema, the description covers the purpose, the trigger condition, and the resulting state change. It omits edge cases such as canceling when no turn is in-flight or idempotency, but the essential information needed to invoke the tool correctly is present.

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?

The schema already documents sessionId as 'ACP session id whose in-flight turn should be cancelled' with 100% coverage, so the description adds no new parameter-level meaning. It simply restates the session concept from the schema, which meets the baseline but does not exceed it.

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 names a specific verb ('Cancel'), a precise object ('in-flight prompt turn'), and the mechanism ('ACP session/cancel notification'). It clearly differentiates from sibling tools like grok_prompt and grok_session_create by targeting cancellation rather than creation, prompting, or status checks.

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?

The description clearly implies when to use it: when a prompt turn is in-flight and should be stopped. It also explains the expected consequence on the corresponding grok_prompt call, which helps an agent reason about timing. It does not explicitly list exclusions, but there is no competing sibling tool for cancellation.

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