Skip to main content
Glama

Start search

start_search

Use this when the user wants to find filenames or perform a content search under a path and does not need every matching file read in full. Use read_files instead when a glob is already known and the contents of every matched file are the desired result. Starts a search session and returns the first matches.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the directory or file to search.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
patternYesRegular expression for content searches, or a glob such as "*.ts" when searchType is files.
ignoreCaseNoCase-insensitive content matching.
maxResultsNoStop the search after this many results. Default 200.
searchTypeNoSearch file contents (default) or file names.
filePatternNoOptional relative glob that limits which files are searched, such as "*.ts".
contextLinesNoNumber of context lines to return around each content match, up to 10.
includeHiddenNoInclude hidden files and directories.
literalSearchNoTreat the pattern as literal text instead of a regular expression.
includeIgnoredNoAlso search directories normally skipped, such as node_modules, dist, build, and virtualenvs.

Output Schema

NameRequiredDescriptionDefault
dataNoOptional structured result data for follow-up reasoning and tool calls.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations provide little guidance since all hints are false. The description does disclose that the tool starts a persistent search session and returns only first matches, but it does not mention session lifecycle concerns or how to retrieve further results, relying on sibling tools for that 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?

Three sentences with no wasted words. The usage guidance and primary behavior are front-loaded, and the sibling distinction is placed directly after the purpose statement.

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?

With a full input schema and an output schema present, the description covers the key contextual needs: when to use the tool, what it does, and how it differs from read_files. It could additionally mention get_more_search_results or stop_search for session follow-up, but that is not required for initial invocation.

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 every parameter thoroughly. The description adds no parameter-specific semantics beyond the schema, which meets the baseline but does not exceed it.

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 starts a search session to find filenames or perform content searches under a path, and that it returns the first matches. It also distinguishes itself from read_files by explicitly naming the alternative and its different purpose.

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?

The description gives explicit when-to-use guidance: use this when the user wants to find filenames or content search and does not need every matched file read in full. It also names read_files as the alternative when a glob is already known and file contents are desired.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources