Skip to main content
Glama
Goudu666
by Goudu666

Compact a Codex thread

codex_compact

Summarize long Codex thread history in the background to free context window space, helping maintain long-running coding sessions without losing follow-up context.

Instructions

Summarize a long Codex thread's history to free up its context window. Runs in the background.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries full burden. It does disclose that the operation 'Runs in the background' (async execution), which is genuine behavioral value beyond structured fields. However, it omits whether the original history is preserved or replaced, whether compaction is reversible, and any auth/permission requirements.

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?

Two tight sentences with the core action and outcome front-loaded and zero filler. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-param, no-output-schema tool, the description covers the action and async nature adequately. But it leaves the parameter undocumented and omits the data-modifying implications of compaction, so it is only minimally complete.

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 single parameter (thread_id) is never mentioned in the description. The name implies it operates on 'a thread,' but the description adds no meaning about what thread_id should be, its format, or how it is obtained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (summarize/compact) and resource (a Codex thread's history), plus the outcome (free up its context window). It distinguishes itself from siblings by being the only compaction tool, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Implies when to use it via 'a long Codex thread's history' and 'free up its context window,' which hints at context-exhaustion scenarios. But there is no explicit when/when-not guidance, no prerequisites, and no routing to or from siblings like codex_threads or codex_status.

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