Skip to main content
Glama
ai-yliu

Filesystem MCP Server

by ai-yliu

move_file

Move or rename files and directories by specifying source and destination paths to reorganize your filesystem structure.

Instructions

Move or rename files and directories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSource path
destinationYesDestination path

Implementation Reference

  • Handler for the move_file tool: extracts source and destination paths, validates them, checks if destination exists (throws if yes), ensures parent directory exists, moves the file using fs.move, and returns success message.
    case 'move_file': {
      const { source, destination } = request.params.arguments as { 
        source: string; 
        destination: string 
      };
      validatePath(source);
      validatePath(destination);
      
      // Check if destination exists
      const destinationExists = await fs.pathExists(destination);
      if (destinationExists) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          `Destination already exists: ${destination}`
        );
      }
      
      // Ensure parent directory of destination exists
      await fs.ensureDir(path.dirname(destination));
      await fs.move(source, destination);
      
      return {
        content: [
          {
            type: 'text',
            text: `Successfully moved ${source} to ${destination}`,
          },
        ],
      };
    }
  • Schema definition for the move_file tool, including name, description, and inputSchema specifying source and destination paths as required strings.
    {
      name: 'move_file',
      description: 'Move or rename files and directories',
      inputSchema: {
        type: 'object',
        properties: {
          source: {
            type: 'string',
            description: 'Source path',
          },
          destination: {
            type: 'string',
            description: 'Destination path',
          },
        },
        required: ['source', 'destination'],
      },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'move or rename' implies mutation, it lacks details on permissions needed, whether it overwrites existing files, handles errors, or affects file metadata. This is a significant gap for a mutation tool with zero annotation coverage.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and resources, making it easy to parse quickly without unnecessary elaboration.

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?

Given the tool's complexity as a mutation operation with no annotations and no output schema, the description is insufficient. It doesn't cover behavioral aspects like error handling, return values, or interaction with sibling tools, leaving critical gaps for an AI agent to use it correctly.

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%, so the input schema already documents both parameters ('source' and 'destination') adequately. The description doesn't add any meaning beyond what the schema provides, such as path format examples or rename-specific semantics, but the baseline is appropriate given the schema's completeness.

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

Purpose4/5

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

The description clearly states the tool's purpose with specific verbs ('move or rename') and resources ('files and directories'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'write_file' or 'create_directory' that might also handle file operations, preventing a perfect score.

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. With sibling tools like 'create_directory', 'write_file', and 'search_files' available, there's no indication of whether this is for relocation versus creation, or if it handles overwrites, permissions, or other constraints.

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/ai-yliu/filesystem-mcp-server'

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