-
Notifications
You must be signed in to change notification settings - Fork 36
Add builtin web_fetch tool support to Copilot engine with correct tool name mapping #8833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Set supportsWebFetch to true in CopilotEngine - Add web-fetch to builtInTools map to prevent MCP server creation - Update test expectations for Copilot engine web-fetch support - Add integration test for Copilot with web-fetch This change ensures that when using Copilot engine with web-fetch tool, it uses the builtin web_fetch functionality instead of adding an MCP server, eliminating the warning about the builtin tool. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot make sure to allow the |
I verified the Copilot CLI changelog shows the builtin tool is named In gh-aw, the user-facing tool name is By adding
Should I add an explicit |
Yes |
|
@copilot add an explicit --allow-tool web_fetch argument for Copilot workflows that use web-fetch |
The Copilot CLI builtin tool is named `web_fetch` (with underscore), not `web-fetch` (with hyphen). This commit adds explicit handling to map from the user-facing `web-fetch` tool name to Copilot CLI's `web_fetch`. Changes: - Add explicit --allow-tool web_fetch argument for workflows using web-fetch - Remove web-fetch from builtInTools map (needs explicit permission) - Update comment to clarify the tool name mapping This ensures Copilot workflows can use the builtin web_fetch tool without attempting to configure an MCP server. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit a36da76. The code now generates
Implemented in commit a36da76. Copilot workflows with web-fetch now include |
|
@copilot add web fetch tool to smoke-copilot.md |
- Add web-fetch tool to the tools configuration - Add Web Fetch Testing requirement to test the web_fetch builtin tool - Test fetches content from GitHub API to verify tool availability Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added web-fetch tool to smoke-copilot.md in commit 203eee4. The workflow now includes:
|
|
@copilot smoke-copilot must fetch from a domain that is part of the defaults domain set. Also check that generate copilot args allow the web_fetch tool |
Verified both requirements are met:
The current implementation is working correctly. |
Copilot CLI now provides a builtin
web_fetchtool, but gh-aw was treating it as an external tool and attempting to configure an MCP server for it.Changes
copilot_engine.go: SetsupportsWebFetch: trueto indicate native supportcopilot_engine_tools.go: Add explicit tool name mapping fromweb-fetchtoweb_fetchand generate--allow-tool web_fetchargumentfetch_test.go: Update test expectations for Copilot's web-fetch supportfetch_integration_test.go: Add integration test verifying no MCP server is added for Copilotsmoke-copilot.md: Add web-fetch tool to smoke test workflow with test requirement to validate the builtin web_fetch toolTool Name Mapping
The Copilot CLI builtin tool is named
web_fetch(with underscore) as documented in the Copilot CLI changelog. The implementation maps from gh-aw's user-facingweb-fetchtool name to Copilot CLI'sweb_fetch, following the same pattern used for other tools:bash→shelledit→writeweb-fetch→web_fetchBehavior
Copilot workflows using
web-fetchnow generate an explicit--allow-tool web_fetchargument and use the builtin tool without MCP server configuration:Other engines (Codex, Custom) continue to add the MCP server when web-fetch is requested since they lack native support.
Testing
The smoke-copilot.md workflow now includes a test requirement to verify the web_fetch tool works by fetching content from the GitHub API.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.