Skip to main content

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:
For a remote ChatGPT connector, expose the server through an HTTPS tunnel and use the safest profile that fits the task. Use 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:
  1. Orient with server_info and get_default_cwd.
  2. Find only the relevant files with search_text, list_files, or list_dir.
  3. Read the minimum useful slices with read_file.
  4. Edit with apply_patch.
  5. Verify with exec_command when the profile and permission mode allow it.
  6. Review the result with git_diff and git_status.
  7. 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_info matches the repository you expect.
  • The active profile exposes the tools you need. read-only is not enough for source edits.
  • Remote sessions use bearer auth or OAuth unless you intentionally started a short-lived read-only test tunnel.
  • exec_command output 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.