Separate default GitHub tools lists for local and remote modes#1828
Merged
Separate default GitHub tools lists for local and remote modes#1828
Conversation
- Created DefaultGitHubToolsLocal constant for Docker-based servers - Created DefaultGitHubToolsRemote constant for hosted servers - Kept DefaultGitHubTools for backward compatibility (points to local) - Updated compiler.go to use mode-specific constants - Updated claude_engine.go to use mode-specific constants - All tests passing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added TestGitHubToolsModeSeparation to verify constants exist - Added TestApplyDefaultToolsUsesCorrectMode to verify mode-based selection - All unit tests passing - Build successful - Workflows recompiled successfully Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
pelikhan
approved these changes
Oct 16, 2025
pelikhan
approved these changes
Oct 16, 2025
Contributor
|
Agentic Changeset Generator triggered by this pull request. |
Copilot
AI
changed the title
[WIP] Separate default list of GitHub tools for local and remote servers
Separate default GitHub tools lists for local and remote modes
Oct 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR separates the default GitHub MCP tools lists for local (Docker-based) and remote (hosted) server modes, allowing for different tool sets between the two deployment types.
Problem
Previously, a single
DefaultGitHubToolsconstant was used for both local (Docker) and remote (hosted) GitHub MCP servers. This prevented customization of tool sets based on the deployment mode, even though the two modes may have different capabilities or requirements.Solution
Created separate constants for each mode:
DefaultGitHubToolsLocal- Default tools for Docker-based GitHub MCP serversDefaultGitHubToolsRemote- Default tools for hosted GitHub MCP servers athttps://api.githubcopilot.com/mcp/DefaultGitHubTools- Deprecated, now points toDefaultGitHubToolsLocalfor backward compatibilityThe compiler and engines now detect the mode from the workflow configuration and use the appropriate tool list:
Implementation Details
Changes to
pkg/constants/constants.goDefaultGitHubToolsLocalwith 67 default read-only GitHub toolsDefaultGitHubToolsRemotewith 67 default read-only GitHub toolsDefaultGitHubToolsto aliasDefaultGitHubToolsLocalfor backward compatibilityChanges to
pkg/workflow/compiler.goModified
applyDefaultTools()to:getGitHubType(githubTool)DefaultGitHubToolsRemotefor remote mode,DefaultGitHubToolsLocalotherwiseChanges to
pkg/workflow/claude_engine.goModified
computeAllowedClaudeToolsString()to:getGitHubType(mcpConfig)when processing GitHub toolsTests
Added
pkg/workflow/github_tools_mode_test.gowith comprehensive tests:DefaultGitHubToolsapplyDefaultTools()Current Behavior
Both lists currently contain the same 67 tools, maintaining existing behavior while providing the infrastructure to easily differentiate them when requirements are identified.
Validation
make agent-finishBackward Compatibility
All existing code continues to work without modification:
DefaultGitHubToolsstill exists and points to local mode toolsFixes #[issue-number]
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.