Skip to main content
Glama
ossmalaysia

codex-local-mcp

by ossmalaysia

Generate images via the local Codex CLI

codex_generate_image

Generate images from text prompts with your local Codex CLI, save files to a workspace, and display previews inline. Supports custom sizes, counts, and quality for draft or final assets.

Instructions

Generate images with the local Codex CLI. The prompt is passed through as written. Returns the saved file paths and shows the images inline, downscaling a preview when a file is too large to inline. Defaults to a fast low-quality 1024x1024 draft; raise quality for final assets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
openNoOpen the generated images in the user's default image viewer. Default true, because MCP clients do not render tool-result images into the chat.
sizeNoPixel size, e.g. "1024x1024" (fastest, the default), "1536x1024" landscape, "1024x1536" portrait, "2048x2048", "3840x2160".
countNoHow many images. Default 1.
promptYesWhat the image should depict.
qualityNoGeneration quality. Default "low" - fastest, good for drafts. Use "high" for final assets.
workspaceNoWorkspace folder name. Defaults to a new folder.
timeout_secNoSeconds before Codex is killed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It covers several behaviors: prompt is passed through as written, returns saved file paths, shows images inline, downscales previews for large files, and defaults to a fast low-quality draft. It does not mention side effects like file overwriting or permissions, but for a generation tool these are not critical. The disclosure is reasonably thorough.

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 description is concise, with each sentence contributing distinct information: purpose, prompt behavior, return format, and default quality tradeoff. It is front-loaded with the primary purpose, and there is no fluff or repetition. Every sentence earns its place, making it highly efficient.

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?

Given the 7 parameters all have schema descriptions, and the description covers the core behavior, return format, and default quality, the definition is quite complete. It lacks explicit mention of installation requirements or error handling, but the title and context imply a local CLI. The description adequately covers what an agent needs to call the tool correctly, including the key behavioral nuances.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining that the prompt is passed through as written (nuance not in schema) and by providing usage guidance for quality ('raise quality for final assets') that goes beyond the schema's generic enum descriptions. It also mentions the default size and quality, reinforcing the schema. This extra context justifies a 4.

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?

The description clearly states the verb 'Generate' and the resource 'images' via the local Codex CLI, making the tool's purpose explicit. It also distinguishes from siblings like codex_run and codex_read_artifact by focusing on image generation, and even mentions return behavior (file paths and inline display) which reinforces the tool's unique role.

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 does not explicitly state when to use this tool versus the siblings. However, the purpose is clear enough that an agent could infer that image generation belongs here, and it gives practical guidance on quality settings (draft vs final). But there is no explicit 'use this for images, use codex_run for code execution' or any exclusion criteria, so it's implied rather than explicit.

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

Deploy Server

Other Tools