Bug
appendBoolFlag in pkg/mcp/tools.go only appends the flag when *value == true:
func appendBoolFlag(args []string, flag string, value *bool) []string {
if value != nil && *value {
return append(args, flag)
}
return args
}
When the AI agent explicitly sends {"push": false}, the pointer is non-nil but the value is false, so the flag is silently dropped. For boolean flags like --push, --remote, and --registry-insecure, there is no way for the MCP client to explicitly disable a flag that was previously set via func.yaml or defaults.
Example scenario:
- User deploys with
--push enabled (value saved in func.yaml)
- AI agent sends
{"push": false} to disable push on the next deploy
appendBoolFlag drops the flag entirely
func deploy reads func.yaml and pushes anyway
Impact
The MCP client cannot explicitly disable a boolean option that was previously enabled. The underlying CLI supports --push=false to explicitly override defaults, but the MCP layer cannot express that intent.
Fix
When value != nil && !*value, append flag=false (e.g. --push=false) instead of dropping the flag silently.
Bug
appendBoolFlaginpkg/mcp/tools.goonly appends the flag when*value == true:When the AI agent explicitly sends
{"push": false}, the pointer is non-nil but the value isfalse, so the flag is silently dropped. For boolean flags like--push,--remote, and--registry-insecure, there is no way for the MCP client to explicitly disable a flag that was previously set viafunc.yamlor defaults.Example scenario:
--pushenabled (value saved infunc.yaml){"push": false}to disable push on the next deployappendBoolFlagdrops the flag entirelyfunc deployreadsfunc.yamland pushes anywayImpact
The MCP client cannot explicitly disable a boolean option that was previously enabled. The underlying CLI supports
--push=falseto explicitly override defaults, but the MCP layer cannot express that intent.Fix
When
value != nil && !*value, appendflag=false(e.g.--push=false) instead of dropping the flag silently.