Skip to main content
Glama

Search files by name in a sandbox

search_files
Read-onlyIdempotent

Search sandbox files and directories by name using a glob pattern and optional path to find matching entries; symlinks are not followed and file read permission is required.

Instructions

Search files by name in a sandbox. Every file and directory under path whose name matches the glob pattern (for example *.py). Symlinks are not followed. Needs file.read.

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": {
      "sandboxId": "<sandboxId>",
      "pattern": "<pattern>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo/home/user
patternYes
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely non-obvious traits beyond that: recursion over everything under `path`, glob matching semantics with an example, the fact that symlinks are not followed, and the required `file.read` permission.

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 short sentences, front-loaded with the action, then semantics, then the edge case (symlinks) and the permission requirement. Every sentence carries information; nothing is redundant with the schema or annotations.

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 three-parameter read-only search with no output schema, the definition covers the matching rule, scope, symlink behavior, and auth requirement. The main remaining gap is return shape (e.g. list of paths, ordering, depth limits), which the absence of an output schema would otherwise make worth stating.

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 coverage is only 33% (only sandboxId is documented), so the description must compensate. It does explain `pattern` as a glob with a concrete `*.py` example and `path` as the recursion root, but leaves `path`'s default and the sandboxId format to the schema, and says nothing about whether results are absolute vs relative to `path`.

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 files by name in a sandbox', and the second sentence pins the semantics to name/glob matching rather than content matching, which implicitly separates it from find_in_files. It does not name a sibling or an alternative explicitly, so it stops short of a 5.

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?

Usage is only implied: an agent can infer this is for name-pattern lookups rather than content search, but there is no explicit when-to-use, when-not-to-use, or named alternative such as find_in_files or list_files. The 'Needs `file.read`' note is a prerequisite, not selection guidance.

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