Skip to content

[plan] Fix tool wildcard filtering in MCP gateway (tools: ["*"] keeps 0 tools) #25497

Description

@github-actions

Objective

Fix the MCP gateway so that tools: ["*"] is treated as a wildcard (allow all tools) rather than a literal tool name match, which currently results in 0 tools being retained.

Context

Reported in issue #25494. When gh-aw v0.67.3 compiles a workflow with a tool configuration that results in tools: ["*"] being passed to the MCP gateway v0.2.16, the gateway incorrectly filters all tools out:

[allowed-tools] Filtered 6 tools from elastic-docs: keeping 0 of 6

The v0.2.16 release notes state that ["*"] should allow all tools, but the wildcard appears to be treated as a literal string "*" rather than a glob/wildcard pattern.

This is likely one of the root causes of the silent Copilot CLI exit code 1 regression introduced in v0.67.3.

Investigation Steps

  1. Locate the MCP gateway allowed-tools filtering logic (search for allowed-tools or Filtered N tools in the gateway source or action scripts under actions/)
  2. Find where the tools list from frontmatter is passed to the gateway binary/container
  3. Identify how the ["*"] value is serialized and passed (check pkg/workflow/ and actions/setup/)
  4. Determine whether:
    • The gateway itself has a bug in wildcard handling (need to report upstream or pin to a fixed version)
    • OR the compiled lock file is passing ["*"] as a literal string where the gateway expects a different sentinel value (e.g., omitting the field, passing null, or passing an empty list)

Likely Fix Areas

  • pkg/workflow/ — compiler logic that emits tool lists into the lock file
  • actions/setup/js/*.cjs or actions/setup/sh/*.sh — scripts that pass tool config to the gateway
  • Gateway version pinning — may need to pin to a version before v0.2.16 or wait for a gateway fix

Acceptance Criteria

  • Root cause of ["*"] wildcard being treated as literal is identified
  • Fix is implemented (either in the compiler output, the setup scripts, or by pinning a working gateway version)
  • A workflow with tools: bash: true (or any tool) compiled with the fix correctly allows all configured tools through the gateway
  • No regression: tool allowlisting (e.g., restricting to specific tools) still works correctly
  • Unit or integration test added to prevent regression

References

Generated by Plan Command for issue #25494 · ● 171.2K ·

  • expires on Apr 11, 2026, 2:47 PM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions