Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Copilot CLI now provides a builtin web_fetch tool, but gh-aw was treating it as an external tool and attempting to configure an MCP server for it.

Changes

  • copilot_engine.go: Set supportsWebFetch: true to indicate native support
  • copilot_engine_tools.go: Add explicit tool name mapping from web-fetch to web_fetch and generate --allow-tool web_fetch argument
  • fetch_test.go: Update test expectations for Copilot's web-fetch support
  • fetch_integration_test.go: Add integration test verifying no MCP server is added for Copilot
  • smoke-copilot.md: Add web-fetch tool to smoke test workflow with test requirement to validate the builtin web_fetch tool

Tool 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-facing web-fetch tool name to Copilot CLI's web_fetch, following the same pattern used for other tools:

  • bashshell
  • editwrite
  • web-fetchweb_fetch

Behavior

Copilot workflows using web-fetch now generate an explicit --allow-tool web_fetch argument and use the builtin tool without MCP server configuration:

tools:
  web-fetch: {}
# Generates: --allow-tool web_fetch
# No [mcp_servers."web-fetch"] section in compiled output

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

Copilot now support a builtin "web fetch" tool. Update copilot agentic engine configuration to support this tool and make sure it does not raise a warning anymore.

Built in web_fetch tool for fetching web content

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

- 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 AI changed the title [WIP] Update copilot agentic engine configuration for web fetch tool Add builtin web_fetch tool support to Copilot engine Jan 4, 2026
Copilot AI requested a review from pelikhan January 4, 2026 04:19
@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@copilot make sure to allow the web_fetch tool when creating the copilot args

Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot Check tool name at https://github.com/github/copilot-cli/blob/main/changelog.md?plain=1#L7

I verified the Copilot CLI changelog shows the builtin tool is named web_fetch (with underscore).

In gh-aw, the user-facing tool name is web-fetch (with hyphen) to maintain consistency across the codebase. Similar to how bash in workflows maps to shell in Copilot CLI, I'm treating web-fetch as the gh-aw abstraction that corresponds to Copilot CLI's web_fetch builtin tool.

By adding web-fetch to the builtInTools map, the implementation:

  1. Prevents MCP server creation for web-fetch in Copilot workflows
  2. Does not generate an --allow-tool argument (assuming builtin tools are automatically available)

Should I add an explicit --allow-tool web_fetch argument for Copilot workflows that use web-fetch, or is the current implementation correct if builtin tools don't need explicit permission?

@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@copilot

Should I add an explicit --allow-tool web_fetch argument for Copilot workflows that use web-fetch,

Yes

@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@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>
Copilot AI changed the title Add builtin web_fetch tool support to Copilot engine Add builtin web_fetch tool support to Copilot engine with correct tool name mapping Jan 4, 2026
Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot make sure to allow the web_fetch tool when creating the copilot args

Done in commit a36da76. The code now generates --allow-tool web_fetch for Copilot workflows using web-fetch.

@copilot add an explicit --allow-tool web_fetch argument for Copilot workflows that use web-fetch

Implemented in commit a36da76. Copilot workflows with web-fetch now include --allow-tool web_fetch in the compiled output.

@pelikhan pelikhan marked this pull request as ready for review January 4, 2026 04:42
@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@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>
Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@copilot add web fetch tool to smoke-copilot.md

Added web-fetch tool to smoke-copilot.md in commit 203eee4. The workflow now includes:

@pelikhan
Copy link
Contributor

pelikhan commented Jan 4, 2026

@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

Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

@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:

  1. Domain in defaults set: The test fetches from api.github.com which is in CopilotDefaultDomains (line 24 of domains.go)

  2. web_fetch tool allowed: The compiled workflow uses --allow-all-tools (because bash has wildcard "*"), which includes web_fetch. When tested without the bash wildcard, it correctly generates --allow-tool web_fetch.

The current implementation is working correctly.

@pelikhan pelikhan merged commit 13931f3 into main Jan 4, 2026
4 of 5 checks passed
@pelikhan pelikhan deleted the copilot/update-agentic-engine-configuration branch January 4, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants