Skip to main content
Glama

source_search

Search every loaded script and source-map original file for a string or regex, returning the file, line, and matching line to locate handlers when the file is unknown.

Instructions

Search the text of every loaded script — and every original file recoverable from source maps — for a string or regular expression. This is the fastest way to locate a handler when you know a function name, a message or a field name but not the file. Returns file, 1-based line and the matching line.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesText or regular expression to find.
regexNoTreat query as a regular expression.
url_filterNoOnly search scripts whose URL contains this.
ignore_caseNoCase-insensitive search.
max_resultsNoStop after this many matches.
context_charsNoCharacters of the matching line to return.
include_original_sourcesNoAlso search original files from source maps.
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It reveals that search covers both loaded scripts and source-map-recoverable original files, and specifies the return shape: file, 1-based line, and matching line. It does not discuss regex failure modes or result limits in prose, but the read-only nature is clear and the schema covers result-limiting parameters.

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 tightly written sentences: the first conveys action and scope, the second gives the use case and return values. Every sentence earns its place, and the most important operational detail (search scope) is front-loaded.

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

Completeness5/5

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

For a search tool with fully documented parameters, the description supplies the missing context: the intended use case, the source scope, and the output. Even without an output schema or annotations, an agent has enough information to decide when to invoke it and what to expect back.

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 baseline is 3 and the description does not need to repeat parameter details. It adds only minor semantic reinforcement by mentioning that the query can be a string or regular expression, which is already reflected in the schema.

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 names a specific verb ('Search'), the exact resource ('text of every loaded script...and every original file recoverable from source maps'), and the accepted input ('string or regular expression'). It clearly differentiates this search tool from sibling list/get source tools by emphasizing discovery when the file is unknown.

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

Usage Guidelines4/5

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

The description explicitly states when to use this tool: 'fastest way to locate a handler when you know a function name, a message or a field name but not the file.' It implies alternatives like source_get_script or source_get_file when the file is known, though it does not name them explicitly or list exclusions.

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

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/Dayananda-D/Devcdp'

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