Skip to main content
Glama
Context Budget Engine
by sivram04

search_smart

Run regex searches under a folder and return file:line:text matches while skipping caches and binaries, keeping context compact and relevant.

Instructions

Regex search under a folder: returns file:line: text, skipping caches and binaries.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "root": "<root>",
      "pattern": "<pattern>"
    },
    "name": "search_smart"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootYes
patternYes
max_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it only partially discharges it. It usefully discloses two behavioral traits beyond the schema: output formatting as file:line: text and automatic exclusion of caches and binaries. However, it says nothing about the regex flavor supported, case sensitivity, whether hidden/vendored files are included, how results are truncated, or error behavior on an invalid pattern or missing root — all material for an unannotated tool.

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?

A single dense sentence with the operation front-loaded and no filler; every clause (regex, folder scope, return format, exclusions) adds information. Nothing could be cut without losing meaning.

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?

The output schema exists, so return values need only be sketched, which the description does. But for an unannotated tool with zero schema parameter coverage, it leaves the agent guessing on regex syntax, max_results semantics, and result-limiting behavior — gaps that matter for getting the call right the first time.

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 0%, so the description must compensate, and it only loosely does: "under a folder" hints at root and "regex" hints at pattern, but max_results (default 40) is never mentioned and neither the regex dialect nor expected path format is clarified. Two of three parameters carry real ambiguity that neither schema nor description resolves.

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 names a specific operation and scope: regex content search under a given folder root, and even states the result shape (file:line: text). It is clear what the tool does and what it returns, but it offers no differentiation from siblings like read_smart or log_smart, leaving the agent to infer that those are not search tools.

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?

"Regex search under a folder" implies the use case (finding pattern matches in file contents) but there is no explicit when-to-use, when-not, or named alternative. The agent must infer that this is the grep-like tool rather than file-reading tool, with no stated exclusions or preconditions.

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

Deploy Server

Other Tools