Skip to main content
Glama

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
NameRequiredDescriptionDefault
pathYesThe path to the file to delete

Implementation Reference

  • 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}`, }, ], }; }
  • 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"], }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/koopatroopa787/first_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server