Skip to main content
Glama
grandMA2 MCP
by drohi-r

run_lua_script

Execute inline Lua scripts directly on a grandMA2 console for one-off automations without creating a persistent Plugin pool entry.

Instructions

Execute an inline Lua script directly on the grandMA2 console.

Sends the script using the Lua keyword. Useful for one-off
automations without creating a persistent Plugin pool entry.

Args:
    script: Lua source code (e.g. 'print("hello")', 'gma.cmd("Blackout")').
    confirm_destructive: Must be True to proceed. Defaults to False (blocked).

Returns:
    str: JSON with command_sent and raw_response.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "script": "<script>"
    },
    "name": "run_lua_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYes
confirm_destructiveNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does the most important part: it reveals the confirm_destructive gate and that the default is blocked, surfacing a real safety interlock an agent would otherwise trip over. What it omits is what counts as destructive, whether execution is sandboxed or has console-side permissions/rate limits, and typical failure modes for arbitrary code — meaningful gaps for a raw code-execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded single-sentence purpose, then tidy Args/Returns blocks with no filler. The 'Sends the script using the Lua keyword' sentence is slightly redundant with the purpose line, and the Returns block partially duplicates the output schema, but both are cheap.

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

Completeness4/5

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

An output schema exists, so return values need not be described, and the two parameters are covered with examples and defaults. Combined with the explicit destructive gate, an agent has enough to invoke this correctly; the missing piece is the definition of destructive and any console-side permission or sandbox constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: it gives concrete script examples ('print("hello")', 'gma.cmd("Blackout")') and explains that confirm_destructive must be True to proceed with a False default meaning blocked. That adds genuine meaning beyond the bare type/default declarations, though it never defines which scripts require confirmation.

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

Purpose5/5

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

States a specific verb and resource: 'Execute an inline Lua script directly on the grandMA2 console,' and immediately scopes it as one-off automation rather than a persistent Plugin entry. That framing lets an agent distinguish it from plugin/macro execution siblings without opening the schema.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear use case — 'one-off automations without creating a persistent Plugin pool entry' — which implicitly routes persistent/registered scripts to the plugin-pool path. It stops short of naming a specific alternative tool or stating when not to use this one, so it is clear context rather than full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools