Skip to main content
Glama

Ask GitHub Copilot (new session)

copilot_ask

Start 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

NameRequiredDescriptionDefault
modelNoOptional 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.
watchNoIf 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.
promptYesQuestion or instruction for Copilot.
sandboxNoPermission 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_sNoMax seconds to wait for copilot to complete. Default 180. (Copilot's reasoning models can be slow; raise this if needed.)
workspaceNoWorking root for the session (`-C`). Defaults to the server cwd.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.22.1
    • changedInput schema / properties / model / description
      Previous value: -"Optional model override (`--model`, e.g. \"gpt-5.3-codex\"); omit to\n   use your account's default. An unavailable model errors immediately."New value: +"Optional model override (`--model`). Use \"auto\" to let Copilot pick.\n   Which ids work is ACCOUNT-DEPENDENT and copilot exposes no\n   non-interactive list, so the bridge cannot validate this the way the\n   agy/cursor tools do — an unavailable id errors immediately with\n   copilot's own message, costing a call. Prefer omitting it (your\n   account default) or \"auto\" unless you know your plan's ids."
  2. Addedv0.15.4

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial context the annotations do not carry: authentication via Copilot login or COPILOT_GITHUB_TOKEN/GH_TOKEN, the fact that the sandbox is a best-effort policy rather than an OS boundary, and the risk framing 'Autonomous agent: trusted prompts only'. These are precisely the behavioral traits an agent needs before delegating work.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the core purpose, then requirements, follow-up, auth, and the safety caveat. Every sentence conveys a distinct constraint; nothing is redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, an output schema, and hostile-default annotations (readOnly=false, openWorld=true), the description supplies the missing pieces: auth path, session scoping, sandbox limits, and trust warning. Nothing an agent needs to invoke it correctly is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds meaning beyond it by explaining the consequence of omitting workspace ('the sub-agent sees no repo'), which the schema only describes as 'Defaults to the server cwd'. It also restates the env-var/plan dependency that affects which model ids work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Ask GitHub Copilot', `copilot -p`) and pins the scope to a NEW session, which is exactly what separates it from copilot_continue. An agent can route between the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear usage conditions ('Best for agentic coding on a GitHub Copilot plan', must pass workspace or the sub-agent sees no repo) and names the follow-up tool copilot_continue for continuity. It lacks an explicit 'when not to use' against the other backend tools (claude_ask, codex_ask), but the guidance present is actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.