Skip to main content
Glama
code-and-relax

Roblox Studio MCP Server

insert_script_lines

Insert new lines into a Roblox script at a specific position using line numbers from the script's numbered source to ensure precise placement.

Instructions

Insert new lines into a Roblox script at a specific position. IMPORTANT: Use the "numberedSource" field from get_script_source to identify the correct line numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterLineNoInsert after this line number (0 = insert at very beginning, 1 = after first line). Get line numbers from "numberedSource".
newContentYesContent to insert (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 provided, the description carries the full burden. It discloses the critical behavior that line numbers must come from numberedSource, which is a non-obvious trait. However, it does not mention whether the operation is irreversible, requires permissions, or what side effects occur (e.g., modifying the script in place). For a mutation tool, this is a moderate disclosure. More explicit behavioral details would improve transparency.

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 concise, two sentences, and front-loaded with the purpose. The second sentence is an important usage caveat written in all caps, making it stand out. No redundant info; every sentence earns its place.

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?

The tool has no output schema and no annotations. The description covers the core action and a key usage requirement (numberedSource), but it omits details about what happens on success, error conditions, or whether the operation is reversible. Given the tool's simplicity, these gaps are acceptable but not fully complete.

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 already provides 100% coverage for all parameters, so the baseline is 3. The description repeats the instruction about using numberedSource, which is already in the afterLine parameter description. It does not add new semantic meaning to the parameters; it merely reinforces an existing warning.

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's function: 'Insert new lines into a Roblox script at a specific position.' This specifies the verb (insert), resource (a Roblox script), and location (specific position). It distinguishes from sibling tools like delete_script_lines or edit_script_lines by focusing on insertion. The 'specific position' hint aligns with the afterLine parameter.

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 provides a crucial usage guideline: 'Use the "numberedSource" field from get_script_source to identify the correct line numbers.' This tells the agent to first call get_script_source and use its output for the afterLine parameter, ensuring correct line targeting. It doesn't explicitly compare to alternatives like edit_script_lines or set_script_source, but it gives clear operational context for when to use this tool.

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