Skip to main content
Glama

search_files

Search the local memory library by keyword to find files by name or content, recursively under a chosen directory, and return root-relative paths with match details.

Instructions

Search the memory library for files by keyword: matches file names (case-insensitive substring) and, for small text files, file contents. Searches recursively under the given directory. Returns root-relative paths with a match kind (name/content) and, for content matches, the first matching line. Paths are relative to the library root (MEMDRIVE_ROOT). Omit path or pass "" to search the whole library.

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory to search under, relative to the library root. Omit or pass "" for the whole library.
keywordYesKeyword to search for (case-insensitive substring).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses matching rules (case-insensitive substring), recursion, the small-text-file caveat for content scanning, the path base (MEMDRIVE_ROOT), and the return shape including match kind and first matching line. It stops short of noting result limits, ordering, or pagination behavior, which matters for a recursive search.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, front-loaded with the core match semantics before the return format and path defaults. The final sentence largely duplicates the schema's path description, a small redundancy, but nothing else is wasted.

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 read-only, two-parameter search with no output schema, the description is nearly complete: it explains matching, scope, base path, and the return structure. The remaining gap is absence of any note on result caps or ordering when a broad search hits many files.

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 both parameters are already documented in the schema; the description largely restates them (keyword matching semantics, path resolution). It adds only the MEMDRIVE_ROOT-relative framing, so baseline 3 is correct.

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?

States a specific verb and resource ("search the memory library for files by keyword") and defines exactly what is matched: file names via case-insensitive substring and, for small text files, contents. It does not explicitly name or contrast with the sibling tools list_directory or read_file, so the verb alone has to carry the differentiation.

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?

Provides scope guidance ("omit path or pass \"\" to search the whole library") and implies usage via "searches recursively under the given directory." It never says when to prefer this over list_directory or read_file, nor when search is a poor fit (e.g. binary files, very large trees), leaving the choice to inference.

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