Skip to main content
Glama

search_scripts

Find specific code patterns in cached browser scripts to identify breakpoint locations for debugging Chromium-based applications.

Instructions

Searches all cached script sources for a text pattern and returns matching locations (line and column numbers). Side effects: none (read-only query). Prerequisites: scripts must have been parsed and cached by the debugger. Returns: JSON array of matches with script ID, line/column numbers, and line preview. Use this to locate code before setting breakpoints. Alternatives: 'set_breakpoint' for direct breakpoint placement, 'evaluate_js' for runtime code discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesText pattern or special command to search for. Constraints: non-empty string (empty string returns cached script count). Interactions: '@source' returns first 1000 chars of each script; 'debug' returns script lengths and errors. Defaults to: None (required).
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: it discloses side effects ('none (read-only query)'), prerequisites ('scripts must have been parsed and cached by the debugger'), and return format ('JSON array of matches with script ID, line/column numbers, and line preview'), though it lacks details on rate limits or error handling.

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 front-loaded with core purpose, followed by structured details (side effects, prerequisites, returns, usage, alternatives) in a logical flow. Every sentence adds essential information with zero waste, making it highly efficient and well-organized.

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?

Given no annotations and no output schema, the description compensates well by covering purpose, usage, behavior, and returns. However, it could be more complete by detailing error cases or performance aspects, slightly reducing completeness for a tool with rich functionality.

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 description coverage is 100%, so the schema already documents the 'query' parameter thoroughly. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline of 3 for high schema coverage without extra value.

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 specific action ('Searches all cached script sources for a text pattern') and resource ('cached script sources'), distinguishing it from siblings like 'set_breakpoint' and 'evaluate_js' by focusing on pre-runtime code location rather than breakpoint setting or runtime discovery.

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?

It explicitly provides when to use ('to locate code before setting breakpoints'), when not to use (implied by alternatives), and names specific alternatives ('set_breakpoint' for direct breakpoint placement, 'evaluate_js' for runtime code discovery'), offering clear guidance on tool selection.

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/raultov/chrome-debug-mcp'

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