Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_datetime_compare

Compare two DateTime variables in mobile automation scripts to determine temporal relationships and store results for conditional logic.

Instructions

Compare two date times

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateTime1YesFirst DateTime variable name
dateTime2YesSecond DateTime variable name
resultVariableNoVariable name to store comparison resultcompareResult

Implementation Reference

  • The handler function that implements the core logic of the mqscript_datetime_compare tool by generating the corresponding MQScript DateTime.Compare command.
    handler: async (args: { dateTime1: string; dateTime2: string; resultVariable?: string }) => { const { dateTime1, dateTime2, resultVariable = 'compareResult' } = args; const script = `${resultVariable} = DateTime.Compare(${dateTime1}, ${dateTime2})`; return { content: [ { type: 'text', text: `Generated MQScript DateTime compare command:\n\`\`\`\n${script}\n\`\`\`\n\nThis compares "${dateTime1}" with "${dateTime2}" and stores result in "${resultVariable}".` } ] }; }
  • The input schema defining the parameters for the mqscript_datetime_compare tool: dateTime1, dateTime2 (required), and optional resultVariable.
    inputSchema: { type: 'object' as const, properties: { dateTime1: { type: 'string', description: 'First DateTime variable name' }, dateTime2: { type: 'string', description: 'Second DateTime variable name' }, resultVariable: { type: 'string', description: 'Variable name to store comparison result', default: 'compareResult' } }, required: ['dateTime1', 'dateTime2'] },
  • The tool definition and registration within DateTimeCommands object, which is later spread into the main ALL_TOOLS registry.
    compare: { name: 'mqscript_datetime_compare', description: 'Compare two date times', inputSchema: { type: 'object' as const, properties: { dateTime1: { type: 'string', description: 'First DateTime variable name' }, dateTime2: { type: 'string', description: 'Second DateTime variable name' }, resultVariable: { type: 'string', description: 'Variable name to store comparison result', default: 'compareResult' } }, required: ['dateTime1', 'dateTime2'] }, handler: async (args: { dateTime1: string; dateTime2: string; resultVariable?: string }) => { const { dateTime1, dateTime2, resultVariable = 'compareResult' } = args; const script = `${resultVariable} = DateTime.Compare(${dateTime1}, ${dateTime2})`; return { content: [ { type: 'text', text: `Generated MQScript DateTime compare command:\n\`\`\`\n${script}\n\`\`\`\n\nThis compares "${dateTime1}" with "${dateTime2}" and stores result in "${resultVariable}".` } ] }; } }
  • src/index.ts:56-58 (registration)
    Spreading DateTimeCommands (containing mqscript_datetime_compare) into the main ALL_TOOLS object used for tool listing and execution.
    // Plugin Commands - 插件命令 ...CJsonCommands, ...DateTimeCommands,

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