Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Chrrxs/robloxstudio-mcp/llms.txt

Use this file to discover all available pages before exploring further.

The script reading tools let an AI agent access the source code of every Script, LocalScript, and ModuleScript in your place without modifying anything. Use get_script_source to read a specific script, grep_scripts to search across all scripts at once with ripgrep-style result formatting, and get_roblox_docs to look up authoritative engine API documentation before generating or editing code. These three tools cover the full read side of any script-editing workflow.

get_script_source

Read the source code of any Script, LocalScript, or ModuleScript. The response always includes both source (the raw text) and numberedSource (with 1-based line numbers prepended), making it easy to reference exact positions for subsequent edits. For large scripts, the response may be truncated — check the truncated flag and the accompanying note. When a script is too large to read in full, pass line_range to read only the section you need.
instancePath
string
required
Canonical path to a LuaSourceContainer (e.g. game.ServerScriptService.RoundManager or game.ReplicatedStorage.Modules[".dir"].Combat).
line_range
string
Line range to return. Supports several formats:
  • "start-end" — e.g. "100-200" returns lines 100 through 200
  • "100-" — from line 100 to the end of the file
  • "-200" — from line 1 to line 200
  • "42" — a single line
instance_id
string
Which connected Studio place to target. Required when multiple places are connected; omit when only one is open. Use get_connected_instances to list available IDs.
Large scripts are automatically truncated. Always check the truncated field in the response. If it is true, use line_range to read the specific section you need rather than fetching the whole source at once.
-- Example: read only the first 50 lines of a long module
-- instancePath: "game.ServerScriptService.GameLoop"
-- line_range: "1-50"

-- Example: read from line 200 to the end
-- instancePath: "game.ReplicatedStorage.Shared.DataStore"
-- line_range: "200-"

-- Example: read a single line to confirm what's there before editing
-- line_range: "42"

grep_scripts

Ripgrep-inspired search across all script sources in your place. Returns results grouped by script, each with line numbers, column numbers, and optional context lines. Supports both literal text search and Lua pattern matching.
pattern
string
required
The text to search for. With usePattern: false (the default) this is a literal string. With usePattern: true it is interpreted as a Lua pattern with top-level | alternation (e.g. "foo|bar" matches any line containing "foo" or "bar").
caseSensitive
boolean
Whether literal search is case-sensitive. Defaults to false. When usePattern: true, matching is always case-sensitive; passing caseSensitive: false together with usePattern: true is rejected.
usePattern
boolean
Enable case-sensitive Lua pattern matching instead of literal string search. Defaults to false. Supports top-level alternation: "a|b" matches a line containing "a" or "b".
contextLines
number
Number of lines to include before and after each match (like grep -C). Defaults to 0.
maxResults
number
Maximum total matches before the search stops. Defaults to 100.
maxResultsPerScript
number
Maximum matches per individual script (like rg -m). Useful when a single frequently-used helper would otherwise swamp the results.
filesOnly
boolean
When true, return only the paths of scripts that contain at least one match — no line details. Defaults to false. Useful for a quick inventory before a full search.
path
string
Limit the search to a specific subtree (e.g. "game.ServerScriptService" to ignore client and shared code).
classFilter
string
Restrict results to a single script class: "Script", "LocalScript", or "ModuleScript".
instance_id
string
Which connected Studio place to target. Required when multiple places are connected.
Lua patterns are not PCRE. Common differences:
  • Use %d, %a, %w for digit/letter/word classes (not \d, \w)
  • Use .- for non-greedy repetition (not .*?)
  • Magic characters are: . % + - * ? [ ] ^ $ ( ) — escape them with %
  • There is no \n in a line-by-line search; patterns are matched per line
-- Example 1: find every call to a deprecated function (literal)
-- pattern: "game:GetService(\"Players\").LocalPlayer"
-- path: "game.StarterPlayerScripts"

-- Example 2: find all RemoteEvent :FireServer calls (Lua pattern)
-- pattern: ":FireServer"
-- usePattern: true
-- classFilter: "LocalScript"

-- Example 3: find scripts that use either of two old API names
-- pattern: "LoadLibrary|LoadAsset"
-- usePattern: true
-- filesOnly: true

-- Example 4: search with 2 lines of context around each match
-- pattern: "error("
-- contextLines: 2
-- maxResults: 50

get_roblox_docs

Fetch official Roblox engine API documentation from create.roblox.com as markdown. Returns descriptions, properties, methods, events, and code samples for any class, enum, datatype, Luau library, or global. Results are cached, making repeat lookups cheap. Call this tool before writing or editing any code that uses an engine class you are not fully certain about. The page includes the exact property types, method signatures, and event payloads needed to write correct Luau on the first attempt.
name
string
required
Exact PascalCase name of the class, enum, datatype, or library (e.g. "ProximityPrompt", "KeyCode", "CFrame", "TweenService", "table").
doc_type
string
Documentation category. One of classes (default), enums, datatypes, libraries, or globals.
section
string
Optional ##-level section to read instead of the entire page. Examples: "Properties", "Methods", "Events", "Code Samples". Very large pages are automatically truncated with a section index; use this parameter to read a truncated section in full.
Always call get_roblox_docs before writing code that uses an engine class you haven’t verified. Even familiar classes like TweenService or RemoteEvent have edge-case method signatures and deprecation notes that the docs make explicit. The cache means the second call to the same page is effectively free.
-- Example: look up TweenService before writing a tween
-- name: "TweenService", doc_type: "classes"

-- Example: look up all Enum.KeyCode values
-- name: "KeyCode", doc_type: "enums"

-- Example: look up CFrame constructors and methods
-- name: "CFrame", doc_type: "datatypes", section: "Methods"

-- Example: look up the Luau table library
-- name: "table", doc_type: "libraries"

Build docs developers (and LLMs) love