Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

move_file

Move or rename files on Windows systems by specifying source and destination paths to organize or relocate files.

Instructions

移动或重命名文件

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes源文件路径
destinationYes目标文件路径

Implementation Reference

  • The core handler function that executes the move_file tool logic using Node.js fs.rename to move or rename the file from source to destination, returning success status and message or error.
    async moveFile(source, destination) { try { await fs.rename(source, destination); return { success: true, source, destination, message: '移动成功' }; } catch (error) { return { success: false, error: error.message }; } }
  • Tool definition including name, description, and input schema specifying required 'source' and 'destination' string parameters for validation.
    { name: 'move_file', description: '移动或重命名文件', inputSchema: { type: 'object', properties: { source: { type: 'string', description: '源文件路径' }, destination: { type: 'string', description: '目标文件路径' }, }, required: ['source', 'destination'], }, },
  • Registers and dispatches the 'move_file' tool call to the moveFile handler method within the executeTool switch statement.
    case 'move_file': return await this.moveFile(args.source, args.destination);
  • Registers 'move_file' in the canHandle method's tool list for routing tool calls to this module.
    const tools = ['read_file', 'write_file', 'list_directory', 'create_directory', 'delete_file', 'copy_file', 'move_file', 'search_files']; return tools.includes(toolName);

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/eva-wanxin-git/windows-automation-mcp'

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