Skip to main content
Glama

script_edit

Apply exact, atomic search/replace edits to a single Roblox Studio script, requiring each old match to be unique unless all=true, while keeping changes undoable.

Instructions

Exact search/replace edits in one script (atomic, supports ~N & dots in names). Each old must match exactly once unless all=true. Undoable.

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": {
      "path": "<path>",
      "edits": "<edits>"
    },
    "name": "script_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
editsYes
studioNoOptional. Target Studio (name substring, place id or id). Only needed when several Studios are open and none was selected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does much of it: it declares atomicity, the exactly-once match contract, the all=true override for multiple matches, and undoability. It leaves unspecified what happens on a match-count failure (error vs. partial write) and whether any preconditions exist, which keeps it from a top score.

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?

Three short clauses, front-loaded with the core operation and followed by the constraints that determine correct invocation. No filler, and the safety-relevant facts (atomicity, undo, match uniqueness) appear early.

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 3-parameter edit tool with no annotations and no output schema, the description covers the critical behavioral contract an agent needs. The main residual gap is failure-mode detail and what the tool returns after a successful edit, though the latter is partly offset by "Undoable."

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

Parameters4/5

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

Schema coverage is only 33% (only studio is documented), yet the description compensates by explaining the semantics of the entire edits array: old must match exactly once, new is the replacement, all relaxes the uniqueness constraint. The path parameter's handling of "~" and dots is hinted at but not clearly stated as a path rule rather than a name rule.

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 states a specific verb and scope: "Exact search/replace edits in one script," which is clearly distinct from whole-file operations like script_write or read-only siblings like script_read/script_grep. It stops short of naming a sibling to route against, but the operation itself is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied by "exact search/replace edits" (targeted modification rather than wholesale rewriting), but there is no explicit when-to-use versus script_write, no prerequisite (e.g. read the file first), and no statement of when the tool is the wrong choice. Adequate but inference-dependent.

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