Skip to main content
Glama
koopatroopa787

MCP PC Control Server

move_file

Move or rename files and directories on your PC. Transfer files between folders and rename them in one operation, with safety checks to prevent overwriting existing files.

Instructions

Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesThe current path of the file/directory
destinationYesThe new path for the file/directory

Implementation Reference

  • The handler function for the 'move_file' tool. It ensures the destination directory exists using fs.mkdir (recursive), then moves or renames the source to destination using fs.rename, and returns a success message.
    case "move_file": {
      const source = args.source as string;
      const destination = args.destination as string;
    
      // Ensure destination directory exists
      const destDir = path.dirname(destination);
      await fs.mkdir(destDir, { recursive: true });
    
      await fs.rename(source, destination);
      return {
        content: [
          {
            type: "text",
            text: `Successfully moved ${source} to ${destination}`,
          },
        ],
      };
    }
  • The tool definition including name, description, and input schema for 'move_file'. This is part of the TOOLS array used for tool listing.
    {
      name: "move_file",
      description: "Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail.",
      inputSchema: {
        type: "object",
        properties: {
          source: {
            type: "string",
            description: "The current path of the file/directory",
          },
          destination: {
            type: "string",
            description: "The new path for the file/directory",
          },
        },
        required: ["source", "destination"],
      },
    },
  • src/index.ts:261-263 (registration)
    Registration of the list tools handler which returns the TOOLS array containing the 'move_file' tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: TOOLS };
    });
Behavior3/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 effectively describes the core behavior (move/rename with failure on existing destination) but lacks details about permissions needed, whether the operation is atomic/reversible, error handling beyond the failure case, or what happens to file metadata. It provides basic behavioral context but could be more comprehensive.

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 perfectly concise with three sentences that each earn their place: first states the core functionality, second clarifies the dual operation capability, third provides critical behavioral constraint. No wasted words, and the most important information (failure condition) is appropriately positioned.

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

Completeness4/5

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

For a mutation tool with 2 parameters, 100% schema coverage, but no annotations or output schema, the description provides good context about what the tool does and a key behavioral constraint. However, it could better address the mutation nature (e.g., mentioning it modifies the file system state) and provide more guidance about error scenarios or return values given the lack of output schema.

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?

The schema description coverage is 100%, so both parameters (source and destination) are fully documented in the schema. The description doesn't add any additional parameter semantics beyond what the schema provides (e.g., path format examples, relative vs absolute paths, or special cases). The baseline of 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose with specific verbs ('move or rename') and resources ('files and directories'), distinguishing it from siblings like create_directory, delete_file, or edit_file. It explicitly mentions the dual functionality of moving between directories and renaming in one operation.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (moving/renaming files/directories) and includes an important exclusion ('If the destination exists, the operation will fail'). However, it doesn't explicitly mention alternatives like using edit_file for content changes or create_directory for new directories, which would be helpful for sibling differentiation.

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/koopatroopa787/first_mcp'

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