run_copilot_conversation
Run a one-shot GitHub Copilot CLI prompt to generate, explain, or debug code, returning the complete response. Handles permission questions by requesting input when needed.
Instructions
Execute a prompt with GitHub Copilot CLI. Runs Copilot in non-interactive mode (-p) and returns the complete response. Use this for one-shot tasks like code generation, explanation, debugging, etc. In interactive permission mode, may return with needsInput=true if Copilot asks a permission question — use respond_to_copilot to answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Copilot to operate in (for file access) | |
| model | No | AI model to use (e.g., claude-sonnet-4, gpt-4.1, claude-opus-4.5) | |
| prompt | Yes | The prompt to send to Copilot CLI | |
| add_dirs | No | Additional directories to allow Copilot to access | |
| timeout_ms | No | Timeout in milliseconds (default: 300000 = 5 minutes) | |
| allow_tools | No | Specific tools to allow (e.g., 'shell(git:*)', 'write'). If not set, all tools are allowed in autonomous mode. | |
| permission_mode | No | Permission handling mode. 'autonomous' (default): auto-approve all tools. 'interactive': ask MCP client for permission via respond_to_copilot tool. |