Skip to main content
Glama

ruyi_search_in_sources

Search loaded JavaScript source code on a webpage for strings or regular expressions, with optional URL and case filters to pinpoint specific code.

Instructions

在页面已加载的 JS 源码中搜索字符串或正则表达式。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes搜索字符串或正则表达式
isRegexNo
pageIdxNo
urlFilterNo仅搜索 URL 含此字符串的脚本
maxResultsNo最大结果数,默认 30
caseSensitiveNo
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only restates the basic action without mentioning scope (which frames/pages), return format, result limits, or behavior when nothing matches. This is insufficient for an agent to understand side effects or expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that is front-loaded and free of fluff. However, it is so brief that it sacrifices necessary detail, making it efficient in form but not fully adequate as standalone guidance.

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

Completeness2/5

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

With no output schema and no annotations, the description is expected to cover scope, return values, and parameter behavior. It does neither, leaving important context missing for a tool with six parameters and moderate complexity.

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?

Schema description coverage is only 50%, and the description adds no meaning beyond the existing query parameter description. The parameters isRegex, pageIdx, and caseSensitive are left undocumented in both the description and schema, forcing the agent to guess from their names.

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 searches for a string or regular expression in the page's loaded JS source code. This specific verb+resource combination distinguishes it from sibling tools like ruyi_list_scripts and ruyi_get_script_source.

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 the tool is used when you need to locate a pattern within JavaScript sources already loaded in the page. However, it provides no explicit guidance on when to prefer this tool over alternatives such as fetching script sources with ruyi_get_script_source or setting breakpoints.

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/Facetomyself/ruyi-mcp'

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