Skip to content

mcp: DeleteInput.All should be *bool, not *string #3706

@Elvand-Lie

Description

@Elvand-Lie

Bug

The All field in DeleteInput (pkg/mcp/tools_delete.go) is typed as *string:

All *string `json:"all,omitempty" jsonschema:"Delete all related resources like Pipelines, Secrets (true/false)"`

The --all flag on the underlying func delete CLI is a boolean flag. The current implementation:

  1. Presents a string field in the JSON schema to the AI agent instead of a boolean
  2. Requires the AI to send "all": "true" (string) instead of "all": true (boolean)
  3. Passes the flag as --all true (two separate args via appendStringFlag) instead of --all

If the underlying cobra command's --all flag is a BoolVar, then --all true may be interpreted as --all followed by a positional argument "true", causing unexpected behavior.

Impact

The --all flag may not work correctly. The JSON schema also misleads AI agents about the expected type.

Fix

Change All from *string to *bool and use appendBoolFlag instead of appendStringFlag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions