Skip to main content
Glama

Windows Automation MCP Server

move_file

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

Instructions

移动或重命名文件

Input Schema

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

Input Schema (JSON Schema)

{ "properties": { "destination": { "description": "目标文件路径", "type": "string" }, "source": { "description": "源文件路径", "type": "string" } }, "required": [ "source", "destination" ], "type": "object" }

Implementation Reference

  • The handler function that executes the move_file tool logic by renaming the source file to the destination using fs.rename.
    async moveFile(source, destination) { try { await fs.rename(source, destination); return { success: true, source, destination, message: '移动成功' }; } catch (error) { return { success: false, error: error.message }; } }
  • Input schema definition for the move_file tool, specifying source and destination as required string properties.
    inputSchema: { type: 'object', properties: { source: { type: 'string', description: '源文件路径' }, destination: { type: 'string', description: '目标文件路径' }, }, required: ['source', 'destination'], },
  • Registers the move_file tool in getToolDefinitions() with its name, description, and input schema.
    { name: 'move_file', description: '移动或重命名文件', inputSchema: { type: 'object', properties: { source: { type: 'string', description: '源文件路径' }, destination: { type: 'string', description: '目标文件路径' }, }, required: ['source', 'destination'], }, },
  • Registers the handler for move_file in the executeTool switch statement.
    case 'move_file': return await this.moveFile(args.source, args.destination);
  • Includes move_file in the list of handleable tools in canHandle method.
    'delete_file', 'copy_file', 'move_file', 'search_files'];

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