Skip to main content
Glama
antigravity-codex-mcp
by Sunlazys

codex_list_workspaces

Lists available workspace directories with Git branch and dirty status so MCP clients can locate and filter Codex CLI workspaces by query and scope.

Instructions

List available workspace directories (allowed roots + child directories in restricted mode, or recently used directories in unrestricted mode) with Git branch and dirty status.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "codex_list_workspaces"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum workspaces to return (default 50).
queryNoCase-insensitive substring search across directory name and path.
include_childrenNoInclude immediate 1-level subdirectories under allowed_roots (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: results are mode-dependent (allowed roots plus child directories in restricted mode, recently used directories in unrestricted mode) and each entry is enriched with Git branch and dirty status. It stops short of stating that the operation is read-only or how results are ordered, but the enumerated return fields go well beyond the empty annotation set.

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?

A single front-loaded sentence that identifies the resource first and then layers the mode behavior and return fields. The nested parenthetical is dense but every clause conveys scope information, with no filler.

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 three-optional-parameter list tool with no output schema, the description supplies the missing return-value information (Git branch, dirty status) and explains mode-dependent scope. Only ordering/pagination behavior and the read-only guarantee are unstated, which are minor gaps at this complexity.

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 100%, so limit, query, and include_children are fully documented structurally. The description's mention of 'child directories in restricted mode' loosely corresponds to include_children but adds no syntax, defaults, or interaction detail beyond the schema; baseline 3 applies.

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 and resource ('List available workspace directories') and immediately qualifies the scope with the two mode-dependent sets of directories. An agent can distinguish it from codex_list_jobs or codex_list_sessions by resource alone, though it never names a sibling 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?

The description explains what differs per mode (restricted vs unrestricted), which implicitly tells an agent what it will get, but it never says when to choose this tool over the sibling list tools or what prerequisites exist. Usage is inferable rather than stated.

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