Skip to main content
Glama

Grep across a site's files

search_files
Read-onlyIdempotent

Search for a literal string or basic regex across all files in either the served dist or the editable source tree. Use this BEFORE batch-reading files to find candidates — saves the 'read 14 batches just to find which 3 files matter' round trip. Pass target: "source" to search the editable tree (requires Site.sourceStored=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoFilename glob filter, e.g. '*.js' or '*.{js,html}'. Applied via find before grep so we don't read non-matching files.
nameNo
regexNoWhen true, the pattern is interpreted as a basic regular expression. Default: false (literal substring match).
siteIdNo
targetNoWhere to search. 'dist' (default) searches the served files. 'source' searches the editable source tree (requires Site.sourceStored=true).
patternYesPattern to search for. Treated literal by default; pass regex:true to use as a basic regex (BusyBox grep BRE — no PCRE features).
maxMatchesNoCap on returned matches. Default 200, hard max 1000. Truncation is reported via budgetExceeded.
caseInsensitiveNoDefault: false. When true, adds -i to grep.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
siteIdYes
targetYes
matchesYes
request_idNoServer-assigned request correlation id. Quote it when contacting support.
totalMatchesYes
budgetExceededYesTrue if the search hit maxMatches and there are likely more matches not returned.

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only and idempotent. Description adds valuable behavioral details: regex limitations (BusyBox grep), match cap with budgetExceeded reporting, and glob filtering mechanism. No contradictions.

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, front-loaded with key action, no fluff, each sentence adds value. Highly concise and well-structured.

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?

Given the complexity (8 parameters, 1 required) and presence of output schema (not shown but assumed), the description covers purpose, usage, key parameters, and behavioral traits. Complete for a read-only search tool.

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

Parameters4/5

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

Schema coverage is 75%, but description adds meaning beyond schema: for target, it mentions the requirement for sourceStored; for pattern, explains literal vs regex; for maxMatches, gives default, cap, and truncation behavior; for caseInsensitive, says adds -i. Some parameters like siteId lack extra context, but overall adds value.

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?

Clearly states the tool does a grep search across files, specifying literal or regex, and distinguishes from sibling read tools by emphasizing it's for finding candidates before reading.

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?

Explicitly advises using this before batch-reading to avoid wasted round trips. Also clarifies when to use target: 'source' vs 'dist'. Could be improved by mentioning when NOT to use, but overall clear.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose, from deployment and file management to domain configuration and analytics. Even similar-sounding tools like add_files and add_file_chunk are well-differentiated by context and use case.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (e.g., add_custom_domain, list_sites, delete_source_file). The naming is predictable and easy to understand.

Tool Count4/5

39 tools is higher than the typical 3-15 range, but each tool serves a necessary function for a comprehensive deployment platform. The count is justified by the broad feature set, though slightly heavy.

Completeness5/5

The tool set covers the full lifecycle of site deployment, management, backup, custom domains, form handling, analytics, and source editing. There are no obvious gaps for the intended functionality.