{"openapi":"3.1.0","info":{"title":"MCP Codex","description":"Filesystem, image, screenshot, patch, and shell tools exposed as Custom GPT Actions.","version":"1.0.0"},"servers":[{"url":"https://shell-mac.sunday-cloud.com"}],"paths":{"/actions/read_file":{"post":{"operationId":"read_file","summary":"Read a text file. For any project not already loaded in context, call get_agents_instructions first.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Absolute path to the file"},"offset":{"type":"number","description":"Line number to start reading from (1-indexed)"},"limit":{"type":"number","description":"Maximum number of lines to read"}},"required":["path"]}}}},"responses":{"200":{"description":"File contents","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}}}}}}}}},"/actions/apply_patch":{"post":{"operationId":"apply_patch","summary":"Apply a text replacement patch to a file (find and replace exact text)","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_path":{"type":"string","description":"Absolute path to the file"},"old_string":{"type":"string","description":"Exact text to find and replace"},"new_string":{"type":"string","description":"Text to replace with"}},"required":["file_path","old_string","new_string"]}}}},"responses":{"200":{"description":"Patch result","content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"}}}}}}}}},"/actions/bash":{"post":{"operationId":"bash","summary":"Execute a bash command. Synchronous waiting is capped at 90 seconds to stay below the remote transport deadline; longer work keeps running and returns its background job id.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"type":"string","description":"The bash command to execute"},"timeout":{"type":"number","description":"Milliseconds to wait before returning the still-running background job. Default and maximum synchronous wait are 90000. Use 0 to return immediately."},"workdir":{"type":"string","description":"Optional working directory"}},"required":["command"]}}}},"responses":{"200":{"description":"Command output","content":{"application/json":{"schema":{"type":"object","properties":{"stdout":{"type":"string"},"stderr":{"type":"string"},"exit_code":{"type":"integer"}}}}}}}}},"/actions/read_image":{"post":{"operationId":"read_image","summary":"Read a PNG, JPEG, GIF, or WebP image from the filesystem and return it as image content","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Absolute or relative path to the image"}},"required":["path"]}}}},"responses":{"200":{"description":"Base64 encoded image","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string"},"mime_type":{"type":"string"}}}}}}}}},"/actions/screenshot":{"post":{"operationId":"screenshot","summary":"Capture a macOS screenshot and return it as PNG image content","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display":{"type":"number","description":"Optional 1-based display number. Omit to capture the default display."},"window_id":{"type":"number","description":"Optional macOS window ID to capture."},"region":{"type":"object","description":"Optional screen rectangle to capture.","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"]},"include_cursor":{"type":"boolean","description":"Include the mouse cursor. Default false."},"include_shadow":{"type":"boolean","description":"Include a window shadow when capturing window_id. Default true."}}}}}},"responses":{"200":{"description":"Base64 encoded PNG screenshot","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string"},"mime_type":{"type":"string"}}}}}}}}},"/actions/batch":{"post":{"operationId":"batch","summary":"Run multiple tool calls in one request, in order. Prefer this over separate calls to reduce round-trips.","x-openai-isConsequential":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calls":{"type":"array","description":"Tool calls to run sequentially.","items":{"type":"object","properties":{"tool":{"type":"string","enum":["read_file","apply_patch","bash","read_image","screenshot"],"description":"Which tool to run"},"arguments":{"type":"object","description":"Arguments for that tool (same shape as its own endpoint)"}},"required":["tool","arguments"]}},"stop_on_error":{"type":"boolean","description":"Stop at first failing call. Default true."}},"required":["calls"]}}}},"responses":{"200":{"description":"Per-call results in order","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"ok":{"type":"boolean"},"result":{"type":"object"},"error":{"type":"string"}}}}}}}}}}}}}}