-
Notifications
You must be signed in to change notification settings - Fork 564
Description
Describe the bug
The documentation for custom agents states that we should be able to filter the tools exposed during a custom agent run.
Enable specific tools: Provide a list of specific tool names or aliases (for example, tools: ["read", "edit", "search"]) to enable only those tools. For available tool aliases, see Tool aliases below.
Disable all tools: Use an empty list (tools: []) to disable all tools for the agent.
However this behavior does not seem to work when a custom agent is invoked using the --agent parameter. The LLM receives a list of all tools in the system, not the filtered ones.
Affected version
0.0.353 Commit: f8fd3e3
Steps to reproduce the behavior
Minimal repro
root
├── .github
│ └── agents
│ └── my-agent.md
└── some-text.txt
my-agent.md:
---
name: my-agent
description: This is my test agent.
tools: ['read']
---
Use powershell tools execute and clean up a script that counts the number of instances of the word 'the' in the root of our repo.some-text.txt:
The quick brown fox jumps over the lazy dog.
Invokation command:
copilot --agent my-agent --prompt Begin. --log-level all --allow-all-toolsResult:
> copilot --agent my-agent --prompt Begin. --log-level all --allow-all-tools
I'll create a PowerShell script to count instances of the word 'the' in files at the root of the repo, execute it, and then clean it up.
✓ Create count-the.ps1 (+10)
✓ Execute the word counting script
$ .\count-the.ps1
↪ 2 lines...
✓ Clean up the script file
$ Remove-Item .\count-the.ps1
↪ 1 line...
Done! Found 3 instances of the word 'the' in files at the root of the repo, and cleaned up the script.
As you can see, despite specifying only the 'read' tool in the agent configuration, the agent is still able to create and execute a PowerShell script, which should not be possible.
Further evidence that filtering is not being applied can be seen in the logs (full logs attached):
2025-11-13T22:42:18.185Z [DEBUG] Tools:
2025-11-13T22:42:18.188Z [DEBUG] [
{
"type": "function",
"function": {
"name": "powershell",
"description": "Runs a PowerShell command in an interactive PowerShell session.
... [truncated for brevity] ...
Expected behavior
The expected behavior is that the agent should only have access to the 'read' tools, and thus should not be able to create or execute scripts using the 'powershell' tool.
Further evidence that filtering is not working as expected from the documentation can be found in this agent:
---
name: my-agent
description: This is my test agent.
tools: ['read', 'view']
---
Please list all tools you have access to with a star emoji to the left of each tool you can use.When invoked, this agent lists all available tools, including those that should have been filtered out.
copilot --agent my-agent --prompt Begin. --log-level all --allow-all-tools
Here are all the tools I have access to:
⭐ powershell
⭐ write_powershell
⭐ read_powershell
⭐ stop_powershell
⭐ view
⭐ create
⭐ edit
⭐ report_intent
⭐ github-mcp-server-get_commit
⭐ github-mcp-server-get_file_contents
⭐ github-mcp-server-get_job_logs
⭐ github-mcp-server-get_workflow_run
⭐ github-mcp-server-get_workflow_run_logs
⭐ github-mcp-server-list_branches
⭐ github-mcp-server-list_commits
⭐ github-mcp-server-list_issues
⭐ github-mcp-server-list_pull_requests
⭐ github-mcp-server-list_workflow_runs
⭐ github-mcp-server-list_workflows
⭐ github-mcp-server-pull_request_read
⭐ github-mcp-server-search_code
⭐ github-mcp-server-search_issues
⭐ github-mcp-server-search_pull_requests
⭐ github-mcp-server-search_repositories
⭐ github-mcp-server-search_users
⭐ github-mcp-server-web_search
It is expected that only the 'read' tool would be listed with a star, but instead all tools are shown as available.
copilot --agent my-agent --prompt Begin. --log-level all --allow-all-tools
Here are all the tools I have access to:
⭐ view
Additional context
Log file for the minimal repro
2025-11-13T22:42:16.435Z [INFO] Starting Copilot CLI: 0.0.353
Commit: f8fd3e3
2025-11-13T22:42:16.435Z [INFO] Node.js version: v24.3.0
2025-11-13T22:42:16.829Z [DEBUG] Fetched Copilot URL: 200 https://api.enterprise.githubcopilot.com
2025-11-13T22:42:16.830Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.enterprise.githubcopilot.com/mcp/readonly
2025-11-13T22:42:16.830Z [LOG] Creating MCP client for github-mcp-server...
2025-11-13T22:42:16.833Z [LOG] Connecting MCP client for github-mcp-server...
2025-11-13T22:42:17.201Z [LOG] MCP client for github-mcp-server connected, took 368ms
2025-11-13T22:42:17.201Z [LOG] Started MCP client for remote server github-mcp-server
2025-11-13T22:42:17.201Z [LOG] GitHub MCP server configured after authentication
2025-11-13T22:42:17.401Z [DEBUG] Fetched Copilot URL: 200 https://api.enterprise.githubcopilot.com
2025-11-13T22:42:17.401Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.353 (win32 v24.3.0) OpenAI/5.20.1
2025-11-13T22:42:17.570Z [DEBUG] Successfully listed 29 models
2025-11-13T22:42:17.768Z [DEBUG] Fetched Copilot URL: 200 https://api.enterprise.githubcopilot.com
2025-11-13T22:42:17.821Z [INFO]
2025-11-13T22:42:17.821Z [DEBUG] Using model: claude-sonnet-4.5
2025-11-13T22:42:17.821Z [START-GROUP] configured settings:
2025-11-13T22:42:17.821Z [DEBUG] {
"version": "latest",
"service": {
"instance": {
"id": "4b8914d3-7d4d-4451-9644-b0889c54dabe"
},
"agent": {
"model": "sweagent-capi:claude-sonnet-4.5"
}
},
"blackbird": {
"mode": "initial-search"
},
"problem": {
"statement": "Begin."
},
"api": {
"copilot": {
"url": "https://api.enterprise.githubcopilot.com",
"integrationId": "copilot-developer-cli",
"token": "******"
}
},
"github": {
"repo": {
"name": "temp-repo",
"commit": "temp-commit",
"readWrite": false
}
}
}
2025-11-13T22:42:17.821Z [END-GROUP]
2025-11-13T22:42:17.822Z [DEBUG] Using Copilot API at https://api.enterprise.githubcopilot.com with integration ID copilot-developer-cli
2025-11-13T22:42:17.822Z [DEBUG] Using GitHub OAuth token for Copilot API
2025-11-13T22:42:17.822Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.353 (win32 v24.3.0) OpenAI/5.20.1
2025-11-13T22:42:17.823Z [DEBUG] str_replace_editor: default options: {
"truncateBasedOn": "tokenCount",
"truncateStyle": "middle"
}
2025-11-13T22:42:17.824Z [DEBUG] Loading tools for client: github-mcp-server
2025-11-13T22:42:17.921Z [DEBUG] Successfully listed 29 models
2025-11-13T22:42:17.921Z [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": {
"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,
"vendor": "Anthropic",
"version": "claude-sonnet-4.5"
}
2025-11-13T22:42:18.171Z [DEBUG] Skipping tool download_workflow_run_artifact for client github-mcp-server
2025-11-13T22:42:18.171Z [DEBUG] Skipping tool get_code_scanning_alert for client github-mcp-server
2025-11-13T22:42:18.171Z [DEBUG] Adding tool: github-mcp-server-get_commit
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-get_file_contents
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-get_job_logs
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_label for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_latest_release for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_release_by_tag for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_secret_scanning_alert for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_tag for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-get_workflow_run
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-get_workflow_run_logs
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool get_workflow_run_usage for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool issue_read for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_branches
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_code_scanning_alerts for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_commits
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_issue_types for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_issues
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_pull_requests
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_releases for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_secret_scanning_alerts for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_tags for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_workflow_jobs for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Skipping tool list_workflow_run_artifacts for client github-mcp-server
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_workflow_runs
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-list_workflows
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-pull_request_read
2025-11-13T22:42:18.172Z [DEBUG] Adding tool: github-mcp-server-search_code
2025-11-13T22:42:18.173Z [DEBUG] Adding tool: github-mcp-server-search_issues
2025-11-13T22:42:18.173Z [DEBUG] Adding tool: github-mcp-server-search_pull_requests
2025-11-13T22:42:18.173Z [DEBUG] Adding tool: github-mcp-server-search_repositories
2025-11-13T22:42:18.173Z [DEBUG] Adding tool: github-mcp-server-search_users
2025-11-13T22:42:18.173Z [DEBUG] Adding tool: github-mcp-server-web_search
2025-11-13T22:42:18.185Z [START-GROUP] Completion request configuration:
2025-11-13T22:42:18.185Z [DEBUG] Client options:
2025-11-13T22:42:18.185Z [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": {}
}
2025-11-13T22:42:18.185Z [DEBUG] Request options:
2025-11-13T22:42:18.185Z [DEBUG] {
"stream": true,
"failIfInitialInputsTooLong": false,
"processors": {
"preRequest": [
"BasicTruncator",
"VisionEnabledProcessor",
"{\"type\":\"InitiatorHeaderProcessor\"}"
],
"onRequestError": [
"BasicTruncator"
],
"onStreamingChunk": [
"StreamingChunkDisplay",
"ReportIntentExtractor"
]
},
"executeToolsInParallel": true,
"abortSignal": {}
}
2025-11-13T22:42:18.185Z [DEBUG] Tools:
2025-11-13T22:42:18.188Z [DEBUG] [
{
"type": "function",
"function": {
"name": "powershell",
"description": "Runs a PowerShell command in an interactive PowerShell session.\n * When invoking this tool, the contents of the \"command\" parameter does NOT need to be XML-escaped.\n* You don't have access to the internet via this tool.\n* You can run Python, Node.js and Go code with the `python`, `node` and `go` commands.\n* Each sessionId identifies a persistent PowerShell session. State is saved across command calls and discussions with the user.\n* `timeout` parameter must be greater than the default timeout of 30 seconds and less than 600 seconds}. Give long-running commands enough time to complete.\n* If the command does not complete within \"timeout\" seconds, the tool will return a status indicating that it is still running asynchronously. You can then use `read_powershell` or `stop_powershell`.\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\"."
},
"timeout": {
"type": "integer",
"description": "(Optional) Maximum time in seconds to wait for the command to complete when mode is \"sync\". Default is 30 seconds if not provided."
},
"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."
},
"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",
"sessionId",
"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."
},
"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": "view",
"description": "Tool for viewing files and directories.\n * If `path` is a file, `view` displays the result of applying `cat -n` with line numbers, like \"1.\".\n * If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep\n * Path *must* be absolute\n ",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Absolute path to file or directory.",
"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\n ",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Absolute path to file to create.",
"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\n ",
"parameters": {
"type": "object",
"properties": {
"path": {
"description": "Absolute path to file 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": "\n Use this tool to update the current intent of the session. This is displayed in the user\n interface and is important to help the user understand what you're doing.\n Rules:\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\n When 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\n just have said \"Installing Pandas\")\n - ❌ \"Running transformation script\" → \"Running with python3\" (same goal, fallback attempt)\n Phrasing 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'\n ",
"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": "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-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"
]
}
},
"copilot_cache_control": {
"type": "ephemeral"
}
}
]
2025-11-13T22:42:18.188Z [END-GROUP]
2025-11-13T22:42:18.716Z [DEBUG] InitiatorHeaderProcessor: Setting X-Initiator to 'user'
2025-11-13T22:42:18.716Z [START-GROUP] Sending request to the AI model
2025-11-13T22:42:20.247Z [INFO] [log_5d72fb, x-request-id: "00000-5943bb0a-38cb-461b-9f01-f76043cb8f88"] post https://api.enterprise.githubcopilot.com/chat/completions succeeded with status 200 in 1527ms
2025-11-13T22:42:24.725Z [DEBUG] response (Request-ID 00000-5943bb0a-38cb-461b-9f01-f76043cb8f88):
2025-11-13T22:42:24.725Z [DEBUG] data:
2025-11-13T22:42:24.726Z [DEBUG] {
"usage": {
"completion_tokens": 290,
"prompt_tokens": 12056,
"prompt_tokens_details": {
"cached_tokens": 8033
},
"total_tokens": 12346
},
"id": "msg_vrtx_01SjCuPArrcthCY7QRmVzBfu",
"choices": [
{
"index": 0,
"finish_reason": "tool_calls",
"logprobs": null,
"message": {
"role": "assistant",
"content": "I'll create a PowerShell script to count instances of the word 'the' in files at the root of the repo, execute it, and then clean it up.",
"refusal": null,
"tool_calls": [
{
"id": "toolu_vrtx_01Fv2SSTAb89x4aE1naEYxU5",
"type": "function",
"function": {
"name": "report_intent",
"arguments": "{\"intent\": \"Counting word occurrences\"}"
}
},
{
"id": "toolu_vrtx_01RSXdtuVJVhBQd9fb9ByNAB",
"type": "function",
"function": {
"name": "create",
"arguments": "{\"path\": \"C:\\\\Users\\\\ryanheaney\\\\OneDrive - Microsoft\\\\Documents\\\\CopilotToolFilterRepro\\\\count-the.ps1\", \"file_text\": \"$count = 0\\nGet-ChildItem -Path . -File | ForEach-Object {\\n $content = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue\\n if ($content) {\\n $matches = [regex]::Matches($content, '\\\\bthe\\\\b', 'IgnoreCase')\\n $count += $matches.Count\\n }\\n}\\nWrite-Host \\\"Total instances of 'the': $count\\\"\\n\"}"
}
}
],
"parsed": null
}
}
],
"created": 1763073744,
"model": "claude-sonnet-4.5",
"object": "chat.completion"
}
2025-11-13T22:42:24.726Z [END-GROUP]
2025-11-13T22:42:24.726Z [DEBUG] Tool calls count: 2
2025-11-13T22:42:24.727Z [DEBUG] Running tool calls in parallel
2025-11-13T22:42:24.727Z [DEBUG] Adding operation to queue. Current queue length: 0
2025-11-13T22:42:24.727Z [DEBUG] Processing operation. Remaining queue length: 0
2025-11-13T22:42:24.727Z [DEBUG] create: C:\Users\ryanheaney\OneDrive - Microsoft\Documents\CopilotToolFilterRepro\count-the.ps1
2025-11-13T22:42:24.734Z [DEBUG] Operation completed. Remaining queue length: 0
2025-11-13T22:42:24.781Z [DEBUG] InitiatorHeaderProcessor: Setting X-Initiator to 'agent'
2025-11-13T22:42:24.781Z [START-GROUP] Sending request to the AI model
2025-11-13T22:42:28.163Z [INFO] [log_b3ecaf, x-request-id: "00000-5fdc12fb-6745-45ef-9745-7af80f59312c"] post https://api.enterprise.githubcopilot.com/chat/completions succeeded with status 200 in 3380ms
2025-11-13T22:42:29.157Z [DEBUG] response (Request-ID 00000-5fdc12fb-6745-45ef-9745-7af80f59312c):
2025-11-13T22:42:29.157Z [DEBUG] data:
2025-11-13T22:42:29.157Z [DEBUG] {
"usage": {
"completion_tokens": 117,
"prompt_tokens": 12449,
"prompt_tokens_details": {
"cached_tokens": 11627
},
"total_tokens": 12566
},
"id": "msg_vrtx_01VkH1FvuN98u8vEAoeFKhDH",
"choices": [
{
"index": 0,
"finish_reason": "tool_calls",
"logprobs": null,
"message": {
"role": "assistant",
"content": null,
"refusal": null,
"tool_calls": [
{
"id": "toolu_vrtx_01VSdFVooLKzMM673ZEzB39C",
"type": "function",
"function": {
"name": "powershell",
"arguments": "{\"sessionId\": \"count-session\", \"command\": \".\\\\count-the.ps1\", \"description\": \"Execute the word counting script\", \"mode\": \"sync\"}"
}
}
],
"parsed": null
}
}
],
"created": 1763073749,
"model": "claude-sonnet-4.5",
"object": "chat.completion"
}
2025-11-13T22:42:29.157Z [END-GROUP]
2025-11-13T22:42:29.157Z [DEBUG] Tool calls count: 1
2025-11-13T22:42:29.157Z [DEBUG] Running tool calls in parallel
2025-11-13T22:42:30.535Z [DEBUG] InitiatorHeaderProcessor: Setting X-Initiator to 'agent'
2025-11-13T22:42:30.535Z [START-GROUP] Sending request to the AI model
2025-11-13T22:42:31.749Z [INFO] [log_b2a574, x-request-id: "00000-98853333-93d7-42e8-9fc8-25917a277f0a"] post https://api.enterprise.githubcopilot.com/chat/completions succeeded with status 200 in 1213ms
2025-11-13T22:42:32.647Z [DEBUG] response (Request-ID 00000-98853333-93d7-42e8-9fc8-25917a277f0a):
2025-11-13T22:42:32.647Z [DEBUG] data:
2025-11-13T22:42:32.647Z [DEBUG] {
"usage": {
"completion_tokens": 121,
"prompt_tokens": 12596,
"prompt_tokens_details": {
"cached_tokens": 12441
},
"total_tokens": 12717
},
"id": "msg_vrtx_01R8TtpYqUk9BkN4ADFgAr9u",
"choices": [
{
"index": 0,
"finish_reason": "tool_calls",
"logprobs": null,
"message": {
"role": "assistant",
"content": null,
"refusal": null,
"tool_calls": [
{
"id": "toolu_vrtx_01NbDHYqCFUt9zGC9ti2B6hm",
"type": "function",
"function": {
"name": "powershell",
"arguments": "{\"command\": \"Remove-Item .\\\\count-the.ps1\", \"description\": \"Clean up the script file\", \"mode\": \"sync\", \"sessionId\": \"cleanup-session\"}"
}
}
],
"parsed": null
}
}
],
"created": 1763073752,
"model": "claude-sonnet-4.5",
"object": "chat.completion"
}
2025-11-13T22:42:32.647Z [END-GROUP]
2025-11-13T22:42:32.648Z [DEBUG] Tool calls count: 1
2025-11-13T22:42:32.648Z [DEBUG] Running tool calls in parallel
2025-11-13T22:42:33.752Z [DEBUG] InitiatorHeaderProcessor: Setting X-Initiator to 'agent'
2025-11-13T22:42:33.752Z [START-GROUP] Sending request to the AI model
2025-11-13T22:42:34.922Z [INFO] [log_13e3c4, x-request-id: "00000-98bf8dd5-19da-4c0e-8ad8-2647b9d72121"] post https://api.enterprise.githubcopilot.com/chat/completions succeeded with status 200 in 1169ms
2025-11-13T22:42:35.863Z [DEBUG] response (Request-ID 00000-98bf8dd5-19da-4c0e-8ad8-2647b9d72121):