Skip to main content
Glama
4714407
by 4714407

codex_compact

Reduce context size in a running Codex thread by compressing its history; starts an asynchronous job and returns a jobId for tracking.

Instructions

压缩已有 Codex thread 的上下文,适用于长会话;作为一个异步任务返回 jobId。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

Discloses a key behavioral trait: the operation is asynchronous and returns a jobId, which is important for agents. Since no annotations exist, the description carries the burden, but it does not explain what compaction means for thread history or how to track the job beyond the jobId.

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 entire purpose, usage context, and async behavior are conveyed in one compact sentence. Every phrase carries information and the core operation is front-loaded.

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 one-parameter tool, the description is nearly sufficient: it names the input, the purpose, and the return behavior. Missing details such as polling with codex_status or potential side effects are not fatal but would round out the picture for an agent.

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?

Schema description coverage is 0%, but the single parameter threadId is clearly tied to the description's '已有 Codex thread' phrasing. The description adds some meaning by indicating it operates on an existing thread, but it does not explain how to obtain the threadId or its relationship to codex_start output.

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?

Description specifies the verb '压缩' (compact) and the resource '已有 Codex thread 的上下文' (existing Codex thread's context), making the tool's purpose unmistakable. It also adds the scope '适用于长会话', helping distinguish it from sibling Codex tools.

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?

Provides a clear usage context: '适用于长会话' (suitable for long sessions). It does not explicitly mention when not to use it or which alternative to prefer, so it stops short of strong routing guidance.

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