Skip to main content
Glama

search_in_sources

Read-only

Search loaded JavaScript sources for a string or regex pattern, returning matching lines with script ID, URL, and line number for quick analysis.

Instructions

Searches for a string or regex pattern in all loaded JavaScript sources. Returns matching lines with script ID, URL, and line number. Use get_script_source with startLine/endLine to view full context around matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalNoOptional reverse-engineering goal for the task artifact.
queryYesThe search query (string or regex pattern).
taskIdNoOptional reverse task ID for writing durable evidence artifacts.
isRegexNoWhether to treat the query as a regular expression.
pageIdxNoBrowser page index to inspect (0-based). When omitted, uses the currently selected page.
taskSlugNoOptional reverse task slug used when opening the task artifact directory.
targetUrlNoOptional target page URL associated with the reverse task.
urlFilterNoOnly search scripts whose URL contains this string (case-insensitive).
maxResultsNoMaximum number of results to return (default: 30).
caseSensitiveNoWhether the search should be case-sensitive.
maxLineLengthNoMaximum characters per line preview (default: 150). Set to 0 for full lines.
persistResultNoPersist a single unambiguous match back into the reverse task artifact when task params are provided.
excludeMinifiedNoSkip minified files (files with very long lines). Default: true.
Behavior3/5

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

The annotation 'readOnlyHint: true' covers the safety profile. The description adds useful context on returned fields and scope, but it says 'all loaded JavaScript sources' without disclosing the default 'excludeMinified: true' behavior, which can mislead the agent into expecting minified files to be searched. This is a notable omission that lowers the score.

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 two concise sentences with no wasted words. The main action and scope are front-loaded, and the follow-up hint about get_script_source adds practical value without redundancy.

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 the tool's complexity (13 parameters) and the lack of an output schema, the description adequately explains the return value and scope. However, the 'all loaded JavaScript sources' phrasing is somewhat incomplete due to the excludeMinified default, and many filtering options are left to the schema. Still, it is sufficient for an agent to use the tool effectively.

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?

With 100% schema description coverage, every parameter already has a detailed description in the schema. The tool description adds no additional parameter-specific semantics, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('searches'), the resource ('all loaded JavaScript sources'), and the return value ('matching lines with script ID, URL, and line number'). However, it does not explicitly differentiate from the sibling tool 'search_in_scripts', so it is clear but not distinguishing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus the similar 'search_in_scripts' or other alternatives. It only suggests a follow-up action ('get_script_source') but does not state context, prerequisites, or exclusions.

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/NoOne-hub/JSReverser-MCP'

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