Skip to main content
Glama
EL4CTEO

Roblox Studio MCP

Search script source

script_grep
Read-onlyIdempotent

Search Luau source to find where a symbol or pattern occurs, returning paths and line numbers. Locate code to edit without reading whole scripts.

Instructions

Searches inside Luau source across the place and returns matching lines with their paths and line numbers.

Use this to find where something is defined or used before editing it — it is far cheaper than reading whole scripts to look for one call.

Patterns are Lua patterns, which are not regular expressions: % escapes instead of backslash, there is no alternation, and - means a lazy quantifier. Set literal to search for text exactly as written, which is usually what you want for identifiers.

Matches come from the script editor's live buffer, so unsaved edits are searched too.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoLimit to this subtree, e.g. "ServerScriptService". Omit to search everywhere.
limitNoMaximum items to return (1-500).
cursorNoOpaque cursor from a previous call's `nextCursor`. Omit for the first page.
literalNoTreat `pattern` as plain text rather than a Lua pattern.
patternYesLua pattern, or exact text when `literal` is set, e.g. "PlayerAdded".
studioIdNoTarget Studio; omit for the active one.
classNameNoRestrict to one script class: "Script", "LocalScript" or "ModuleScript".
ignoreCaseNoCase-insensitive. Both sides are lowercased, so pattern classes like %u stop being meaningful — combine with `literal`.
contextLinesNoLines of context to show either side of each match.
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so the description doesn't need to repeat those safety attributes. The description adds valuable behavioral detail about the live buffer ('unsaved edits are searched too') and the return format (matching lines with paths and line numbers), enhancing transparency beyond the annotations.

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 and well-structured: it opens with the core function, then explains when to use it, clarifies the pattern vs. literal distinction, and closes with the live buffer behavior. Each sentence contributes unique useful information without redundancy, and the flow is logical.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (9 parameters, no output schema), the description covers all essential aspects: the return format, the search scope, the pattern semantics, and a key behavioral caveat (live buffer). Combined with the thorough schema descriptions, it provides enough context for an agent to correctly invoke the tool without missing critical details.

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

Parameters5/5

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

The schema provides 100% coverage of parameters with descriptions, and the description supplements this by explaining the nuance of Lua patterns (e.g., `%` escaping), the behavior of `ignoreCase` when combined with pattern classes, and the recommendation to use `literal` for identifiers. This goes beyond simply restating the schema.

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: searching inside Luau source across the place and returning matching lines with paths and line numbers. It uses specific verbs (searches, returns) and specifies the resource (script source). It also implicitly differentiates from sibling tools like 'find' or 'inspect' by focusing on script source content.

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 advises when to use the tool: 'find where something is defined or used before editing it' and contrasts it with reading whole scripts. It also provides practical guidance on using Lua patterns vs. literal search and the `literal` parameter for identifiers, which is actionable and clear.

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/EL4CTEO/rbx-studio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server