Skip to main content
Glama

search_in_sources

Search JavaScript source code for specific strings or patterns to locate code segments during debugging and analysis of WeChat MiniApps.

Instructions

Searches for a string or regex pattern in all loaded JavaScript sources. Returns matching lines with script ID, URL, and line number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
case_sensitiveNo
is_regexNo
max_resultsNo
max_line_lengthNo
exclude_minifiedNo
url_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what gets returned (matching lines with metadata) but doesn't cover important behavioral aspects like whether this is a read-only operation, potential performance impact of searching 'all loaded JavaScript sources', whether results are paginated or limited, or any rate limits. The description provides basic output format but lacks operational context.

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 perfectly concise with two sentences that each earn their place: the first states the action and scope, the second specifies the return format. No wasted words, well-structured, and front-loaded with the core functionality.

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

Completeness3/5

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

Given the tool has an output schema (which presumably documents the return structure), the description doesn't need to detail return values. However, for a search tool with 7 parameters and no annotations, the description is incomplete - it doesn't address parameter usage, behavioral constraints, or provide sufficient context for effective tool selection versus siblings. It covers the basic purpose well but leaves significant gaps.

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

Parameters2/5

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

With 0% schema description coverage and 7 parameters, the description provides no information about any parameters beyond what's implied by the tool name ('search' suggests a query parameter). It doesn't explain what 'max_results', 'exclude_minified', 'url_filter', or other parameters do, leaving significant gaps in understanding how to effectively use the tool.

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 for a string or regex pattern'), target resource ('in all loaded JavaScript sources'), and output format ('Returns matching lines with script ID, URL, and line number'). It distinguishes from siblings like 'list_scripts' (which lists without searching) and 'get_script_source' (which retrieves specific 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 Guidelines3/5

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

The description implies usage for searching within JavaScript sources, but provides no explicit guidance on when to use this tool versus alternatives like 'list_scripts' for browsing or 'get_script_source' for retrieving specific content. It mentions 'all loaded JavaScript sources' which gives some context scope, but lacks when-not-to-use scenarios or prerequisite information.

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/zhizhuodemao/miniapp-cdp-mcp'

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