Skip to main content
Glama
code-and-relax

Roblox Studio MCP Server

set_script_source

Replace the entire source code of a Roblox script at a given instance path. Works with open editors; use line editing tools for partial updates.

Instructions

Replace the entire source code of a Roblox script. Uses ScriptEditorService:UpdateSourceAsync (works with open editors). For partial edits, prefer edit_script_lines, insert_script_lines, or delete_script_lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesNew source code for the script
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. It discloses the underlying service (ScriptEditorService:UpdateSourceAsync) and notes it works with open editors, which is useful. However, it omits details about reversibility, permissions, or failure modes, and the open-editor requirement is somewhat vague, so transparency is adequate but not comprehensive.

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, front-loaded with the main action and followed by implementation detail and usage guidance. Every sentence contributes value, with no redundant information.

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 simple write tool with 2 parameters and no output schema, the description covers purpose, alternatives, and a behavioral constraint. It could provide more detail on error conditions or prerequisites, but overall it's reasonably 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 schema provides descriptions for both parameters (instancePath and source) with 100% coverage. The tool description adds no additional parameter semantics, so it earns the baseline score of 3.

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 the entire source code of a Roblox script, using a specific verb ('Replace') and resource. It also distinguishes itself from partial-edit siblings by explicitly mentioning alternatives for partial edits, making its scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to prefer edit_script_lines, insert_script_lines, or delete_script_lines for partial edits, providing clear when-to-use and when-not-to-use guidance. It also mentions the tool works with open editors, offering contextual information about applicable scenarios.

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