Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_cbool

Convert string values to boolean format for use in mobile automation scripts, enabling conditional logic and decision-making in device control operations.

Instructions

Convert value to boolean

Input Schema

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

Implementation Reference

  • The handler function that implements the mqscript_cbool tool logic by generating MQScript code for converting a value to boolean and storing it in resultVariable.
    handler: async (args: { value: string; resultVariable?: string }) => { const { value, resultVariable = 'result' } = args; const script = `${resultVariable} = CBool(${value})`; return { content: [ { type: 'text', text: `Generated MQScript boolean conversion:\n\`\`\`\n${script}\n\`\`\`\n\nThis converts ${value} to boolean.` } ] }; }
  • The input schema defining parameters for the mqscript_cbool tool: required 'value' (string), optional 'resultVariable' (string).
    inputSchema: { type: 'object' as const, properties: { value: { type: 'string', description: 'Value to convert to boolean' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'result' } }, required: ['value']
  • The tool object registration within TypeConversionFunctions, which is spread into ALL_TOOLS in index.ts for MCP server registration.
    cBool: { name: 'mqscript_cbool', description: 'Convert value to boolean', inputSchema: { type: 'object' as const, properties: { value: { type: 'string', description: 'Value to convert to boolean' }, resultVariable: { type: 'string', description: 'Variable name to store result', default: 'result' } }, required: ['value'] }, handler: async (args: { value: string; resultVariable?: string }) => { const { value, resultVariable = 'result' } = args; const script = `${resultVariable} = CBool(${value})`; return { content: [ { type: 'text', text: `Generated MQScript boolean conversion:\n\`\`\`\n${script}\n\`\`\`\n\nThis converts ${value} to boolean.` } ] }; } },

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