Skip to main content
Glama

Search Files

search_files
Read-only

Search a specific instance (by id or exact name) for files whose name matches a glob, plus files whose text contains the glob's literal part (so "**/motd" also finds files containing "motd"). Each hit's matched_by says whether its name, its content, or both matched. Names match case-insensitively, and binary files such as .jar only match by name. Leading folder names scope the search: "mods/mek" only looks inside /mods. Use this instead of walking the tree with list_files when you know roughly what a file is called or what is written in it. To search inside one known file, use read_file with contains.

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": {
      "instance": "<instance>",
      "glob": "<glob>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
globYesGlob pattern relative to the instance root, e.g. "**/*.properties" or "mods/*mekanism*". A plain string with no glob characters is matched as "**/*<value>*" inside its folder. The response echoes the folder and glob actually searched.
instanceYesInstance id (preferred) or exact instance name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true, and the description adds real behavioral detail beyond that: case-insensitive name matching, binary files (.jar) matching by name only, `matched_by` discriminating name vs content hits, and the response echoing the folder/glob actually searched. It stops short of documenting result caps, ordering, or performance limits for large trees, so it is not fully complete on behavior.

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?

Front-loads what is searched, then matching semantics, then the routing advice — the most decision-relevant material first. Every sentence carries new information (matching modes, binary caveat, scoping, alternatives); no filler or restated title.

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 no output schema, the description usefully explains the `matched_by` field callers will see, plus the echoed folder/glob. For a 2-parameter read-only tool this is nearly sufficient; only result limits, ordering, and cost on large instances are unaddressed.

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 100%, so the baseline is 3; the description still adds meaning by explaining the content-matching interpretation of the glob's literal part and by spelling out that leading folder segments scope the search ("mods/*mek*" only looks in /mods), which the schema only gestures at. The instance parameter's id-vs-exact-name guidance is largely a restatement of 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?

States a specific verb (search) plus the resource (files in an instance) and immediately enumerates the two matching modes: filename glob and literal-substring content matching. It explicitly separates itself from list_files (tree walking) and read_file (searching within one known file), so an agent can pick correctly without opening schemas.

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?

Gives an explicit when-to-use rule ("when you know roughly what a file is called or what is written in it") and names two alternatives with the conditions that select them: list_files for tree walking, read_file with `contains` for a single known file. Both a routing decision and exclusions are present.

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