Skip to main content
Glama

Search theme files

search_files

Search theme files for text or regex to locate code, returning matching files with line numbers and context. Pinpoint relevant code sections without reading entire files.

Instructions

Search all text files in the theme for a string or JavaScript regex. Returns matching files with line numbers and context. Always use this to locate code instead of reading whole files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesText or regex to search for
is_regexNoTreat query as a regex (default false)
file_filterNoOnly search files whose path contains this substring, e.g. 'sections/'
max_resultsNo
include_hiddenNoAlso return matches inside disabled (hidden) sections/blocks in template JSON. Default false — hidden content is skipped.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.0

TDQS

A4.2/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 transparency burden. It clearly indicates a read-only search operation, scopes the search to text files, states the regex flavor, and discloses the return format: matching files with line numbers and context. It does not mention performance implications or default limits, but the read-only nature is clearly implied by the verb 'Search' and 'Returns.'

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?

The description is three tight sentences with no filler. It front-loads the core action and scope, describes the return value, and then gives a practical usage rule. Every sentence contributes unique value.

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?

For a search tool with five parameters and no output schema, the description covers the essential context: what is searched, what the query format is, and what the response contains. The schema covers parameter details. Minor gaps include no mention of default max_results behavior or what happens when no matches are found, but these are not critical for selecting and invoking the tool.

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 80%, so the input schema already documents most parameters well. The description adds a bit of meaning by specifying 'JavaScript regex' and by noting the return includes line numbers and context, but it does not add meaningful detail for max_results or file_filter beyond what the schema provides. This matches the baseline for high schema coverage.

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 verb and resource: 'Search all text files in the theme for a string or JavaScript regex.' It also describes the return value ('matching files with line numbers and context'), which makes the purpose specific. It distinguishes itself from read_file by explicitly saying this is for locating code rather than reading whole files.

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 gives clear usage direction: 'Always use this to locate code instead of reading whole files.' This tells the agent when to prefer this tool over traversing files directly. However, it does not explicitly name the alternative tool or state when not to use it beyond the 'instead of reading whole files' guidance.

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

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/GOFORWRD/shopify-theme-mcp'

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