-
Notifications
You must be signed in to change notification settings - Fork 758
Open
Labels
Description
Describe the bug
In Copilot CLI version 0.0.353, an agent defined with an MCP server exposes the MCP tools to the agent (e.g., test-mcp-get-greeting).
Starting from version 0.0.361, the agent itself is exposed as a tool (test-agent) which is great, but the tools from the MCP server defined in the agent's configuration are no longer visible to the agent or the user. The agent cannot access its own tools.
Affected version
0.0.365 Commit: 76d0881
Steps to reproduce the behavior
Project structure:
.
├── .github
│ └── agents
│ └── test-agent.md
└── test-mcp.js
- Create a local MCP server (e.g.,
test-mcp.js) that exposes a tool (e.g.,get-greeting). - Define an agent (e.g.,
test-agent.md) that uses this MCP server. - Run the agent with Copilot CLI 0.0.353:
npx @github/copilot@0.0.353 --agent test-agent --prompt "say hi" --log-level all
- Observe that
test-mcp-get-greetingis available.
- Observe that
- Run the agent with Copilot CLI 0.0.361:
npx @github/copilot@0.0.361 --agent test-agent --prompt "say hi" --log-level all
- Observe that
test-agentis available, buttest-mcp-get-greetingis missing.
- Observe that
Repro Environment
test-mcp.js: A simple MCP server exposingget-greeting..github/agents/test-agent.md: Agent definition usingtest-mcp.
test-mcp.js
#!/usr/bin/env node
const readline = require("readline").createInterface({ input: process.stdin });
let buffer = "";
readline.on("line", line => {
buffer += line;
try {
const msg = JSON.parse(buffer);
buffer = "";
const reply = obj => console.log(JSON.stringify({ jsonrpc: "2.0", id: msg.id, ...obj }));
if (msg.method === "initialize")
reply({ result: { protocolVersion: "2024-11-05", capabilities: { tools: {} }, serverInfo: { name: "TestMCP", version: "1.0.0" } } });
else if (msg.method === "tools/list")
reply({ result: { tools: [{ name: "get-greeting", description: "Returns a greeting", inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] } }] } });
else if (msg.method === "tools/call")
reply({ result: { content: [{ type: "text", text: `Hello, ${msg.params?.arguments?.name || "World"}!` }] } });
else if (msg.method !== "notifications/initialized")
reply({ error: { code: -32601, message: "Method not found" } });
} catch {}
});.github/agents/test-agent.md
---
name: test-agent
description: A test agent with MCP tools
mcp-servers:
test-mcp:
type: local
command: node
args: ["\\test-mcp.js"]
tools: ['*']
---
This is a test agent with MCP tools. Any time you say hi, you MUST preface it with an emoji, and list all available tools you have that are named with 'test' or 'mock'. This is what the user wants when they say hi.Expected behavior
The agent should be able to see and use the tools defined in its MCP server configuration, even if the agent itself is exposed as a tool.
Expected
npx @github/[email protected].??? --agent test-agent --prompt "say hi" --log-level all
👋 Hi! Here are the available tools with 'test' or 'mock' in their names:
1. **test-agent** - A test agent with MCP tools
2. **test-mcp-get-greeting** - Returns a greeting
Version 353
npx @github/[email protected] --agent test-agent --prompt "say hi" --log-level all
👋 Hi! Here are the available tools with 'test' or 'mock' in their names:
1. **test-mcp-get-greeting** - Returns a greeting
Version 365
npx @github/[email protected] --agent test-agent --prompt "say hi" --log-level all
👋 Hi! I have access to the following tools with 'test' or 'mock' in their names:
1. **test-agent** - A test agent with MCP tools
That's the only test/mock-related tool currently available to me!
Additional context
Logs from version 365
2025-12-01T16:33:56.859Z [INFO] Starting Copilot CLI: 0.0.365
Commit: 76d0881
2025-12-01T16:33:56.859Z [INFO] Node.js version: v24.3.0
2025-12-01T16:33:57.293Z [DEBUG] Fetched Copilot URL for ryanheaney_microsoft from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2025-12-01T16:33:57.294Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.enterprise.githubcopilot.com/mcp/readonly
2025-12-01T16:33:57.294Z [LOG] Creating MCP client for github-mcp-server...
2025-12-01T16:33:57.298Z [LOG] Connecting MCP client for github-mcp-server...
2025-12-01T16:33:57.687Z [LOG] MCP client for github-mcp-server connected, took 389ms
2025-12-01T16:33:57.687Z [LOG] Started MCP client for remote server github-mcp-server
2025-12-01T16:33:57.687Z [LOG] GitHub MCP server configured after authentication
2025-12-01T16:33:57.865Z [DEBUG] Fetched Copilot URL for ryanheaney_microsoft from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2025-12-01T16:33:57.866Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.365 (win32 v24.3.0)
2025-12-01T16:33:58.037Z [DEBUG] Successfully listed 29 models
2025-12-01T16:33:58.039Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.enterprise.githubcopilot.com/mcp/readonly
2025-12-01T16:33:58.039Z [LOG] Creating MCP client for github-mcp-server...
2025-12-01T16:33:58.039Z [LOG] Connecting MCP client for github-mcp-server...
2025-12-01T16:33:58.255Z [LOG] MCP client for github-mcp-server connected, took 216ms
2025-12-01T16:33:58.255Z [LOG] Started MCP client for remote server github-mcp-server
2025-12-01T16:33:58.457Z [DEBUG] Fetched Copilot URL for ryanheaney_microsoft from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2025-12-01T16:33:58.698Z [DEBUG] Fetched Copilot URL for ryanheaney_microsoft from https://api.github.com/graphql: 200 https://api.enterprise.githubcopilot.com
2025-12-01T16:33:58.698Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.365 (win32 v24.3.0)
2025-12-01T16:33:58.796Z [DEBUG] Successfully listed 29 models
2025-12-01T16:33:58.799Z [INFO]
2025-12-01T16:33:58.799Z [DEBUG] Using model: claude-sonnet-4.5
2025-12-01T16:33:58.799Z [START-GROUP] configured settings:
2025-12-01T16:33:58.799Z [DEBUG] {
"github": {
"serverUrl": "https://github.com",
"repo": {
"name": "copilot-sdk-session",
"commit": "copilot-sdk-commit",
"readWrite": false
},
"token": "******"
},
"version": "latest",
"service": {
"instance": {
"id": "4df8cc3d-34ba-4982-a3f0-b54f1d9f59fb"
},
"agent": {
"model": "capi:claude-sonnet-4.5"
}
},
"blackbird": {
"mode": "initial-search"
},
"problem": {
"statement": "say hi"
},
"api": {
"copilot": {
"integrationId": "copilot-developer-cli",
"url": "https://api.enterprise.githubcopilot.com",
"token": "******"
}
}
}
2025-12-01T16:33:58.799Z [END-GROUP]
2025-12-01T16:33:58.799Z [DEBUG] Using Copilot API at https://api.enterprise.githubcopilot.com with integration ID copilot-developer-cli
2025-12-01T16:33:58.800Z [DEBUG] Using GitHub OAuth token for Copilot API
2025-12-01T16:33:58.800Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.365 (win32 v24.3.0)
2025-12-01T16:33:58.801Z [DEBUG] str_replace_editor: default options: {
"truncateBasedOn": "tokenCount",
"truncateStyle": "middle"
}
2025-12-01T16:33:58.802Z [DEBUG] Loading tools for client: github-mcp-server
2025-12-01T16:33:58.902Z [DEBUG] Successfully listed 29 models
2025-12-01T16:33:58.902Z [DEBUG] Got model info: {
"billing": {
"is_premium": true,
"multiplier": 1,
"restricted_to": [
"pro",
"pro_plus",
"max",
"business",
"enterprise"
]
},
"capabilities": {
"family": "claude-sonnet-4.5",
"limits": {
"max_context_window_tokens": 144000,
"max_output_tokens": 16000,
"max_prompt_tokens": 128000,
"vision": {
"max_prompt_image_size": 3145728,
"max_prompt_images": 5,
"supported_media_types": [
"image/jpeg",
"image/png",
"image/webp"
]
}
},
"object": "model_capabilities",
"supports": {
"max_thinking_budget": 32000,
"min_thinking_budget": 1024,
"parallel_tool_calls": true,
"streaming": true,
"tool_calls": true,
"vision": true
},
"tokenizer": "o200k_base",
"type": "chat"
},
"id": "claude-sonnet-4.5",
"is_chat_default": false,
"is_chat_fallback": false,
"model_picker_category": "versatile",
"model_picker_enabled": true,
"name": "Claude Sonnet 4.5",
"object": "model",
"policy": {
"state": "enabled",
"terms": "Enable access to the latest Claude Sonnet 4.5 model from Anthropic. [Learn more about how GitHub Copilot serves Claude Sonnet 4.5](https://docs.github.com/en/copilot/using-github-copilot/ai-models/using-claude-sonnet-in-github-copilot)."
},
"preview": false,
"supported_endpoints": [
"/chat/completions"
],
"vendor": "Anthropic",
"version": "claude-sonnet-4.5"
}
2025-12-01T16:33:59.137Z [DEBUG] Skipping tool download_workflow_run_artifact for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_code_scanning_alert for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-get_commit
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-get_file_contents
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-get_job_logs
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_label for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_latest_release for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_release_by_tag for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_secret_scanning_alert for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_tag for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-get_workflow_run
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-get_workflow_run_logs
2025-12-01T16:33:59.138Z [DEBUG] Skipping tool get_workflow_run_usage for client github-mcp-server
2025-12-01T16:33:59.138Z [DEBUG] Adding tool: github-mcp-server-issue_read
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_branches
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_code_scanning_alerts for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_commits
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_issue_types for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_issues
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_pull_requests
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_releases for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_secret_scanning_alerts for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_tags for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_workflow_jobs for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool list_workflow_run_artifacts for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_workflow_runs
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-list_workflows
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-pull_request_read
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-search_code
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-search_issues
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-search_pull_requests
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-search_repositories
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-search_users
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool summarize_job_log_failures for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Skipping tool summarize_run_log_failures for client github-mcp-server
2025-12-01T16:33:59.139Z [DEBUG] Adding tool: github-mcp-server-web_search
2025-12-01T16:33:59.302Z [START-GROUP] Completion request configuration:
2025-12-01T16:33:59.302Z [DEBUG] Client options:
2025-12-01T16:33:59.302Z [DEBUG] {
"model": "claude-sonnet-4.5",
"toolTokenBudgetProportion": 0.25,
"retryPolicy": {
"maxRetries": 5,
"errorCodesToRetry": [],
"rateLimitRetryPolicy": {
"defaultRetryAfterSeconds": 5,
"initialRetryBackoffExtraSeconds": 1,
"retryBackoffExtraGrowth": 2,
"maxRetryAfterSeconds": 180
}
},
"thinkingMode": false,
"requestHeaders": {},
"disableHttpLogging": false,
"enableCacheControl": true
}
2025-12-01T16:33:59.302Z [DEBUG] Request options:
2025-12-01T16:33:59.302Z [DEBUG] {
"failIfInitialInputsTooLong": false,
"processors": {
"preRequest": [
"BasicTruncator",
"SupportImageToolsVisionProcessor",
"ImmediatePromptProcessor",
"{\"type\":\"InitiatorHeaderProcessor\"}"
],
"postToolExecution": [
"SupportImageToolsVisionProcessor"
],
"onRequestError": [
"BasicTruncator"
],
"onStreamingChunk": [
"StreamingChunkDisplay",
"ReportIntentExtractor"
]
},
"executeToolsInParallel": true,
"abortSignal": {},
"stream": true
}
2025-12-01T16:33:59.302Z [DEBUG] Tools:
2025-12-01T16:33:59.306Z [DEBUG] [
{
"type": "function",
"function": {
"name": "powershell",
"description": "Runs a PowerShell command in an interactive PowerShell session.\n* The \"command\" parameter does NOT need to be XML-escaped.\n* You don't have internet access via this tool.\n* You can run Python, Node.js and Go code with `python`, `node` and `go`.\n* Each sessionId identifies a persistent session. State is saved across calls.\n* `initial_wait` must be 30-600 seconds. Give long-running commands time to produce output.\n* If a command hasn't completed within initial_wait, it returns partial output and continues running. Use `read_powershell` for more output or `stop_powershell` to stop it.\n* You can install Python, JavaScript and Go packages with the `pip`, `npm` and `go` commands.\n* Use native PowerShell commands not DOS commands (e.g., use Get-ChildItem rather than dir). DOS commands may not work.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "The PowerShell command and arguments to run."
},
"description": {
"type": "string",
"description": "A short human-readable description of what the command does, limited to 100 characters, for example \"List files in the current directory\", \"Install dependencies with npm\" or \"Run RSpec tests\"."
},
"initial_wait": {
"type": "integer",
"description": "(Optional) Time in seconds to wait for initial output when mode is \"sync\". The command continues running in the background after this time. Default is 30 seconds if not provided."
},
"sessionId": {
"type": "string",
"description": "(Optional) Identifier for the PowerShell session. If provided, the command will run in that session, reusing any environment variables or state. If not provided, a new session with auto-generated ID will be created. For async/detached modes, the generated sessionId is returned and should be used with read_powershell, write_powershell, and stop_powershell."
},
"mode": {
"type": "string",
"enum": [
"sync",
"async",
"detached"
],
"description": "Execution mode: \"sync\" runs synchronously and waits for completion (default), \"async\" runs asynchronously in the background attached to the session, \"detached\" runs asynchronously and persists after your process shuts down. You can send input to \"async\" or \"detached\" commands using the `write_powershell` tool and read output using the `read_powershell` tool."
}
},
"required": [
"command",
"description",
"mode"
]
}
}
},
{
"type": "function",
"function": {
"name": "write_powershell",
"description": "Sends input to the specified command or PowerShell session.\n* This tool can be used to send input to a running PowerShell command or an interactive console app.\n* PowerShell commands are run in an interactive PowerShell session with a TTY device and PowerShell command processor.\n* sessionId (required) must match the sessionId used to invoke the async powershell command.\n* You can send text, {up}, {down}, {left}, {right}, {enter}, and {backspace} as input.\n* Some applications present a list of options to select from. The selection is often denoted using ❯, >, or different formatting.\n* When presented with a list of items, make a selection by sending arrow keys like {up} or {down} to move the selection to your chosen item and then {enter} to select it.\n* The response will contain any output read after \"delay\" seconds. Delay should be appropriate for the task and never less than 10 seconds.",
"parameters": {
"type": "object",
"properties": {
"sessionId": {
"type": "string",
"description": "Indicates which PowerShell session to run the command in. Multiple sessions may be used to run different commands at the same time."
},
"input": {
"type": "string",
"description": "The input to send to the command or session."
},
"delay": {
"type": "integer",
"description": "(Optional) The amount of time in seconds to wait before reading the output that resulted from the input."
}
},
"required": [
"sessionId",
"input"
]
}
}
},
{
"type": "function",
"function": {
"name": "read_powershell",
"description": "Reads output from a PowerShell command.\n* Reads the output of a command running in an \"async\" PowerShell session.\n* The sessionId MUST be the same one used to invoke the powershell command.\n* You can call this tool multiple times to read output produced since the last call.\n* Each request has a cost, so provide a reasonable \"delay\" parameter value for the task, to minimize the need for repeated reads that return no output.\n* If a read request generates no output, consider using exponential backoff in choosing the delay between reads of the same command.\n* Though `write_powershell` accepts ANSI control codes, this tool does not include them in the output.",
"parameters": {
"type": "object",
"properties": {
"sessionId": {
"type": "string",
"description": "The ID of the shell session used to invoke the PowerShell command. Look back to the powershell call to find the sessionId."
},
"delay": {
"type": "integer",
"description": "(Optional) The amount of time in seconds to wait before reading the output."
}
},
"required": [
"sessionId",
"delay"
]
}
}
},
{
"type": "function",
"function": {
"name": "stop_powershell",
"description": "Stops a running PowerShell command.\n* Stops a running PowerShell command by terminating the entire PowerShell session and process.\n* This tool can be used to stop commands that have not exited on their own.\n* Any environment variables defined will have to be redefined after using this tool if the same session ID is used to run a new command.\n* The sessionId must match the sessionId used to invoke the powershell command.",
"parameters": {
"type": "object",
"properties": {
"sessionId": {
"type": "string",
"description": "The ID of the PowerShell session used to invoke the powershell command."
}
},
"required": [
"sessionId"
]
}
}
},
{
"type": "function",
"function": {
"name": "list_powershell",
"description": "Lists all active PowerShell sessions.\n* Returns information about all currently running PowerShell sessions.\n* Useful for discovering sessionIds to use with read_powershell, write_powershell, or stop_powershell.\n* Shows sessionId, command, mode, PID, status, and whether there is unread output.",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "grep",
"description": "Fast and precise code search using ripgrep. Search for patterns in file contents.",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "The regular expression pattern to search for in file contents"
},
"path": {
"type": "string",
"description": "File or directory to search in. Defaults to current working directory"
},
"output_mode": {
"type": "string",
"enum": [
"content",
"files_with_matches",
"count"
],
"description": "Output format. Defaults to \"files_with_matches\". \"content\": Shows matching lines (supports context flags and line numbers). \"files_with_matches\": Shows only file paths. \"count\": Shows match counts per file"
},
"glob": {
"type": "string",
"description": "Glob pattern to filter files (e.g., \"*.js\", \"*.{ts,tsx}\")"
},
"type": {
"type": "string",
"description": "File type filter (e.g., \"js\", \"py\", \"rust\", \"go\", \"java\")"
},
"-i": {
"type": "boolean",
"description": "Case insensitive search"
},
"-A": {
"type": "number",
"description": "Lines of context after match (requires output_mode: \"content\")"
},
"-B": {
"type": "number",
"description": "Lines of context before match (requires output_mode: \"content\")"
},
"-C": {
"type": "number",
"description": "Lines of context before and after match (requires output_mode: \"content\")"
},
"-n": {
"type": "boolean",
"description": "Show line numbers (requires output_mode: \"content\")"
},
"head_limit": {
"type": "number",
"description": "Limit output to first N results"
},
"multiline": {
"type": "boolean",
"description": "Enable multiline mode where patterns can span lines. Default: false. Use for cross-line patterns."
}
},
"required": [
"pattern"
]
}
}
},
{
"type": "function",
"function": {
"name": "glob",
"description": "Fast file pattern matching using glob patterns. Find files by name patterns.",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "The glob pattern to match files against (e.g., \"**/*.js\", \"src/**/*.ts\", \"*.{ts,tsx}\")"
},
"path": {
"type": "string",
"description": "The directory to search in. Defaults to current working directory if not specified. IMPORTANT: Omit this field to use the default directory - DO NOT enter 'undefined' or 'null'"
}
},
"required": [
"pattern"
]
}
}
},
{
"type": "function",
"function": {
"name": "view",
"description": "Tool for viewing files and directories.\n* If `path` is an image file, returns the image as base64-encoded data along with its MIME type.\n* If `path` is any other type of file, `view` displays the content with line numbers prefixed to each line in the format `N. ` where N is the line number (e.g., `1. `, `2. `, etc.).\n* If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep\n* Path *MUST* be absolute",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Full absolute path to file or directory. File MUST exist to view.",
"type": "string"
},
"view_range": {
"description": "Optional parameter when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.",
"items": {
"type": "integer"
},
"type": "array"
}
},
"required": [
"path"
]
}
}
},
{
"type": "function",
"function": {
"name": "create",
"description": "Tool for creating new files.\n* Creates a new file with the specified content at the given path\n* Cannot be used if the specified path already exists\n* Parent directories must exist before creating the file\n* Path *MUST* be absolute",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Full absolute path to file to create. File MUST not exist before creating.",
"type": "string"
},
"file_text": {
"description": "The content of the file to be created.",
"type": "string"
}
},
"required": [
"path",
"file_text"
]
}
}
},
{
"type": "function",
"function": {
"name": "edit",
"description": "Tool for making string replacements in files.\n* Replaces exactly one occurrence of `old_str` with `new_str` in the specified file\n* When called multiple times in a single response, edits are independently made in the order calls are specified\n* The `old_str` parameter must match EXACTLY one or more consecutive lines from the original file\n* If `old_str` is not unique in the file, replacement will not be performed\n* Make sure to include enough context in `old_str` to make it unique\n* Path *MUST* be absolute",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Full absolute path to file to edit. File MUST exist to edit.",
"type": "string"
},
"old_str": {
"description": "The string in the file to replace. Leading and ending whitespaces from file content should be preserved!",
"type": "string"
},
"new_str": {
"description": "The new string to replace old_str with.",
"type": "string"
}
},
"required": [
"path",
"old_str"
]
}
}
},
{
"type": "function",
"function": {
"name": "report_intent",
"description": "Use this tool to update the current intent of the session. This is displayed in the user interface and is important to help the user understand what you're doing.\nRules:\n- Call this tool ONLY when you are also calling other tools. Do not call this tool in isolation.\n- Put this tool call first in your collection of tool calls.\n- Always call it at least once per user message (on your first tool-calling turn after a user message).\n- Don't then re-call it if the reported intent is still applicable\nWhen to update intent (examples):\n- ✅ \"Exploring codebase\" → \"Installing dependencies\" (new phase)\n- ✅ \"Running tests\" → \"Debugging test failures\" (new phase)\n- ✅ \"Creating hook script\" → \"Fixing security issue\" (new phase)\n- ❌ \"Installing Pandas 2.2.3\" → \"Installing Pandas with pip3\" (same goal, different tactic: should just have said \"Installing Pandas\")\n- ❌ \"Running transformation script\" → \"Running with python3\" (same goal, fallback attempt)\nPhrasing guidelines:\n- The intent text must be succinct - 4 words max\n- Keep it high-level - it should summarize a series of steps and focus on the goal\n- Use gerund form\n- Bad examples:\n - 'I am going to read the codebase and understand it.' (too long and no gerund)\n - 'Writing test1.js' (too low-level: describe the goal, not the specific file)\n - 'Updating logic' (too vague: at least add one word to hint at what logic)\n- Good examples:\n - 'Exploring codebase'\n - 'Creating parser tests'\n - 'Fixing homepage CSS'",
"parameters": {
"type": "object",
"properties": {
"intent": {
"type": "string",
"description": "A description of what you are currently doing or planning to do."
}
},
"required": [
"intent"
]
}
}
},
{
"type": "function",
"function": {
"name": "fetch_copilot_cli_documentation",
"description": "Fetches documentation about you, the GitHub Copilot CLI, and your capabilities. Use this tool when the user asks how to use you, what you can do, or about specific features of the GitHub Copilot CLI.",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-get_commit",
"description": "Get details for a commit from a GitHub repository",
"parameters": {
"type": "object",
"properties": {
"include_diff": {
"default": true,
"description": "Whether to include file diffs and stats in the response. Default is true.",
"type": "boolean"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "Commit SHA, branch name, or tag name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"sha"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-get_file_contents",
"description": "Get the contents of a file or directory from a GitHub repository",
"parameters": {
"type": "object",
"properties": {
"owner": {
"description": "Repository owner (username or organization)",
"type": "string"
},
"path": {
"default": "/",
"description": "Path to file/directory (directories must end with a slash '/')",
"type": "string"
},
"ref": {
"description": "Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head`",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "Accepts optional commit SHA. If specified, it will be used instead of ref",
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-get_job_logs",
"description": "Download logs for a specific workflow job or efficiently get all failed job logs for a workflow run",
"parameters": {
"type": "object",
"properties": {
"failed_only": {
"description": "When true, gets logs for all failed jobs in run_id",
"type": "boolean"
},
"job_id": {
"description": "The unique identifier of the workflow job (required for single job logs)",
"type": "number"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"return_content": {
"description": "Returns actual log content instead of URLs",
"type": "boolean"
},
"run_id": {
"description": "Workflow run ID (required when using failed_only)",
"type": "number"
},
"tail_lines": {
"default": 500,
"description": "Number of lines to return from the end of the log",
"type": "number"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-get_workflow_run",
"description": "Get details of a specific workflow run",
"parameters": {
"type": "object",
"properties": {
"owner": {
"description": "Repository owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"run_id": {
"description": "The unique identifier of the workflow run",
"type": "number"
}
},
"required": [
"owner",
"repo",
"run_id"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-get_workflow_run_logs",
"description": "Download logs for a specific workflow run (EXPENSIVE: downloads ALL logs as ZIP. Consider using get_job_logs with failed_only=true for debugging failed jobs)",
"parameters": {
"type": "object",
"properties": {
"owner": {
"description": "Repository owner",
"type": "string"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"run_id": {
"description": "The unique identifier of the workflow run",
"type": "number"
}
},
"required": [
"owner",
"repo",
"run_id"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-issue_read",
"description": "Get information about a specific issue in a GitHub repository.",
"parameters": {
"type": "object",
"properties": {
"issue_number": {
"description": "The number of the issue",
"type": "number"
},
"method": {
"description": "The read operation to perform on a single issue. \nOptions are: \n1. get - Get details of a specific issue.\n2. get_comments - Get issue comments.\n3. get_sub_issues - Get sub-issues of the issue.\n4. get_labels - Get labels assigned to the issue.\n",
"enum": [
"get",
"get_comments",
"get_sub_issues",
"get_labels"
],
"type": "string"
},
"owner": {
"description": "The owner of the repository",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "The name of the repository",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo",
"issue_number"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_branches",
"description": "List branches in a GitHub repository",
"parameters": {
"type": "object",
"properties": {
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_commits",
"description": "Get list of commits of a branch in a GitHub repository. Returns at least 30 results per page by default, but can return more if specified using the perPage parameter (up to 100).",
"parameters": {
"type": "object",
"properties": {
"author": {
"description": "Author username or email address to filter commits by",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sha": {
"description": "Commit SHA, branch or tag name to list commits of. If not provided, uses the default branch of the repository. If a commit SHA is provided, will list commits up to that SHA.",
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_issues",
"description": "List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.",
"parameters": {
"type": "object",
"properties": {
"after": {
"description": "Cursor for pagination. Use the endCursor from the previous page's PageInfo for GraphQL APIs.",
"type": "string"
},
"direction": {
"description": "Order direction. If provided, the 'orderBy' also needs to be provided.",
"enum": [
"ASC",
"DESC"
],
"type": "string"
},
"labels": {
"description": "Filter by labels",
"items": {
"type": "string"
},
"type": "array"
},
"orderBy": {
"description": "Order issues by field. If provided, the 'direction' also needs to be provided.",
"enum": [
"CREATED_AT",
"UPDATED_AT",
"COMMENTS"
],
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"since": {
"description": "Filter by date (ISO 8601 timestamp)",
"type": "string"
},
"state": {
"description": "Filter by state, by default both open and closed issues are returned when not provided",
"enum": [
"OPEN",
"CLOSED"
],
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_pull_requests",
"description": "List pull requests in a GitHub repository. If the user specifies an author, then DO NOT use this tool and use the search_pull_requests tool instead.",
"parameters": {
"type": "object",
"properties": {
"base": {
"description": "Filter by base branch",
"type": "string"
},
"direction": {
"description": "Sort direction",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"head": {
"description": "Filter by head user/org and branch",
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"sort": {
"description": "Sort by",
"enum": [
"created",
"updated",
"popularity",
"long-running"
],
"type": "string"
},
"state": {
"description": "Filter by state",
"enum": [
"open",
"closed",
"all"
],
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_workflow_runs",
"description": "List workflow runs for a specific workflow",
"parameters": {
"type": "object",
"properties": {
"actor": {
"description": "Returns someone's workflow runs. Use the login for the user who created the workflow run.",
"type": "string"
},
"branch": {
"description": "Returns workflow runs associated with a branch. Use the name of the branch.",
"type": "string"
},
"event": {
"description": "Returns workflow runs for a specific event type",
"enum": [
"branch_protection_rule",
"check_run",
"check_suite",
"create",
"delete",
"deployment",
"deployment_status",
"discussion",
"discussion_comment",
"fork",
"gollum",
"issue_comment",
"issues",
"label",
"merge_group",
"milestone",
"page_build",
"public",
"pull_request",
"pull_request_review",
"pull_request_review_comment",
"pull_request_target",
"push",
"registry_package",
"release",
"repository_dispatch",
"schedule",
"status",
"watch",
"workflow_call",
"workflow_dispatch",
"workflow_run"
],
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
},
"status": {
"description": "Returns workflow runs with the check run status",
"enum": [
"queued",
"in_progress",
"completed",
"requested",
"waiting"
],
"type": "string"
},
"workflow_id": {
"description": "The workflow ID or workflow file name",
"type": "string"
}
},
"required": [
"owner",
"repo",
"workflow_id"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-list_workflows",
"description": "List workflows in a repository",
"parameters": {
"type": "object",
"properties": {
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"owner",
"repo"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-pull_request_read",
"description": "Get information on a specific pull request in GitHub repository.",
"parameters": {
"type": "object",
"properties": {
"method": {
"description": "Action to specify what pull request data needs to be retrieved from GitHub. \nPossible options: \n 1. get - Get details of a specific pull request.\n 2. get_diff - Get the diff of a pull request.\n 3. get_status - Get status of a head commit in a pull request. This reflects status of builds and checks.\n 4. get_files - Get the list of files changed in a pull request. Use with pagination parameters to control the number of results returned.\n 5. get_review_comments - Get the review comments on a pull request. They are comments made on a portion of the unified diff during a pull request review. Use with pagination parameters to control the number of results returned.\n 6. get_reviews - Get the reviews on a pull request. When asked for review comments, use get_review_comments method.\n 7. get_comments - Get comments on a pull request. Use this if user doesn't specifically want review comments. Use with pagination parameters to control the number of results returned.\n",
"enum": [
"get",
"get_diff",
"get_status",
"get_files",
"get_review_comments",
"get_reviews",
"get_comments"
],
"type": "string"
},
"owner": {
"description": "Repository owner",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"pullNumber": {
"description": "Pull request number",
"type": "number"
},
"repo": {
"description": "Repository name",
"type": "string"
}
},
"required": [
"method",
"owner",
"repo",
"pullNumber"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-search_code",
"description": "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns.",
"parameters": {
"type": "object",
"properties": {
"order": {
"description": "Sort order for results",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"query": {
"description": "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.",
"type": "string"
},
"sort": {
"description": "Sort field ('indexed' only)",
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-search_issues",
"description": "Search for issues in GitHub repositories using issues search syntax already scoped to is:issue",
"parameters": {
"type": "object",
"properties": {
"order": {
"description": "Sort order",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"owner": {
"description": "Optional repository owner. If provided with repo, only issues for this repository are listed.",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"query": {
"description": "Search query using GitHub issues search syntax",
"type": "string"
},
"repo": {
"description": "Optional repository name. If provided with owner, only issues for this repository are listed.",
"type": "string"
},
"sort": {
"description": "Sort field by number of matches of categories, defaults to best match",
"enum": [
"comments",
"reactions",
"reactions-+1",
"reactions--1",
"reactions-smile",
"reactions-thinking_face",
"reactions-heart",
"reactions-tada",
"interactions",
"created",
"updated"
],
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-search_pull_requests",
"description": "Search for pull requests in GitHub repositories using issues search syntax already scoped to is:pr",
"parameters": {
"type": "object",
"properties": {
"order": {
"description": "Sort order",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"owner": {
"description": "Optional repository owner. If provided with repo, only pull requests for this repository are listed.",
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"query": {
"description": "Search query using GitHub pull request search syntax",
"type": "string"
},
"repo": {
"description": "Optional repository name. If provided with owner, only pull requests for this repository are listed.",
"type": "string"
},
"sort": {
"description": "Sort field by number of matches of categories, defaults to best match",
"enum": [
"comments",
"reactions",
"reactions-+1",
"reactions--1",
"reactions-smile",
"reactions-thinking_face",
"reactions-heart",
"reactions-tada",
"interactions",
"created",
"updated"
],
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-search_repositories",
"description": "Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub.",
"parameters": {
"type": "object",
"properties": {
"minimal_output": {
"default": true,
"description": "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.",
"type": "boolean"
},
"order": {
"description": "Sort order",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"query": {
"description": "Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.",
"type": "string"
},
"sort": {
"description": "Sort repositories by field, defaults to best match",
"enum": [
"stars",
"forks",
"help-wanted-issues",
"updated"
],
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-search_users",
"description": "Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members.",
"parameters": {
"type": "object",
"properties": {
"order": {
"description": "Sort order",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"page": {
"description": "Page number for pagination (min 1)",
"minimum": 1,
"type": "number"
},
"perPage": {
"description": "Results per page for pagination (min 1, max 100)",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"query": {
"description": "User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.",
"type": "string"
},
"sort": {
"description": "Sort users by number of followers or repositories, or when the person joined GitHub.",
"enum": [
"followers",
"repositories",
"joined"
],
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "github-mcp-server-web_search",
"description": "This tool performs an AI-powered web search to provide intelligent, contextual answers with citations.\n\t\t\t\t\tUse this tool when:\n\t\t\t\t\t- The user's query pertains to recent events or information that is frequently updated\n\t\t\t\t\t- The user's query is about new developments, trends, or technologies\n\t\t\t\t\t- The user's query is extremely specific, detailed, or pertains to a niche subject not likely to be covered in your knowledge base\n\t\t\t\t\t- The user explicitly requests a web search\n\t\t\t\t\t- You need current, factual information with verifiable sources\n\n\t\t\t\t\tReturns an AI-generated response with inline citations and a list of sources.",
"parameters": {
"type": "object",
"properties": {
"query": {
"description": "A clear, specific question or prompt that requires up-to-date information from the web.\n\t\t\t\t\tGuidelines:\n\t\t\t\t\t- Formulate a concise, standalone question or request based on the original user prompt which might be lengthy, contain multiple questions, or cover various topics\n\t\t\t\t\t- Focus on a single topic or question (the tool can be called multiple times for multiple questions)\n\t\t\t\t\t- Be specific about what information you're seeking\n\t\t\t\t\t- The prompt will be sent to an AI agent that searches the web and generates a comprehensive answer with citations\n\n\t\t\t\t\tExamples:\n\t\t\t\t\t- \\\"What are the latest features in React 19?\\\"\n\t\t\t\t\t- \\\"What is the current status of the James Webb Space Telescope?\\\"\n\t\t\t\t\t- \\\"Explain the recent developments in quantum computing?\\\"\n\n\t\t\t\t\tNote: Unlike a raw search query, this should be a natural language prompt that clearly expresses what you want to know.",
"type": "string"
}
},
"required": [
"query"
]
}
}
},
{
"type": "function",
"function": {
"name": "test-agent",
"description": "Custom agent: A test agent with MCP tools",
"parameters": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "The prompt for the agent."
}
},
"required": [
"prompt"
]
}
},
"copilot_cache_control": {
"type": "ephemeral"
}
}
]
2025-12-01T16:33:59.306Z [END-GROUP]
2025-12-01T16:33:59.877Z [DEBUG] InitiatorHeaderProcessor: Setting X-Initiator to 'user'
2025-12-01T16:33:59.877Z [START-GROUP] Sending request to the AI model
2025-12-01T16:34:02.515Z [INFO] [log_90fe79, x-request-id: "00000-acc25a26-d664-424e-8760-9341d0d4f6b3"] post https://api.enterprise.githubcopilot.com/chat/completions succeeded with status 200 in 2634ms
2025-12-01T16:34:03.509Z [DEBUG] response (Request-ID 00000-acc25a26-d664-424e-8760-9341d0d4f6b3):
2025-12-01T16:34:03.509Z [DEBUG] data: