docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3824
docs(mcp): fix delete tool instructions — no-args CWD mode not supported#3824Ankitsinghsisodya 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.
Updates MCP documentation to clarify delete tool argument requirements and remove the previously documented implicit “delete in my cwd” mode.
Changes:
- Clarifies that
deleterequires exactly one ofpathorname - Documents that a no-argument CWD-based delete mode is not supported due to MCP server process working directory semantics
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Exceptions:** | ||
| - The `list` tool operates on the cluster, not local files, so it does NOT use a path parameter (it uses namespace instead) | ||
| - The `delete` tool can accept an optional named Function to delete, in which case the path is not necessary (no named parameter indicates 'delete the Function in my cwd') | ||
| - The `delete` tool requires exactly one of `path` or `name`; it does NOT support a no-argument CWD mode (the MCP server process has its own working directory unrelated to the Function being managed) |
Problem
The embedded MCP instructions at
pkg/mcp/instructions.mdstated: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. 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 incorrect guidance to send requests the handler would reject.
Fix
Updated the description 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 description of thedeletetool