Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_abs

Calculate the absolute value of a number in mobile automation scripts, ensuring positive results for mathematical operations and conditional logic.

Instructions

Get absolute value of a number

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesNumber to get absolute value of
resultVariableNoVariable name to store resultresult

Implementation Reference

  • The handler function that generates MQScript code for computing the absolute value of a number and returns it as formatted content.
    handler: async (args: { number: number; resultVariable?: string }) => {
      const { number, resultVariable = 'result' } = args;
      const script = `${resultVariable} = Abs(${number})`;
      return {
        content: [
          {
            type: 'text',
            text: `Generated MQScript absolute value function:\n\`\`\`\n${script}\n\`\`\`\n\nThis calculates the absolute value of ${number}.`
          }
        ]
      };
    }
  • Input schema defining the parameters: number (required) and optional resultVariable for the mqscript_abs tool.
    inputSchema: {
      type: 'object' as const,
      properties: {
        number: {
          type: 'number',
          description: 'Number to get absolute value of'
        },
        resultVariable: {
          type: 'string',
          description: 'Variable name to store result',
          default: 'result'
        }
      },
      required: ['number']
    },
  • src/index.ts:40-40 (registration)
    Registration of mqscript_abs tool via spreading MathFunctions into the ALL_TOOLS object, which serves as the central tool registry for MCP server handlers.
    ...MathFunctions,
  • src/index.ts:13-13 (registration)
    Import of MathFunctions containing the mqscript_abs tool definition.
    import { MathFunctions, StringFunctions, TypeConversionFunctions, ArrayFunctions } from './tools/standard-library.js';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states a read operation ('Get'), implying no destructive effects, but doesn't disclose behavioral traits like error handling, performance, or how the result is returned (e.g., in a variable). This is inadequate for a tool with parameters and no output schema.

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, front-loading the core purpose. It's appropriately sized for a simple mathematical function, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain return values, error cases, or how the result is stored (e.g., in 'resultVariable'), leaving gaps for a tool with parameters and potential behavioral nuances.

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%, so the schema already documents both parameters ('number' and 'resultVariable') fully. The description adds no additional meaning beyond the schema, such as examples or constraints, meeting the baseline for high coverage.

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

Purpose4/5

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

The description clearly states the verb 'Get' and the resource 'absolute value of a number', making the purpose specific and understandable. However, it doesn't differentiate from siblings like 'mqscript_sqr' (square root) or 'mqscript_sin' (sine), which are also mathematical operations, so it lacks sibling distinction.

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. With many sibling tools for mathematical operations (e.g., 'mqscript_sqr', 'mqscript_sin'), there's no indication of context, prerequisites, or exclusions, leaving usage unclear.

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