delete_file
Remove files permanently from your computer's file system. This action immediately deletes specified files and cannot be undone.
Instructions
Permanently delete a file from the file system. This operation cannot be undone. The file is immediately removed from the storage device.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path to the file to delete |
Implementation Reference
- src/index.ts:382-393 (handler)Handler implementation for the 'delete_file' tool. Extracts the file path from arguments and deletes the file using fs.unlink, returning a success message.case "delete_file": { const filePath = args.path as string; await fs.unlink(filePath); return { content: [ { type: "text", text: `Successfully deleted file ${filePath}`, }, ], }; }
- src/index.ts:115-124 (schema)Input schema for the 'delete_file' tool, defining a required 'path' string parameter.inputSchema: { type: "object", properties: { path: { type: "string", description: "The path to the file to delete", }, }, required: ["path"], },
- src/index.ts:112-125 (registration)Registration of the 'delete_file' tool in the TOOLS array, which is returned by the listTools handler.{ name: "delete_file", description: "Permanently delete a file from the file system. This operation cannot be undone. The file is immediately removed from the storage device.", inputSchema: { type: "object", properties: { path: { type: "string", description: "The path to the file to delete", }, }, required: ["path"], }, },