Skip to main content
Glama

schedule_compaction

Schedules a single conversation compaction after user authorization, saving an optional handoff of key details and enabling one authorized continuation turn.

Instructions

Schedule ONE compaction after this answer. Only when the user authorizes compaction. Optional handoff describes what to keep/summarize and is saved exactly in a per-job file. resume:true explicitly requests ONE subsequent turn with that handoff and nextStep; use only for authorized continuation. Cancels on observed new user input or a stopped turn. Return the handoff in context before finishing. Compaction prompt itself is not overridden. Check status later; no automatic retries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handoffNoOptional verified handoff saved for this job. It guides the resumed agent but does not alter the extension compaction prompt.
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. Changed3 schema fields changedv0.3.1
    • addedInput schema / properties / handoff / description
      Added value: +"Optional verified handoff saved for this job. It guides the resumed agent but does not alter the extension compaction prompt."
    • changedInput schema / properties / handoff / properties / nextStep / description
      Previous value: -"Exact authorized next action, including where to stop."New value: +"Exact authorized next action, including where to stop. Required even when resume is false."
    • changedInput schema / properties / handoff / properties / resume / description
      Previous value: -"Explicit opt-in to ONE automatic next turn. Must be false if the user asked to stop."New value: +"Explicit opt-in to ONE automatic next turn. Use false when work is complete, the user asked to stop, or the next step needs user input."
  2. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

It discloses key behaviors that annotations do not convey: scheduling is one-shot, the job cancels on new user input or a stopped turn, there are no automatic retries, and the handoff is persisted to a per-job file. It also tells the agent to return handoff in context before finishing. No contradiction with readOnlyHint=false or destructiveHint=false.

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?

Each sentence carries a distinct operational constraint: timing, authorization, handoff persistence, resume semantics, cancellation, context handoff, prompt override, and retry behavior. The most critical fact (scheduling one authorized compaction) is front-loaded, and there is no filler.

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?

Given no output schema and a complex conditional job, the description covers the full lifecycle an agent needs: when to call, what handoff means, how resume works, when it cancels, how follow-up should happen (check status), and the no-retry policy. The schema already documents parameter details and threadId sourcing, so nothing critical is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds value by explaining the runtime semantics of handoff and resume ('resume:true explicitly requests ONE subsequent turn with that handoff and nextStep') and noting the handoff is saved exactly per job, which the schema alone does not state.

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 opening phrase 'Schedule ONE compaction after this answer' names a specific action, target, and timing. It also states the authorization condition ('Only when the user authorizes compaction'), which separates scheduling from the sibling probe/status/cancel operations without needing to open 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 Guidelines5/5

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

The description states when the tool is appropriate: only when the user explicitly authorizes compaction and only after the answer. It also gives a precise condition for resume:true ('use only for authorized continuation') and recommends monitoring via status rather than retrying, implicitly distinguishing it from compaction_status.

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