Skip to content

mcp: fix DeleteInput.All type from *string to *bool#3738

Closed
thonmay wants to merge 1 commit into
knative:mainfrom
thonmay:fix/mcp-delete-all-bool
Closed

mcp: fix DeleteInput.All type from *string to *bool#3738
thonmay wants to merge 1 commit into
knative:mainfrom
thonmay:fix/mcp-delete-all-bool

Conversation

@thonmay
Copy link
Copy Markdown

@thonmay thonmay commented May 14, 2026

Changes

Fixes a type mismatch in DeleteInput: the All field was typed as *string but the underlying func delete --all flag is a boolean cobra flag.

Problems with the old implementation:

  • JSON schema presented string type to agents instead of bool
  • appendStringFlag passed --all true (two args) instead of --all (one arg)
  • Cobra's BoolVar would interpret true as a positional argument, not the flag value

Fix:

  • All *string -> *bool
  • appendStringFlag -> appendBoolFlag
  • Updated jsonschema tag (removed redundant true/false hint)
  • Updated test: moved all from stringFlags to boolFlags

/kind bug

Fixes #3706

Fix MCP `delete` tool: `all` parameter now correctly typed as bool

The --all flag on 'func delete' is a boolean cobra flag.
Using *string with appendStringFlag was passing '--all true'
(two args) instead of '--all' (one arg), and presenting a
string type in the JSON schema to agents instead of bool.

Fixes knative#3706

Signed-off-by: Thonmay <mdthoriqulislam384@gmail.com>
@knative-prow knative-prow Bot added the kind/bug Bugs label May 14, 2026
@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 14, 2026 21:58
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: thonmay
Once this PR has been reviewed and has the lgtm label, please assign gauron99 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added size/XS 🤖 PR changes 0-9 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels May 14, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 14, 2026

Hi @thonmay. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@thonmay
Copy link
Copy Markdown
Author

thonmay commented May 15, 2026

Closing in favor of #3710 by @Elvand-Lie which was opened earlier and addresses the same issue.

@thonmay thonmay closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Bugs needs-ok-to-test 🤖 Needs an org member to approve testing size/XS 🤖 PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant