Skip to main content
Glama
eva-wanxin-git

Windows Automation MCP Server

copy_file

Copy files between locations on Windows systems to automate file management tasks within the Windows Automation MCP Server environment.

Instructions

复制文件

Input Schema

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

Implementation Reference

  • The handler function that performs the file copy operation using fs.copyFile from Node.js fs/promises module. It handles errors and returns a structured success or error response.
    async copyFile(source, destination) { try { await fs.copyFile(source, destination); return { success: true, source, destination, message: '复制成功' }; } catch (error) { return { success: false, error: error.message }; } }
  • The tool definition including name, description, and input schema for validating arguments (source and destination file paths).
    { name: 'copy_file', description: '复制文件', inputSchema: { type: 'object', properties: { source: { type: 'string', description: '源文件路径' }, destination: { type: 'string', description: '目标文件路径' }, }, required: ['source', 'destination'], }, },
  • Registration in the executeTool switch statement, dispatching copy_file calls to the copyFile handler method.
    case 'copy_file': return await this.copyFile(args.source, args.destination);

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