Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_cint

Converts string values to integers for use in mobile automation scripts, enabling numerical operations and data processing in device control workflows.

Instructions

Convert value to integer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultVariableNoVariable name to store resultresult
valueYesValue to convert to integer

Implementation Reference

  • The handler function that implements the core logic of the 'mqscript_cint' tool. It takes a value and optional resultVariable, generates MQScript code using CInt for integer conversion, and returns a formatted text response with the generated script.
    handler: async (args: { value: string; resultVariable?: string }) => { const { value, resultVariable = 'result' } = args; const script = `${resultVariable} = CInt(${value})`; return { content: [ { type: 'text', text: `Generated MQScript integer conversion:\n\`\`\`\n${script}\n\`\`\`\n\nThis converts ${value} to integer.` } ] }; }
  • The input schema defining the parameters for the 'mqscript_cint' tool: required 'value' string and optional 'resultVariable'.
    inputSchema: { type: 'object' as const, properties: { value: { type: 'string', description: 'Value to convert to integer' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'result' } }, required: ['value'] },
  • src/index.ts:32-61 (registration)
    The ALL_TOOLS object spreads TypeConversionFunctions (containing mqscript_cint) into the central tools registry used by listTools and callTool handlers for MCP server registration.
    const ALL_TOOLS = { // Basic Commands - 基础命令 ...TouchCommands, ...ControlCommands, ...ColorCommands, ...OtherCommands, // Standard Library - 标准库函数 ...MathFunctions, ...StringFunctions, ...TypeConversionFunctions, ...ArrayFunctions, // UI Commands - 界面命令 ...UIControlCommands, ...UIPropertyCommands, ...FloatingWindowCommands, // Extension Commands - 扩展命令 ...ElementCommands, ...DeviceCommands, ...PhoneCommands, ...SysCommands, // Plugin Commands - 插件命令 ...CJsonCommands, ...DateTimeCommands, ...FileCommands, ...TuringCommands, };

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