Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

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
NameRequiredDescriptionDefault
destinationPathYesDestination file path
overwriteNoOverwrite destination if exists
sourcePathYesSource file path

Implementation Reference

  • 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}.`
          }
        ]
      };
    }
  • 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']
    },
  • 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}.`
            }
          ]
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Copy file' implies a mutation operation, but it doesn't disclose critical traits like whether it requires permissions, handles errors, or has side effects (e.g., overwriting files based on the 'overwrite' parameter). The description lacks context on what gets copied, how it behaves on failure, or any rate limits.

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 'Copy file' is extremely concise with zero wasted words, front-loading the core action. It's appropriately sized for a simple tool, though this brevity contributes to gaps in other dimensions.

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 file mutation operation with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral nuances, leaving significant gaps for an AI agent to understand how to invoke it correctly in context.

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?

The input schema has 100% description coverage, with clear documentation for 'sourcePath', 'destinationPath', and 'overwrite'. The description adds no additional meaning beyond what the schema provides, such as path formats or overwrite implications. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Copy file' is a tautology that restates the tool name 'mqscript_file_copy' without adding specificity. It mentions the verb 'copy' and resource 'file', but doesn't distinguish it from sibling tools like 'mqscript_file_read' or 'mqscript_file_write' beyond the basic action implied by the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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, context, or exclusions, such as when to choose this over other file operations like 'mqscript_file_write' or 'mqscript_file_read' in the sibling list.

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/allegiant/MQScript_MCP'

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