Ask GitHub Copilot (new session)
copilot_askStart a new GitHub Copilot session with a prompt and workspace directory for agentic coding tasks, then continue it with follow-ups. Use for trusted autonomous prompts only.
Instructions
Best for agentic coding on a GitHub Copilot plan (copilot -p), in a NEW session.
Pass workspace=; without it the sub-agent sees no repo. Follow up with
copilot_continue. Uses your Copilot login or a COPILOT_GITHUB_TOKEN/GH_TOKEN env
var. Its sandbox is best-effort, not an OS boundary. Autonomous agent: trusted
prompts only.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "copilot_ask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override (`--model`). Use "auto" to let Copilot pick. Which ids work is ACCOUNT-DEPENDENT and copilot exposes no non-interactive list, so the bridge cannot validate this the way the agy/cursor tools do — an unavailable id errors immediately with copilot's own message, costing a call. Prefer omitting it (your account default) or "auto" unless you know your plan's ids. | |
| watch | No | If true, open a live "watch" view streaming copilot's steps from its `--output-format json` event stream. Same final text is returned. Best-effort. Default false. | |
| prompt | Yes | Question or instruction for Copilot. | |
| sandbox | No | Permission policy (maps to copilot's tool/path flags): "read-only" (default — best-effort: denies the local write/shell tools; NOT an OS sandbox, so unlike codex it is not a hard boundary), "workspace-write" (may edit files, confined to the workspace), or "danger-full-access" (--allow-all — avoid). | read-only |
| timeout_s | No | Max seconds to wait for copilot to complete. Default 180. (Copilot's reasoning models can be slow; raise this if needed.) | |
| workspace | No | Working root for the session (`-C`). Defaults to the server cwd. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |