Skip to main content
Glama
code-and-relax

Roblox Studio MCP Server

edit_script_lines

Replace specific lines in a Roblox script using instance path, line range, and new content. Avoid rewriting the entire source.

Instructions

Replace specific lines in a Roblox script without rewriting the entire source. IMPORTANT: Use the "numberedSource" field from get_script_source to identify the correct line numbers. Lines are 1-indexed and ranges are inclusive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endLineYesLast line to replace (inclusive). Get this from the "numberedSource" field.
startLineYesFirst line to replace (1-indexed). Get this from the "numberedSource" field.
newContentYesNew content to replace the specified lines (can be multiple lines separated by newlines)
instancePathYesRoblox instance path to the script (e.g., "game.ServerScriptService.MainScript")
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does reveal important indexing details (1-indexed, inclusive ranges) and the prerequisite to use numberedSource, but it does not mention mutation implications, error behavior, or reversibility.

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 a crucial usage note second. It is concise, front-loaded, and contains no redundant information.

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?

For a mutation tool with no annotations and no output schema, the description provides essential context like line indexing and the get_script_source dependency, but it omits potential failure scenarios or undo behavior. It is adequate for basic usage but not fully comprehensive.

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?

The input schema has 100% parameter description coverage, including the 1-indexed and inclusive-range details, so the description adds little beyond what the schema already provides. The description restates the numberedSource guidance but does not meaningfully enhance parameter understanding beyond the baseline.

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?

The description clearly states the tool replaces specific lines in a Roblox script, with the explicit qualifier 'without rewriting the entire source,' which distinguishes it from whole-script replacements like set_script_source. It satisfies the 'specific verb+resource' standard and stands out from sibling tools such as insert and delete.

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 explains the primary use case of targeted line replacement and gives a critical prerequisite: use the 'numberedSource' field from get_script_source to identify the correct line numbers. However, it does not explicitly name alternatives like insert_script_lines or delete_script_lines, so it lacks full exclusion guidance.

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

Install Server

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/code-and-relax/robloxstudio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server