Skip to main content
Glama

Find text in sandbox files

find_in_files
Read-onlyIdempotent

Search sandbox files for lines matching a plain-text or regex pattern to locate needed content quickly.

Instructions

Find text in sandbox files. Every line under path that contains pattern. pattern is plain text; with regex=true it is an extended regular expression. Binary files are skipped and 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": "find_in_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo/home/user
regexNo
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.7/5.0
Behavior4/5

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

The annotations already declare read-only, idempotent, non-destructive, and open-world behavior. The description adds meaningful context beyond that: binary files are skipped, symlinks are not followed, regex mode changes pattern interpretation, and file.read permission is required. It does not mention result limits, ordering, or output format, but the added behavioral details are substantial.

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 compact and front-loaded, with each sentence carrying useful information about matching semantics, file handling, or permissions. There is no redundant or filler wording.

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 search tool with annotations and no output schema, the description covers the key behavioral details: line matching, regex mode, binary/symlink handling, and permissions. It could be more complete by mentioning result ordering, limits, or whether the search is recursive under path, but the essential invocation context is present.

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 description coverage is low at 25%, with only sandboxId documented in the schema. The description compensates by explaining that pattern is plain text by default, becomes an extended regular expression when regex=true, and that matching is scoped to lines under path. This adds clear meaning beyond the schema for most parameters.

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?

The description uses a specific verb and resource ('Find text in sandbox files') and clarifies that it returns lines containing the pattern. It is clear what the tool does, but it does not explicitly differentiate itself from sibling tools such as search_files or replace_in_files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states the prerequisite 'Needs file.read' but gives no guidance on when to use this tool instead of alternatives like search_files or list_files, and no exclusions or when-not conditions.

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