Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_file_exists

Check if a file exists at a specified path to verify file availability before performing mobile automation operations.

Instructions

Check if file exists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesFile path to check
resultVariableNoVariable name to store resultfileExists

Implementation Reference

  • The handler function that implements the mqscript_file_exists tool logic by generating an MQScript command to check file existence and formatting the response.
    handler: async (args: { filePath: string; resultVariable?: string }) => { const { filePath, resultVariable = 'fileExists' } = args; const script = `${resultVariable} = File.Exists("${filePath}")`; return { content: [ { type: 'text', text: `Generated MQScript file exists command:\n\`\`\`\n${script}\n\`\`\`\n\nThis checks if file "${filePath}" exists and stores result in "${resultVariable}".` } ] }; }
  • Input schema defining parameters for the mqscript_file_exists tool: filePath (required) and optional resultVariable.
    inputSchema: { type: 'object' as const, properties: { filePath: { type: 'string', description: 'File path to check' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'fileExists' } }, required: ['filePath'] },
  • Registration of the mqscript_file_exists tool as part of FileCommands export, including name, description, schema, and handler.
    exists: { name: 'mqscript_file_exists', description: 'Check if file exists', inputSchema: { type: 'object' as const, properties: { filePath: { type: 'string', description: 'File path to check' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'fileExists' } }, required: ['filePath'] }, handler: async (args: { filePath: string; resultVariable?: string }) => { const { filePath, resultVariable = 'fileExists' } = args; const script = `${resultVariable} = File.Exists("${filePath}")`; return { content: [ { type: 'text', text: `Generated MQScript file exists command:\n\`\`\`\n${script}\n\`\`\`\n\nThis checks if file "${filePath}" exists and stores result in "${resultVariable}".` } ] }; } },

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