Problem
engine.mcp.tool-timeout is documented and validated as a Go duration string in gh-aw workflow frontmatter, for example:
engine:
id: copilot
mcp:
tool-timeout: "5m"
However, the generated MCP gateway config currently passes that value through as a JSON string:
{
"gateway": {
"port": "${MCP_GATEWAY_PORT}",
"domain": "${MCP_GATEWAY_DOMAIN}",
"apiKey": "${MCP_GATEWAY_API_KEY}",
"payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}",
"toolTimeout": "5m"
}
}
The MCP gateway schema for gateway.toolTimeout expects integer seconds, not a duration string:
"toolTimeout": {
"type": "integer",
"description": "Tool invocation timeout in seconds. The gateway enforces this timeout for individual tool/method calls to MCP servers.",
"minimum": 10,
"default": 60
}
As a result, a workflow that uses the documented engine.mcp.tool-timeout shape can compile successfully but fail at runtime when the MCP gateway starts:
Location: /gateway/toolTimeout
Error: expected integer, but got string
Why this is separate from #30634
This is related to #30634, but appears to be a remaining, separate compatibility issue.
#30634 / #30686 addresses propagation of engine.mcp.tool-timeout from imported shared workflows into consumers. That improves where the timeout value can come from, but the propagated value is still a duration string such as "5m". Unless the compiler converts that value before writing the gateway JSON, or the gateway accepts duration strings, the imported value can still produce an invalid MCP gateway config.
Expected behavior
A workflow author should be able to use the documented setting:
engine:
id: copilot
mcp:
tool-timeout: "5m"
and get a runtime-valid gateway config, for example:
Alternatively, the MCP gateway could accept Go duration strings for gateway.toolTimeout, but the compiler and gateway schema/runtime need to agree on the contract.
Actual behavior
The compiler emits:
and the gateway rejects it because gateway.toolTimeout is an integer field.
Suggested fixes
Any of these would resolve the mismatch:
- Convert
engine.mcp.tool-timeout duration strings to integer seconds when rendering gateway.toolTimeout.
- Change the MCP gateway schema/runtime to accept Go duration strings for
gateway.toolTimeout.
- Derive gateway
toolTimeout from the effective tools.timeout value as integer seconds, while keeping engine.mcp.tool-timeout as an explicit override with clear conversion semantics.
Notes
MCP_GATEWAY_TOOL_TIMEOUT=300 works as a lower-level workaround because the gateway already parses that environment variable as integer seconds. But workflow authors are encouraged to use the frontmatter setting, so the documented engine.mcp.tool-timeout path should produce gateway-valid config without needing the env-var workaround.
Problem
engine.mcp.tool-timeoutis documented and validated as a Go duration string in gh-aw workflow frontmatter, for example:However, the generated MCP gateway config currently passes that value through as a JSON string:
{ "gateway": { "port": "${MCP_GATEWAY_PORT}", "domain": "${MCP_GATEWAY_DOMAIN}", "apiKey": "${MCP_GATEWAY_API_KEY}", "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}", "toolTimeout": "5m" } }The MCP gateway schema for
gateway.toolTimeoutexpects integer seconds, not a duration string:As a result, a workflow that uses the documented
engine.mcp.tool-timeoutshape can compile successfully but fail at runtime when the MCP gateway starts:Why this is separate from #30634
This is related to #30634, but appears to be a remaining, separate compatibility issue.
#30634 / #30686 addresses propagation of
engine.mcp.tool-timeoutfrom imported shared workflows into consumers. That improves where the timeout value can come from, but the propagated value is still a duration string such as"5m". Unless the compiler converts that value before writing the gateway JSON, or the gateway accepts duration strings, the imported value can still produce an invalid MCP gateway config.Expected behavior
A workflow author should be able to use the documented setting:
and get a runtime-valid gateway config, for example:
Alternatively, the MCP gateway could accept Go duration strings for
gateway.toolTimeout, but the compiler and gateway schema/runtime need to agree on the contract.Actual behavior
The compiler emits:
and the gateway rejects it because
gateway.toolTimeoutis an integer field.Suggested fixes
Any of these would resolve the mismatch:
engine.mcp.tool-timeoutduration strings to integer seconds when renderinggateway.toolTimeout.gateway.toolTimeout.toolTimeoutfrom the effectivetools.timeoutvalue as integer seconds, while keepingengine.mcp.tool-timeoutas an explicit override with clear conversion semantics.Notes
MCP_GATEWAY_TOOL_TIMEOUT=300works as a lower-level workaround because the gateway already parses that environment variable as integer seconds. But workflow authors are encouraged to use the frontmatter setting, so the documentedengine.mcp.tool-timeoutpath should produce gateway-valid config without needing the env-var workaround.