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.`
            }
          ]
        };
      }
    },
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. It states the conversion action but doesn't describe how the conversion works (e.g., what strings map to true/false, error handling for invalid inputs, or whether it's a read-only operation). This leaves significant gaps for a tool that performs data transformation.

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 is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple conversion tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (boolean conversion), 100% schema coverage, and no output schema, the description is minimally adequate. However, it lacks details on conversion rules or output format, which could be helpful for an agent to use it correctly without trial and error.

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?

Schema description coverage is 100%, with clear descriptions for both parameters: 'value' (value to convert) and 'resultVariable' (variable name to store result). The description adds no additional meaning beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without extra param info.

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

Purpose3/5

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

The description 'Convert value to boolean' clearly states the tool's function with a specific verb ('convert') and resource ('value'), but it doesn't distinguish this from sibling tools like 'mqscript_cint' (convert to integer) or 'mqscript_cstr' (convert to string) beyond the boolean focus. It's not tautological but lacks sibling differentiation.

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

Usage Guidelines2/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 compare it to other conversion tools in the sibling list, leaving the agent to infer usage based on the name alone.

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