Skip to content

Add missing remove_labels tool definition to safe-outputs MCP server#11450

Merged
pelikhan merged 2 commits intocopilot/review-remove-label-safe-outputfrom
copilot/remove-smoke-label-issue
Jan 23, 2026
Merged

Add missing remove_labels tool definition to safe-outputs MCP server#11450
pelikhan merged 2 commits intocopilot/review-remove-label-safe-outputfrom
copilot/remove-smoke-label-issue

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

The smoke-copilot workflow was configured to remove the "smoke" label but the agent never called remove_labels because the tool definition was missing from the MCP server's tool catalog.

Root Cause

Complete handler implementation existed but MCP tool definition was missing:

✓ Workflow config defines remove-labels safe output
✓ JavaScript handler: remove_labels.cjs
✓ Handler registration: safe_output_handler_manager.cjs  
✗ MCP tool definition: safe_outputs_tools.json  ← Missing

Changes

Added remove_labels tool definition to pkg/workflow/js/safe_outputs_tools.json:

{
  "name": "remove_labels",
  "description": "Remove labels from an existing GitHub issue or pull request...",
  "inputSchema": {
    "type": "object",
    "properties": {
      "labels": {
        "type": "array",
        "items": {"type": "string"},
        "description": "Label names to remove (e.g., ['smoke', 'needs-triage'])"
      },
      "item_number": {
        "type": "number",
        "description": "Issue or PR number. If omitted, targets triggering item."
      }
    },
    "required": ["labels"]
  }
}

The tool is now exposed to agents and will appear in the available tools list alongside add_labels, add_comment, etc.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/oraios/serena/commits/HEAD
    • Triggering command: /home/REDACTED/.local/bin/uv /home/REDACTED/.local/bin/uv tool uvx --from git+REDACTED serena start-mcp-server --context codex --project ${GITHUB_WORKSPACE} ortcfg env g/envutil/envutiGOINSECURE g/envutil/envutiGOMOD 64/bin/go GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xGO111MODULE (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21273041218/job/61227244987#step:6:1

smoke copilot should request to remove label "smoke" . Investigate why it did not happen

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate failure to remove smoke label Add missing remove_labels tool definition to safe-outputs MCP server Jan 23, 2026
Copilot AI requested a review from pelikhan January 23, 2026 05:47
@pelikhan pelikhan marked this pull request as ready for review January 23, 2026 05:48
@pelikhan pelikhan merged commit c2e51df into copilot/review-remove-label-safe-output Jan 23, 2026
@pelikhan pelikhan deleted the copilot/remove-smoke-label-issue branch January 23, 2026 05:48
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