Skip to content

docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3764

Open
Ankitsinghsisodya wants to merge 1 commit into
knative:mainfrom
Ankitsinghsisodya:fix/mcp-delete-instructions-cwd
Open

docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3764
Ankitsinghsisodya wants to merge 1 commit into
knative:mainfrom
Ankitsinghsisodya:fix/mcp-delete-instructions-cwd

Conversation

@Ankitsinghsisodya
Copy link
Copy Markdown
Contributor

Problem

The embedded MCP instructions at pkg/mcp/instructions.md L42 stated:

"no named parameter indicates 'delete the Function in my cwd'"

This implied that agents could call the delete tool with no path and no name, and the tool would delete the Function in the current working directory.

That is incorrect in the MCP context. The MCP server runs as a separate process with its own working directory, unrelated to the Function the agent is managing (this is already documented at L38 of the same file). The handler at pkg/mcp/tools_delete.go correctly enforces that exactly one of path or name must be provided, returning an error otherwise.

The result was a direct contradiction between two lines in the same file, causing agents following the L42 guidance to send requests the handler would reject.

Fix

Update L42 to accurately reflect the handler's contract: delete requires exactly one of path or name and does not support a no-argument CWD mode.

No code changes are needed. The handler behavior is correct.

Files changed

  • pkg/mcp/instructions.md — corrected L42 description of the delete tool

Clarified that the `delete` tool now requires exactly one of `path` or `name`, removing the previous no-argument CWD mode. This change enhances the accuracy of the documentation regarding the tool's functionality.
Copilot AI review requested due to automatic review settings May 16, 2026 14:22
@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 16, 2026 14:22
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ankitsinghsisodya
Once this PR has been reviewed and has the lgtm label, please assign dsimansk 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 the size/XS 🤖 PR changes 0-9 lines, ignoring generated files. label May 16, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 16, 2026

Hi @Ankitsinghsisodya. 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.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

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.

@knative-prow knative-prow Bot added the needs-ok-to-test 🤖 Needs an org member to approve testing label May 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Documentation update clarifying the delete tool's argument requirements in the MCP instructions.

Changes:

  • Updates the exception note for the delete tool to require exactly one of path or name, removing the previously documented no-argument CWD mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.06%. Comparing base (2bbf9fe) to head (4f16680).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3764      +/-   ##
==========================================
- Coverage   57.06%   57.06%   -0.01%     
==========================================
  Files         181      181              
  Lines       21145    21145              
==========================================
- Hits        12067    12066       -1     
  Misses       7855     7855              
- Partials     1223     1224       +1     
Flag Coverage Δ
e2e 35.92% <ø> (+<0.01%) ⬆️
e2e go 31.46% <ø> (ø)
e2e node 27.25% <ø> (ø)
e2e python 31.83% <ø> (ø)
e2e quarkus 27.37% <ø> (ø)
e2e rust 26.77% <ø> (ø)
e2e springboot 25.29% <ø> (ø)
e2e typescript 27.35% <ø> (ø)
e2e-config-ci 28.30% <ø> (ø)
integration 17.35% <ø> (-0.04%) ⬇️
unit macos-14 45.06% <ø> (ø)
unit macos-latest 45.06% <ø> (ø)
unit ubuntu-24.04-arm 45.31% <ø> (ø)
unit ubuntu-latest 46.01% <ø> (ø)
unit windows-latest 45.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants