ChatGPT Agent Prompt
Use this tutorial when ChatGPT Agent is connected to a Coding Tools MCP server and you want it to behave like a careful local coding agent. The goal is simple: make the model use the MCP tools for the real workspace, keep edits scoped, verify with the same runtime, and stop instead of silently falling back to an unrelated sandbox when the MCP server is unavailable.Before you paste the prompt
Start Coding Tools MCP against the repository you want ChatGPT to work on:read-only for inspection-only sessions and full only when the connected client is trusted to edit and run commands.
If the server root is wrong, restart Coding Tools MCP with the intended --workspace. The runtime is one workspace root per process; there is no separate open_workspace tool.
Copyable prompt
Paste this into the ChatGPT app, agent instructions, or first message for a coding session:Recommended tool loop
- Orient with
server_infoandget_default_cwd. - Find only the relevant files with
search_text,list_files, orlist_dir. - Read the minimum useful slices with
read_file. - Edit with
apply_patch. - Verify with
exec_commandwhen the profile and permission mode allow it. - Review the result with
git_diffandgit_status. - Report files changed, checks run, and blockers.
Adapting Existing Agent Prompts
When you reuse an agent prompt from another local-coding workflow, rewrite it around the tools this server actually exposes:
Avoid instructions that ask the model to call unavailable workspace-switching, inventory, or handoff tools. To switch repositories, restart Coding Tools MCP with a different
--workspace.
Safety checklist
- The workspace in
server_infomatches the repository you expect. - The active profile exposes the tools you need.
read-onlyis not enough for source edits. - Remote sessions use bearer auth or OAuth unless you intentionally started a short-lived read-only test tunnel.
exec_commandoutput is treated as data; the model should still inspect failures and not assume a command succeeded.- The final answer includes changed files, verification, and blocked items.