All docs pages Tools and undo, 6 of 13

Docs / Using Shard

What Shard can do in your place

Shard doesn’t just talk: it has tools that act in Studio for you. The AI decides which tools to use. Every tool call shows up as a row in the chat, so you can see exactly what happened.

All tools work in edit mode, on the place you have open. Shard pauses while you playtest (see Playtesting).

Reading and searching#

ToolWhat it does in plain words
ReadScriptsReads scripts, including edits you haven’t saved yet. It reads whole scripts unless the AI asks for a part.
InspectPathLooks at objects: their children, properties, attributes and tags.
SearchCodeSearches the text of your scripts, like Find in All Scripts.
SearchObjectsFinds objects by name, class, tag or attribute.
GetStudioStateChecks what you have selected, which scripts are open, and whether Studio is in edit or play mode.
GetOutputReads messages from the Output window (prints, warnings, errors).

Shard doesn’t see your selection or open scripts automatically. When you say “this part” or “the script I have open”, Shard uses GetStudioState to check.

Changing your place#

ToolWhat it does in plain words
EditScriptsChanges existing scripts, or creates a new Script, LocalScript or ModuleScript.
ApplyInstanceChangesCreates objects, or changes their properties, attributes and tags.
RunCodeRuns a piece of Luau code in Studio, for jobs the other tools can’t do.

EditScripts#

  • Shard must read a script before it edits it.
  • If the script changed since Shard read it (for example, you typed in it), the edit is refused and Shard reads it again. Your work is never overwritten by an old copy.
  • Shard can change one spot, several spots, or rewrite a whole script. Replacing a whole script needs a complete read first.
  • Shard can create new scripts, and choose their RunContext (Legacy, Server or Client).
  • One tool call can change several scripts. If one change fails, the ones after it are skipped. The row shows which were applied.

ApplyInstanceChanges#

  • Create a new object under a parent, or update an existing one.
  • Set properties, attributes and tags. Supported values: numbers, text, true/false, Vector3, Color3, CFrame, UDim2 and Enum items.
  • It can’t delete, rename or move objects, and it can’t set other value types (like Vector2 or UDim). Shard uses RunCode for those.
  • Scripts are created with EditScripts, not here.
  • If Shard retries the same change in one task, it doesn’t create a duplicate.

RunCode#

RunCode runs Luau code in edit mode, with the same access a Studio plugin has.

What it can do:#

  • Anything a plugin script can do to your place: build or delete many objects at once, move and rename things, set any property, read values and report them back.
  • Report results: the code’s log(...) output and its return value come back to Shard, including errors and a traceback.

What it can’t do:#

  • It doesn’t run your game. There are no players, no LocalPlayer and no character, and your scripts are not running. It can’t prove a gameplay feature works. For that, you need to playtest.
  • It can’t reach Shard. The code runs in its own module, away from Shard’s plugin, your login and your API keys.
  • It can’t run forever. The default time limit is 120 seconds. Shard can ask for more for long jobs, but never less. The limit only works when the code pauses now and then (for example with task.wait()). A loop that never pauses keeps going past the limit and can make Studio stop responding.

If RunCode fails or you press Stop, some changes may already have happened. Shard is told to check before it tries again.

Web and skills#

ToolWhat it does in plain words
BrowseWebLooks things up online. RobloxDocs searches the official Roblox documentation. Search does a web search. Scrape reads one web page.
LoadSkillLoads a built-in skill: a step-by-step workflow for a kind of task, like physics or UI.

Shard treats web pages as information, not as instructions to follow. Web Search and Scrape count toward your web-browse limit; RobloxDocs doesn’t. See Limits and quotas.

When agents are on, Shard also has tools to run a team. See Agents.

Undo with Ctrl+Z#

Every change Shard makes goes into Studio’s undo history:

  • each EditScripts call is one step, named “Shard: edit scripts”;
  • each ApplyInstanceChanges call is one step, “Shard: change instances”;
  • each RunCode call is one step, “Shard: run code”.

Press Ctrl+Z (or Edit → Undo) to step back. One answer from Shard can contain several steps, so you may need to press it more than once. The Review section of the chat reminds you of this.

Undo only covers changes to your place. It can’t take back anything RunCode did outside it, like a web request.

If Studio is already recording another change, the tool fails with “Another Studio operation is recording changes.” Try again.

Things Shard won’t touch#

  • Shard itself. Shard can’t search, edit or change its own plugin.
  • Your running game. Shard doesn’t press Play, and its tools don’t work during a playtest.