Skip to main content
Glama

Get data by code

get-data-by-code

Execute Luau in the active Roblox client and return serialized raw Lua values. Prefer the specialized tools (search-instances, get-descendants-tree, get-script-content, script-grep) for exploration; use this only for small, targeted value probes. The code must return values; do not manually JSON-encode them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCode to run in the Roblox client (MUST return one or more values). Return small, specific values — never whole instances or large tables. Return raw Lua values; the connector serializes them (do NOT JSONEncode yourself).
timeoutNoTimeout in milliseconds for the response (default: 15000, max: 120000). Increase for long-running operations like decompiling many modules.
threadContextNoThe thread identity to execute the code in (default: 8, normal game scripts run on 2)
maxOutputCharsNoMaximum characters to return to the model (default: 6000, max: 32000). Raise only when a single result genuinely needs more; large outputs degrade model performance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
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 for behavioral disclosure. It mentions that the code must return values and that the connector serializes them, but it does not disclose potential side effects of executing arbitrary code in the client, such as state modification or crash risk, nor does it state any permission requirements. This is a significant gap for a 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.

Conciseness5/5

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

The description is two sentences, with the purpose stated first and usage guidance second. No filler or redundancy – every sentence contributes.

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?

For a tool that executes arbitrary code, the description leaves out important context such as error behavior, side effects, and what happens if the code does not return values. While the schema covers parameter details, the description alone is not complete enough for an agent to safely invoke this tool without additional assumptions, especially with no annotations or output schema.

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 fully documents all four parameters. The description adds no new parameter-level meaning beyond reiterating the return-value requirement for the code parameter, which is also in the schema. Baseline 3 is appropriate.

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 tool executes Luau in the active Roblox client and returns serialized raw Lua values, which distinguishes it from exploration-only tools like search-instances. However, it does not differentiate itself from the similarly named 'execute' siblings, which may also run code in the client, leaving some ambiguity.

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?

The description explicitly tells the agent to prefer specialized tools (search-instances, get-descendants-tree, get-script-content, script-grep) for exploration, and to use this tool only for small, targeted value probes. This gives clear when-to-use and when-not-to-use guidance for the exploration category, though it omits guidance about the 'execute' and 'execute-file' siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources