Add file delete to Python and TypeScript SDKs - #22
Merged
Merged
Conversation
The hosted file_delete MCP tool already exists, but neither mounted-FS
SDK exposed it. Add delete(path) to MountedFS (sync + async in Python,
and the TypeScript MountedFS), mirroring write_file: resolve the
workspace-relative path, call file_delete, and remove the local mirror
entry when the mount is materialized.
Returns the tool result {operation: "delete", kind}. Non-empty
directories and the workspace root are rejected backend-side.
Includes unit tests for both SDKs and updates the Python/TypeScript
reference docs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
zechengz
marked this pull request as ready for review
June 21, 2026 08:35
Collaborator
|
Thanks Zecheng! |
Contributor
Author
Glad to help! May pleasure :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The hosted
file_deleteMCP tool already exists, but neither mounted-FS SDK exposed it. This addsdelete(path)to the mounted filesystem in both SDKs at parity.MountedFS.delete(sync) andAsyncMountedFS.delete(async)MountedFS.delete, plus aFileDeleteResponsetypeEach mirrors
write_file: resolve the workspace-relative path, callfile_delete, and remove the local mirror entry when the mount has been materialized locally.Behavior
{ operation: "delete", kind }, wherekindis"file","dir"(empty), or"symlink".Tests
Docs
Updated the Python and TypeScript reference docs (quick reference, signatures, and the "not yet exposed" limits list).