Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

fs_delete_file

Remove files from your development environment using this filesystem deletion tool. Specify the file path to permanently delete files from your system.

Instructions

Delete a file from the filesystem. This operation is irreversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the file to delete

Implementation Reference

  • The deleteFile function implements the core logic for deleting a file using Node.js fs.unlink. It handles errors and returns a standardized ToolResponse in MCP format.
    export async function deleteFile(args: z.infer<typeof deleteFileSchema>): Promise<ToolResponse> {
      try {
        await fs.unlink(args.path);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                path: args.path,
                message: 'File deleted successfully'
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: false,
                error: error instanceof Error ? error.message : String(error)
              }, null, 2)
            }
          ],
          isError: true
        };
      }
    }
  • MCP tool schema definition for fs_delete_file, defining the input schema advertised to MCP clients.
    {
      name: 'fs_delete_file',
      description: 'Delete a file from the filesystem. This operation is irreversible.',
      inputSchema: {
        type: 'object',
        properties: {
          path: {
            type: 'string',
            description: 'Absolute or relative path to the file to delete'
          }
        },
        required: ['path']
      }
    },
  • src/index.ts:317-319 (registration)
    Registration and dispatch logic in the main MCP CallToolRequest handler that routes calls to fs_delete_file to the deleteFile implementation.
    if (name === 'fs_delete_file') {
      const validated = deleteFileSchema.parse(args);
      return await deleteFile(validated);
  • Zod runtime validation schema used by the handler and dispatcher for input validation.
    export const deleteFileSchema = z.object({
      path: z.string().describe('Absolute or relative path to the file to delete')
    });
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the operation is 'irreversible,' which is a critical behavioral trait for a destructive operation. However, it doesn't mention other important aspects like permission requirements, error handling, or what happens if the file doesn't exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just two sentences that each earn their place: the first states the core purpose, and the second adds crucial behavioral context about irreversibility. It's front-loaded with the essential information and wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is minimally complete—it states the purpose and key risk (irreversibility). However, it lacks details on permissions, error cases, or return values, which would be helpful given the tool's complexity and potential impact.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (the 'path' parameter is fully described in the schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what the schema provides, such as examples of path formats or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete') and resource ('a file from the filesystem'), distinguishing it from sibling tools like fs_delete_directory (for directories) and fs_move_file (for moving rather than deleting). It provides a precise verb+resource combination.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like fs_move_file (to move instead of delete) or fs_delete_directory (for directories). It mentions irreversibility but doesn't explicitly state when-not-to-use scenarios or prerequisites, leaving usage context implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ConnorBoetig-dev/mcp2'

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