Skip to main content
Glama

opencode_find_text

Read-onlyIdempotent

Search project files by text or regex pattern to locate matching lines with file paths and line numbers, enabling quick code inspection and debugging across projects.

Instructions

Search for text patterns in project files (regex supported). Returns file paths, line numbers, and matching lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesText or regex pattern to search for in files
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds that regex is supported and that results include file paths, line numbers, and matching lines, which is useful but does not disclose details like case sensitivity, default search scope, or behavior when no matches are found. No contradiction with annotations.

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?

One sentence with zero waste. The core action, scope, regex capability, and return values are all front-loaded and clearly stated.

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 a full output schema and complete parameter documentation, the description is nearly complete. It could mention case sensitivity or default directory behavior, but the annotations and schema cover the essential safety and parameter context, so nothing critical is missing.

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 the schema already documents both parameters. The description adds the regex capability and the result shape, but it does not add meaning beyond the schema for the parameters themselves. Baseline 3 is appropriate.

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 states a specific verb ('Search'), a resource ('project files'), and the key capability ('regex supported'). It also names the return payload (file paths, line numbers, matching lines), which distinguishes it from sibling search tools like opencode_find_file and opencode_find_symbol.

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?

The description implies usage for text/regex search across project files, and the sibling list shows opencode_find_file and opencode_find_symbol as alternatives, but the description does not explicitly say when to choose this tool over those siblings. It provides clear context but no exclusions or alternative routing.

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

Deploy Server

Other Tools