Skip to main content
Glama
benzkittisak

codex-async-mcp

by benzkittisak

codex_list

List recent codex jobs with their status and prompt summaries to monitor progress or review completed tasks. Specify an optional limit to control the number of results returned.

Instructions

List recent codex jobs with their status and prompt summaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax number of jobs to return (most recent first). Default: 20.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function that implements codex_list. It calls list_jobs(limit) from job_manager and returns the result.
    @mcp.tool()
    def codex_list(limit: int = 20) -> list:
        """
        List recent codex jobs with their status and prompt summaries.
    
        Args:
            limit: Max number of jobs to return (most recent first). Default: 20.
        """
        return list_jobs(limit)
  • The @mcp.tool() decorator registers codex_list as an MCP tool named 'codex_list' on the FastMCP server instance.
    @mcp.tool()
  • The helper function list_jobs that performs the actual work: reads job directories from JOBS_DIR, opens their meta.json files, and returns a list of job summaries (up to 'limit' entries), sorted by modification time (most recent first).
    def list_jobs(limit: int = 20) -> list[dict]:
        if not JOBS_DIR.exists():
            return []
    
        results = []
        for job_dir in sorted(JOBS_DIR.iterdir(), key=lambda p: p.stat().st_mtime, reverse=True):
            meta_path = job_dir / "meta.json"
            if not meta_path.exists():
                continue
            with open(meta_path) as f:
                meta = json.load(f)
            results.append({
                "job_id": meta["job_id"],
                "status": meta["status"],
                "prompt": meta["prompt"][:80] + ("..." if len(meta["prompt"]) > 80 else ""),
                "cwd": meta["cwd"],
                "started_at": meta["started_at"],
                "finished_at": meta.get("finished_at"),
            })
            if len(results) >= limit:
                break
    
        return results
  • The config constant JOBS_DIR defines where job metadata is stored; this is the path used by list_jobs to discover job directories.
    JOBS_DIR = Path.home() / ".codex-async" / "jobs"
    DEFAULT_APPROVAL_POLICY = "suggest"
    CODEX_BIN = "codex"
    JOB_TAIL_LINES = 100
    MAX_OUTPUT_CHARS = 8000
Behavior2/5

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

No annotations provided, so description carries full burden. It only states it lists jobs with status and summaries, but lacks details on pagination, ordering (though limit param says 'most recent first'), rate limits, or side effects. The description is too minimal for full transparency.

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?

Single sentence, no redundant words, front-loaded with the core action. Every word 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?

Given the presence of an output schema (status and prompt summaries mentioned), the description is somewhat complete for a simple list operation. However, it lacks details on error handling, empty results, or additional behavioral context that would fully inform 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 coverage is 100% for the single parameter 'limit', and the schema itself provides a description including default and ordering. The tool description adds no extra meaning beyond what the schema already conveys.

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?

Clearly states the tool lists recent codex jobs, including status and prompt summaries. The verb 'list' and resource 'recent codex jobs' are specific and distinguish from sibling tools (cancel, poll, start) which are different actions.

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?

No explicit guidance on when to use or avoid this tool. The purpose is implied by the name and description, but no alternatives or exclusions are mentioned. Siblings have distinct purposes, so usage is inferred but not clarified.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benzkittisak/claude-codex-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server