Skip to main content
Glama

Archive or restore a Codex session

codex_session_archive
Idempotent

Soft-archive or restore a Codex bridge mapping without deleting the underlying thread history, so you can hide inactive sessions and recover them when needed.

Instructions

Soft-archive or restore a bridge mapping. This never deletes the underlying Codex thread history.

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": {
      "session_key": "<session_key>"
    },
    "name": "codex_session_archive"
  }
}

Input Schema

NameRequiredDescriptionDefault
archivedNo
session_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false and idempotent=true; the description adds real value by explaining *why* it is non-destructive: it soft-archives and 'never deletes the underlying Codex thread history'. That clarifies the reversibility of the state change, which annotations alone do not convey. It stops short of describing what state is stored or how a restore locates the mapping.

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 short sentences, front-loaded with the operation, and the second sentence is a substantive safety caveat that earns its place. No filler or restatement of the name.

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 simple two-parameter tool with annotations, the description covers what it does and that it is non-destructive, but leaves the required session_key undefined and does not say what happens to an already-archived mapping or what is returned (no output schema exists to cover that).

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%, so the description needs to carry parameter meaning. 'Soft-archive or restore' implies the archived boolean controls direction, but it never states that archived=true archives and false restores, and session_key (the required bridge-mapping identifier) is given no meaning at all.

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?

The description names specific verbs (soft-archive / restore) and a specific resource (a bridge mapping), which maps to the title's 'Codex session'. It does not explicitly contrast with siblings like codex_sessions or codex_execute, but the archive/restore operation is distinct enough that an agent can identify it.

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 or when-not-to-use guidance, no mention of how to choose between archiving and restoring, and no reference to alternatives such as codex_sessions. The only usage signal is implicit in the verb pair.

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