Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove the default list of tools for github (remote/local) as they are not needed |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit 28dd843. Removed the automatic addition of default GitHub tools list. The MCP config now uses This reduces compiled workflow file size by ~7KB each and simplifies the configuration. Explicit |
|
@copilot update dev.md to use copilot, go through each tool of the github mcp and try to invoke it with sensible arguments, check that the tools are configured property (they might fail because of args but at least they got called). Fail on permission issues. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit. When no The logic handles three cases:
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated dev.md in commit. The workflow now:
The compiled workflow includes |
.github/workflows/dev.md
Outdated
| 1. `get_me` - Get information about the authenticated user | ||
|
|
||
| ### Repository Tools | ||
| 2. `get_file_contents` - Get contents of README.md or another file from the repo | ||
| 3. `list_branches` - List branches in the repository | ||
| 4. `list_commits` - List recent commits on the main branch | ||
| 5. `list_tags` - List tags in the repository | ||
| 6. `search_repositories` - Search for repositories related to "github actions" | ||
|
|
||
| ### Issues Tools | ||
| 7. `list_issues` - List recent issues in the repository (state: all, per_page: 5) | ||
| 8. `search_issues` - Search for issues with a keyword | ||
|
|
||
| ### Pull Request Tools | ||
| 9. `list_pull_requests` - List recent pull requests (state: all, per_page: 5) | ||
| 10. `search_pull_requests` - Search for pull requests | ||
|
|
||
| ### Actions Tools | ||
| 11. `list_workflows` - List GitHub Actions workflows in the repository | ||
| 12. `list_workflow_runs` - List recent workflow runs (per_page: 5) | ||
|
|
||
| ### Release Tools | ||
| 13. `list_releases` - List releases in the repository (per_page: 5) |
There was a problem hiding this comment.
@copilot tell the LLM to explore all available tools that belong to github
There was a problem hiding this comment.
Updated in commit. The workflow now instructs the LLM to dynamically discover and test all available tools from the GitHub MCP server, rather than testing a fixed list. This makes the test more comprehensive and adaptable to changes in available tools.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Agentic Changeset Generator triggered by this pull request. |
Overview
Updates the GitHub MCP server configuration to use more secure and appropriate defaults:
read-only: trueby default (prevents accidental write operations)toolset: [default]by default (provides recommended tools for common use cases)["*"]wildcard for tools instead of maintaining long explicit lists--allow-tool githubwhen no tools are specifiedMotivation
Previously, the GitHub MCP server defaulted to:
read-only: false- allowing write operations by default (security concern)toolset: all- enabling all toolsets when none were specified (often unnecessary)allowedlist, creating verbose configurations--allow-tool githubwhen noallowedfield was present, preventing access to GitHub MCP serverThese defaults could lead to workflows accidentally modifying repository data or including unnecessary API permissions. The new defaults provide a more secure baseline while still allowing users to explicitly opt into write operations and additional toolsets when needed.
Changes
Core Logic
getGitHubReadOnly()to returntrueby default (wasfalse)getGitHubToolsets()to return"default"by default (was empty string →"all")["*"]wildcard instead--allow-tool githubto Copilot CLI when noallowedfield is specifiedTools Configuration Simplification
Before (no configuration specified):
Generated:
Copilot CLI: No
--allow-tool githubargument (broken)After (no configuration specified):
Generated:
Copilot CLI:
--allow-tool github(allows access to GitHub MCP server)This change reduces compiled workflow file size by ~7KB each and simplifies the configuration.
Copilot CLI Tool Arguments
When no
allowedfield is specified, Copilot CLI now automatically includes--allow-tool githubto grant access to the GitHub MCP server:allowedfield:--allow-tool github(allow all GitHub tools via MCP)allowed: ["*"]:--allow-tool github(explicit wildcard)allowed: [tool1, tool2]:--allow-tool github(tool1)--allow-tool github(tool2)(specific tools)allowed: []: No arguments (no GitHub tools allowed)Dev Workflow Testing
Updated
.github/workflows/dev.mdto validate the GitHub MCP configuration:get_me)get_file_contents,list_branches,list_commits,search_repositories)list_issues,search_issues)list_pull_requests,search_pull_requests)list_workflows,list_workflow_runs)list_releases)This approach makes the test workflow more flexible and future-proof, automatically adapting to changes in the GitHub MCP server's available tools.
Examples
Before (no configuration specified):
Generated:
GITHUB_TOOLSETS=all(no read-only protection), plus 50+ tool names, no Copilot CLI argumentsAfter (no configuration specified):
Generated:
GITHUB_READ_ONLY=1,GITHUB_TOOLSETS=default,"tools": ["*"],--allow-tool githubExplicit override (still works):
Backward Compatibility
This is a breaking change for workflows that relied on the implicit
read-only: falseortoolset: alldefaults. Users who need write access or all toolsets must now explicitly specify:Explicit
allowedtool lists are still preserved when specified. Only the automatic addition of default tools has been removed.This trade-off prioritizes security, simplicity, and better defaults over implicit backward compatibility.
Testing
read-only: falseoverrideallowedtool lists (still preserved)--allow-tool githubis correctly added when noallowedfield is presentMigration Guide
Workflows that need write access should add:
Workflows that need all toolsets should add:
Workflows that previously relied on the automatic default tools list and need to restrict tools should add:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.