Skip to main content
Glama

search_scripts

Search Roblox Studio script sources for plain text or Lua patterns, returning matching paths with line numbers and matching line text.

Instructions

Search the source of all scripts under searchIn for a plain-text (or Lua pattern) query. Returns matching script paths with line numbers and line text.

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": {
      "query": "<query>"
    },
    "name": "search_scripts"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesText to search for
clientNoTarget a specific Studio client by name (as shown on the panel, e.g. "studio"). Omit to auto-pick: the only active client, or the most recently active one when several are connected.
patternNoTreat query as a Lua pattern instead of plain text (default false)
searchInNoPath to root for search. Default: game
maxResultsNoMax matching lines to return (default 100)
caseSensitiveNoCase-sensitive match (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
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 does disclose the result format and the default-result cap behavior implicitly ('matching script paths with line numbers'), which is genuinely useful. It does not state that a live Studio client connection is required (only the parameter schema hints at clients), nor whether the search is read-only, how expensive a full-game search is, or what happens when no client is connected.

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?

Two sentences, front-loaded with the action and scope, then the return value. No redundant or filler wording; every clause adds 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?

There is no output schema, and the description compensates by describing the returned fields (paths, line numbers, line text). For a six-parameter tool it covers the essentials, though it omits the client-connection prerequisite and truncation/ordering behavior that would matter at the default maxResults cap.

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?

Schema coverage is 100%, so every parameter already carries its own description, and the description only echoes the pattern-vs-plain-text distinction and the searchIn root. Baseline 3 applies because the schema does the heavy lifting and the description adds no syntax or format detail beyond it.

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 gives a specific verb (search), an explicit resource (source of all scripts under searchIn), and a scope that separates it from single-script siblings like read_script or check_script. It also states the return shape (matching script paths with line numbers and line text), so an agent knows exactly what it gets back.

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 only implied: the query types (plain text vs Lua pattern) and the default root (game) are stated, but there is no explicit guidance on when to choose this over find_instances or read_script, nor any exclusion such as 'use read_script to read a whole file'. An agent must infer the choice from the scope wording.

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