Skip to main content
Glama
Roblox Studio MCP Gateway

Roblox Studio MCP Gateway

by camilin7483

roblox_script_edit

Replace the first occurrence of a text string inside a Roblox Luau script, enabling targeted code edits through a Studio bridge without rewriting the whole file.

Instructions

Replace first occurrence of old_string in a script.

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": {
      "instance_path": "<instance_path>",
      "old_string": "<old_string>",
      "new_string": "<new_string>"
    },
    "name": "roblox_script_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
new_stringYes
old_stringYes
start_lineNo
instance_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.8/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 behavioral burden. It does disclose one real trait - only the first match is replaced, not all - but omits whether the script is saved after the edit, whether the operation requires a live session, and what happens when old_string is absent (error vs. no-op).

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?

A single front-loaded sentence with zero filler. Its brevity is appropriate in form, though the same brevity is the source of the gaps scored elsewhere.

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

Completeness3/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. Still, for a 4-parameter mutation tool with no annotations and no documented parameters, the definition does not give an agent enough to call it correctly - particularly the meaning of start_line and the failure mode when old_string is not found.

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

Parameters2/5

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

Schema description coverage is 0% and the schema only supplies bare titles, so the description is the only source of parameter meaning. It implies old_string and new_string but never names new_string explicitly, and it says nothing about instance_path (which script) or the start_line offset that defaults to 0.

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 ('Replace first occurrence of old_string in a script'), and the 'first occurrence' qualifier pins down the replacement semantics. It does not differentiate from plausible siblings such as roblox_replace, roblox_script_set, or roblox_edit, so an agent cannot tell from the description alone which one to pick.

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?

There is no when-to-use guidance, no mention of alternatives for multi-occurrence or whole-script edits, and no preconditions (e.g. script must be open, edit mode required). The agent must infer selection from the name and sentence alone.

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