Skip to main content
Glama
ConnorBoetig-dev

Unrestricted Development MCP Server

fs_move_file

Move or rename files and directories by specifying source and destination paths to organize your development workspace.

Instructions

Move or rename a file or directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSource path
destinationYesDestination path

Implementation Reference

  • The main handler function for the fs_move_file tool. It performs the file/directory move operation using Node.js fs.rename and returns a standardized ToolResponse.
    export async function moveFile(args: z.infer<typeof moveFileSchema>): Promise<ToolResponse> {
      try {
        await fs.rename(args.source, args.destination);
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                success: true,
                source: args.source,
                destination: args.destination,
                message: 'File/directory moved 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
        };
      }
    }
  • Zod schema used for input validation in the fs_move_file handler.
    export const moveFileSchema = z.object({
      source: z.string().describe('Source path'),
      destination: z.string().describe('Destination path')
    });
  • MCP tool metadata definition for fs_move_file, including the input schema exposed to the model.
    {
      name: 'fs_move_file',
      description: 'Move or rename a file or directory',
      inputSchema: {
        type: 'object',
        properties: {
          source: {
            type: 'string',
            description: 'Source path'
          },
          destination: {
            type: 'string',
            description: 'Destination path'
          }
        },
        required: ['source', 'destination']
      }
    },
  • src/index.ts:337-339 (registration)
    Registration and dispatch logic in the main MCP server handler that routes 'fs_move_file' calls to the appropriate schema validation and handler execution.
    if (name === 'fs_move_file') {
      const validated = moveFileSchema.parse(args);
      return await moveFile(validated);
Behavior2/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 states the action ('move or rename') but doesn't describe key behaviors: whether it overwrites existing files at the destination, handles symbolic links, requires write permissions, returns confirmation or error details, or has side effects (e.g., updating timestamps). For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how it operates.

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 that front-loads the core functionality ('Move or rename a file or directory') with zero wasted words. It's appropriately sized for a simple tool with two parameters and no complex behaviors to explain, making it easy for an agent to parse quickly.

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 (a mutation operation with no annotations and no output schema), the description is incomplete. It lacks details on behavioral traits (e.g., overwrite behavior, error handling), output expectations, and usage context. While the schema covers parameters well, the description doesn't compensate for missing annotations or output schema, leaving the agent with insufficient context for reliable invocation.

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%, with both parameters (source and destination) clearly documented in the schema. The description adds no additional parameter semantics beyond implying that source and destination are paths for moving/renaming. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance understanding (e.g., by explaining path formats or rename vs. move scenarios).

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 verb ('move or rename') and resource ('a file or directory'), making the purpose immediately understandable. It distinguishes from siblings like fs_delete_file or fs_write_file by focusing on relocation/renaming rather than deletion or content modification. However, it doesn't explicitly differentiate from all fs_* siblings (e.g., it could be more specific about how this differs from fs_list_directory or fs_get_file_info).

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. It doesn't mention prerequisites (e.g., file existence, permissions), when not to use it (e.g., for copying instead of moving), or how it relates to sibling tools like fs_delete_file or fs_write_file. The agent must infer usage from the purpose alone.

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