docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3764
docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3764Ankitsinghsisodya wants to merge 1 commit into
Conversation
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.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ankitsinghsisodya The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
There was a problem hiding this comment.
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
deletetool to require exactly one ofpathorname, removing the previously documented no-argument CWD mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Problem
The embedded MCP instructions at
pkg/mcp/instructions.mdL42 stated:This implied that agents could call the
deletetool with nopathand noname, 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.gocorrectly enforces that exactly one ofpathornamemust 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:
deleterequires exactly one ofpathornameand 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 thedeletetool