Skip to main content
Glama

cancel_compaction

Cancel a pending compaction or continuation dispatch for a specific thread job before it is sent. Verify with compaction_status afterward to confirm the cancellation.

Instructions

Cancel pending compaction or continuation dispatches only for the exact job returned by schedule_compaction or compaction_status. Already sent requests cannot be undone. Use compaction_status for observation and inspect it after cancellation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesExact jobId returned by schedule_compaction or compaction_status for this thread. Never infer it.
threadIdYesCurrent CODEX_THREAD_ID; obtain from the shell environment. Never guess or select a different thread.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.1
    • addedInput schema / properties / jobId / description
      Added value: +"Exact jobId returned by schedule_compaction or compaction_status for this thread. Never infer it."
  2. First observedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that only pending dispatches are cancellable, that already sent requests cannot be undone, and that the caller should inspect compaction_status afterward. These are meaningful behavioral constraints that help an agent predict the tool's effect and avoid false assumptions.

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?

Three concise sentences deliver the core action, the key precondition, and the post-cancellation verification step. There is no filler or repetition; every sentence contributes information needed for correct invocation.

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 two required parameters fully documented in the schema and clear usage guidance in the description, the definition is nearly complete. The absence of an output schema is partially mitigated by instructing the agent to use compaction_status for verification after cancellation, though the direct return value of cancel_compaction itself is not described.

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 input schema already provides 100% parameter coverage with explicit descriptions for jobId and threadId, including the 'never infer it' and 'never guess' guidance. The tool description reinforces the exactness requirement but does not add new semantic meaning beyond the schema.

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 ('cancel') and resource ('pending compaction or continuation dispatches') and clearly distinguishes the action from observation tools. It also references the exact source of the job ID, leaving no ambiguity about what the tool operates on.

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?

The description explicitly says to use the tool only for jobs returned by schedule_compaction or compaction_status, and directs agents to use compaction_status for observation and verification after cancellation. It also flags the limitation that already sent requests cannot be undone, which is important for deciding whether cancellation is appropriate.

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