Skip to main content
Glama
tomjwxf

protect-mcp

delete_file

Delete a file from the filesystem by providing its path. The tool removes the specified file permanently.

Instructions

Delete a file from the filesystem

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path to delete

Implementation Reference

  • Input schema definition for delete_file tool (name, description, inputSchema with required 'path' property)
    {
      name: 'delete_file',
      description: 'Delete a file from the filesystem',
      inputSchema: {
        type: 'object',
        properties: { path: { type: 'string', description: 'File path to delete' } },
        required: ['path'],
      },
    },
  • Registration of delete_file in TOOLS array alongside other demo tools
    const TOOLS = [
      {
        name: 'read_file',
        description: 'Read the contents of a file',
        inputSchema: {
          type: 'object',
          properties: { path: { type: 'string', description: 'File path to read' } },
          required: ['path'],
        },
      },
      {
        name: 'write_file',
        description: 'Write content to a file',
        inputSchema: {
          type: 'object',
          properties: {
            path: { type: 'string', description: 'File path to write' },
            content: { type: 'string', description: 'Content to write' },
          },
          required: ['path', 'content'],
        },
      },
      {
        name: 'delete_file',
        description: 'Delete a file from the filesystem',
        inputSchema: {
          type: 'object',
          properties: { path: { type: 'string', description: 'File path to delete' } },
          required: ['path'],
        },
      },
      {
        name: 'web_search',
        description: 'Search the web for information',
        inputSchema: {
          type: 'object',
          properties: { query: { type: 'string', description: 'Search query' } },
          required: ['query'],
        },
      },
      {
        name: 'deploy',
        description: 'Deploy the application to production',
        inputSchema: {
          type: 'object',
          properties: {
            environment: { type: 'string', description: 'Target environment', enum: ['staging', 'production'] },
            reason: { type: 'string', description: 'Deployment reason' },
          },
          required: ['environment'],
        },
      },
    ];
  • Handler for delete_file - when tool is called, returns a demo message simulating file deletion
    case 'delete_file':
      resultText = `[demo] Deleted file: ${args.path || '/example.txt'}`;
      break;
  • src/cli.ts:210-227 (registration)
    Gateway configuration registering delete_file with block: true and min_tier: 'privileged' in the main config template
    const config = {
      tools: {
        '*': {
          rate_limit: '100/hour',
        },
        'delete_file': {
          block: true,
          min_tier: 'privileged',
        },
        'write_file': {
          min_tier: 'signed-known',
          rate_limit: '10/minute',
        },
        'read_file': {
          rate_limit: '50/minute',
        },
      },
      default_tier: 'unknown',
  • src/cli.ts:783-796 (registration)
    Quickstart policy config registering delete_file with block: true
    const configPath = join(dir, 'protect-mcp.json');
    const config = {
      tools: {
        '*': { rate_limit: '100/hour' },
        'delete_file': { block: true },
      },
      default_tier: 'unknown',
      signing: {
        key_path: join(keysDir, 'gateway.json'),
        issuer: 'protect-mcp-quickstart',
        enabled: true,
      },
    };
    writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
Behavior2/5

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

No annotations provided, and the description does not disclose that deletion is irreversible or mention behavior for missing paths or directories, which is critical for a mutation tool.

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

Conciseness4/5

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

The description is very short and front-loaded, but could be improved by including context about irreversibility without significant length increase.

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

Completeness2/5

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

For a destructive operation with no output schema or annotations, the description lacks completeness: no mention of return values, errors, or required permissions.

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 coverage is 100%, and the parameter description 'File path to delete' is already clear; the description adds no extra meaning beyond the schema.

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 verb 'delete' and the resource 'file from the filesystem', distinguishing it from sibling tools like read_file (read) and write_file (write).

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?

No guidance on when to use this tool vs alternatives, no context about prerequisites or when not to use it.

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/tomjwxf/scopeblind-gateway'

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