Fix dispatch_workflow tool registration in Safe Outputs MCP HTTP server#13179
Fix dispatch_workflow tool registration in Safe Outputs MCP HTTP server#13179
Conversation
The HTTP server was using a custom tool registration loop that didn't handle dispatch_workflow tools with _workflow_name metadata. Regular tools are matched by name to config keys, but dispatch_workflow tools use workflow-specific names (e.g., "test_workflow") while the config key is "dispatch_workflow". Added special handling for tools with _workflow_name metadata to check if dispatch_workflow exists in config instead of looking for the workflow-specific tool name in config keys. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Test validates that dispatch_workflow tools with _workflow_name metadata are correctly registered when config.dispatch_workflow exists, and that regular tools continue to work as expected. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🔍 PR Triage ResultsCategory: bug | Risk: high | Priority: 72/100 Scores Breakdown
📋 Recommended Action: fast-trackCritical bug fix - The HTTP server wasn't detecting dispatch_workflow tools because it checked for tool names in config keys, but dispatch_workflow uses workflow-specific tool names. This fix adds detection via Priority review needed to unblock safe outputs dispatch functionality. Triaged by PR Triage Agent on 2026-02-02
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
Agent Container Tool Check
Result: 10/12 tools available Missing Tools:
Status: PARTIAL - Core development tools (bash, git, node, python, go) are available. Java and .NET runtimes are missing but may not be required for typical workflows.
|
Smoke Test Complete ✅
Status: PASS @pelikhan
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Smoke test (Codex) summary:
|
Problem
The Safe Outputs MCP HTTP server failed to register
dispatch_workflowtools, preventing workflow dispatch invocations via the Copilot agent. Gateway logs showed only 3 tools registered from safeoutputs (missing_tool, noop, missing_data) despitetest_workflowbeing present in tools.json.Root Cause
dispatch_workflow tools use workflow-specific names with
_workflow_namemetadata:But config uses a single
dispatch_workflowkey:The HTTP server's registration loop checked if
tool.nameexisted in config keys (enabledTools.has("test_workflow")), which failed because only"dispatch_workflow"was in the set.The stdio server already handled this correctly via
registerPredefinedTools(), but the HTTP server had reimplemented registration without this logic.Changes
actions/setup/js/safe_outputs_mcp_server_http.cjsAdded dispatch_workflow tool detection before the config key check:
actions/setup/js/safe_outputs_mcp_server_http_dispatch.test.cjs(new)Tests validate:
config.dispatch_workflowexistsImpact
Fixes dispatch_workflow safe outputs for Copilot engine workflows using MCP gateway HTTP transport. Stdio transport workflows were unaffected.
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/githubnext/gh-aw/actions/artifacts/5336556283/zip/usr/bin/curl curl -L -H Accept: application/vnd.github+json -H Authorization: ****** X-GitHub-Api-Version: 2022-11-28 REDACTED -o agent-artifacts.zip(http block)https://api.github.com/repos/githubnext/gh-aw/actions/runs/21572314506/logs/usr/bin/curl curl -L -H Accept: application/vnd.github+json -H Authorization: ****** X-GitHub-Api-Version: 2022-11-28 REDACTED -o workflow-logs.zip(http block)If you need me to access, download, or install something from one of these locations, you can either:
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.
Changeset
_workflow_namemetadata whendispatch_workflowis configured.