mqscript_file_copy
Copy files between locations on mobile devices using MQScript automation, with optional overwrite control for destination files.
Instructions
Copy file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destinationPath | Yes | Destination file path | |
| overwrite | No | Overwrite destination if exists | |
| sourcePath | Yes | Source file path |
Implementation Reference
- src/tools/plugin-commands.ts:462-473 (handler)The handler function for the 'mqscript_file_copy' tool. It takes sourcePath, destinationPath, and optional overwrite, generates an MQScript 'File.Copy' command, and returns a formatted text response with the script.handler: async (args: { sourcePath: string; destinationPath: string; overwrite?: boolean }) => { const { sourcePath, destinationPath, overwrite = false } = args; const script = `File.Copy("${sourcePath}", "${destinationPath}", ${overwrite})`; return { content: [ { type: 'text', text: `Generated MQScript file copy command:\n\`\`\`\n${script}\n\`\`\`\n\nThis copies file from "${sourcePath}" to "${destinationPath}", overwrite=${overwrite}.` } ] }; }
- src/tools/plugin-commands.ts:443-461 (schema)The input schema for the 'mqscript_file_copy' tool, defining required sourcePath and destinationPath strings, and optional boolean overwrite.inputSchema: { type: 'object' as const, properties: { sourcePath: { type: 'string', description: 'Source file path' }, destinationPath: { type: 'string', description: 'Destination file path' }, overwrite: { type: 'boolean', description: 'Overwrite destination if exists', default: false } }, required: ['sourcePath', 'destinationPath'] },
- src/tools/plugin-commands.ts:440-474 (registration)The full tool registration object for 'mqscript_file_copy' within what appears to be FileCommands, including name, description, schema, and handler.copy: { name: 'mqscript_file_copy', description: 'Copy file', inputSchema: { type: 'object' as const, properties: { sourcePath: { type: 'string', description: 'Source file path' }, destinationPath: { type: 'string', description: 'Destination file path' }, overwrite: { type: 'boolean', description: 'Overwrite destination if exists', default: false } }, required: ['sourcePath', 'destinationPath'] }, handler: async (args: { sourcePath: string; destinationPath: string; overwrite?: boolean }) => { const { sourcePath, destinationPath, overwrite = false } = args; const script = `File.Copy("${sourcePath}", "${destinationPath}", ${overwrite})`; return { content: [ { type: 'text', text: `Generated MQScript file copy command:\n\`\`\`\n${script}\n\`\`\`\n\nThis copies file from "${sourcePath}" to "${destinationPath}", overwrite=${overwrite}.` } ] }; } }