Skip to main content
Glama
allegiant

MQScript MCP Server

by allegiant

mqscript_cjson_stringify

Convert MQScript object variables to JSON strings for data serialization and storage in mobile automation workflows.

Instructions

Convert object to JSON string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectVariableYesObject variable name to convert
resultVariableNoVariable name to store JSON stringjsonString

Implementation Reference

  • The async handler function for the 'mqscript_cjson_stringify' tool. It generates an MQScript command to stringify a JSON object into a string and stores it in the specified variable.
    handler: async (args: { objectVariable: string; resultVariable?: string }) => { const { objectVariable, resultVariable = 'jsonString' } = args; const script = `${resultVariable} = CJson.Stringify(${objectVariable})`; return { content: [ { type: 'text', text: `Generated MQScript CJson stringify command:\n\`\`\`\n${script}\n\`\`\`\n\nThis converts object "${objectVariable}" to JSON string in "${resultVariable}".` } ] }; }
  • The input schema for the tool, defining required 'objectVariable' and optional 'resultVariable'.
    inputSchema: { type: 'object' as const, properties: { objectVariable: { type: 'string', description: 'Object variable name to convert' }, resultVariable: { type: 'string', description: 'Variable name to store JSON string', default: 'jsonString' } }, required: ['objectVariable'] },
  • src/index.ts:56-60 (registration)
    Registration of CJsonCommands (containing mqscript_cjson_stringify) by spreading into the ALL_TOOLS object used by the MCP server for tool listing and execution.
    // Plugin Commands - 插件命令 ...CJsonCommands, ...DateTimeCommands, ...FileCommands, ...TuringCommands,
  • src/index.ts:16-16 (registration)
    Import of CJsonCommands from plugin-commands.ts, which defines the mqscript_cjson_stringify tool.
    import { CJsonCommands, DateTimeCommands, FileCommands, TuringCommands } from './tools/plugin-commands.js';

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