Skip to main content
Glama

codex_terminals

Destructive

List, terminate, or clean background Codex terminals for a task using paginated cursors and process IDs, so you can monitor and stop running processes without shell access.

Instructions

list takes cursor/limit; terminate takes process_id; clean stops all background terminals. Mutations need an operation key. No arbitrary shell or stdin.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task_id": "<task_id>"
    },
    "name": "codex_terminals"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
actionNolist
cursorNoNative cursor
task_idYesTask id
process_idNo
request_idNoKey for identical retries
operation_idNoAlias of request_id

Output Schema

NameRequiredDescriptionDefault
okYes
result_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and openWorldHint=true, so the description does not need to restate danger. It does add real behavioral context beyond them: mutations require an operation key, 'clean stops all background terminals' discloses blast radius, and the no-shell/no-stdin line constrains execution. What is missing is whether terminate is reversible, what happens to a task's other terminals on clean, and whether killed processes can be resumed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense clauses, no filler, and each sentence carries information not in the schema. It is slightly too telegraphic and leads with parameter mapping rather than a statement of what the tool is, which costs a little front-loading clarity.

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?

The output schema exists so return values need no explanation, but for a destructive, 7-parameter, action-dispatched tool the description leaves gaps: the required task_id is never mentioned, the default action='list' is not stated, and the consequences of clean/terminate on running work are only hinted at.

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?

With schema coverage at 57%, the description compensates well by mapping parameters to actions (cursor/limit for list, process_id for terminate), which the schema's flat property list does not express. It also explains that mutations need an operation key, covering operation_id/request_id that the schema labels only vaguely as 'Alias of request_id'. It omits the required task_id, which is the one parameter an agent cannot get wrong.

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

Purpose3/5

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

The description enumerates what each of the three actions consumes ('list takes cursor/limit; terminate takes process_id; clean stops all background terminals'), which implies the tool manages background terminals, but it never states the resource being managed or the verb for the tool as a whole. An agent has to infer 'manage terminals for a task' from the name plus the action mapping, and there is no differentiation from siblings such as codex_interrupt.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing says when to pick terminate versus clean, or how this differs from codex_interrupt or codex_status. The only guidance-like statement is a negative scope limit ('No arbitrary shell or stdin'), which rules things out but does not route the agent to the right tool or action.

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