Skip to main content
Glama

gmod_execute_lua

Run Lua code on a Garry's Mod server by splitting semicolon-separated statements into lua_run calls. Use global variables to pass data between fragments.

Instructions

Выполнить Lua код на сервере Garry's Mod. Код разбивается по точке с запятой (;) на отдельные lua_run вызовы. ВАЖНО: local переменные НЕ сохраняются между вызовами! Используйте глобальные переменные (_G.var или просто var = ...) для передачи данных между частями. Лимит ~180 символов на statement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesLua код. Разделяйте команды точкой с запятой (;). Используйте глобальные переменные вместо local для многочастного кода. Пример: _G.ply = player.GetByID(1); print(_G.ply:Nick())

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the semicolon-splitting behavior, that local variables do not persist across calls, the required global-variable workaround, and a ~180-character per-statement limit. It omits auth/permission requirements and error/failure behavior, so it stops short of a 5.

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?

Front-loaded purpose followed by three high-value constraints in as many clauses, with no filler. The 'ВАЖНО' marker correctly emphasizes the non-obvious local-variable pitfall.

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?

For a single-parameter code-execution tool with no output schema, the description covers the critical operational gotchas an agent must know to succeed. It leaves open what the tool returns (e.g., whether print output is captured) and whether special privileges are needed.

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 single 'code' parameter is already fully documented, including an example. The description adds the statement limit and the global-variable rule, which is meaningful framing, but the baseline of 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource (execute Lua code on the Garry's Mod server) and even names the underlying mechanism (splitting into lua_run calls). It is clearly distinct from gmod_execute_rcon by the resource type, though it never explicitly names the sibling to route between them.

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 gives how-to-write-code guidance (global variables, statement limit) but no guidance on when to pick this tool over gmod_execute_rcon or gmod_console_command, and no preconditions or exclusions. An agent must infer the selection criteria from the name alone.

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