Skip to main content
Glama

opencode_find

Search codebase by text, file names, or symbols to understand project structure before delegating tasks to AI coding agents.

Instructions

Search the codebase through OpenCode. Use 'text' to grep file contents, 'files' to find files by name, 'symbols' to find code symbols (functions, classes, etc). Useful for understanding the codebase before sending tasks to the agent.

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": {
      "action": "<action>"
    },
    "name": "opencode_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirsNoInclude directories in results (files action only)
queryNoSearch query (required for files/symbols)
actionYes
patternNoSearch pattern (required for text)
directoryNoOverride search root directory

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It conveys that this is a read-only search and distinguishes per-action behavior via the mode list, but says nothing about return shape, result limits, ordering, or whether search roots are constrained — meaningful gaps for an ungated tool.

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?

Front-loaded with the action verb and immediately followed by the mode breakdown, so the most decision-relevant information comes first. It is short with no filler, though the trailing 'useful for' sentence is soft framing rather than concrete guidance.

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 5-parameter, no-output-schema, no-annotation search tool, the description covers what the tool does and which modes exist, which is the core an agent needs to invoke it. Missing coverage of result format and cross-sibling routing keeps it short of complete.

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 80% and the schema already documents that 'pattern' is required for text and 'query' for files/symbols, so the description's mode-to-parameter mapping largely restates structured data. It adds no syntax hints (regex support, path formats) for 'directory' or 'dirs', which the schema also leaves thin.

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 codebase through OpenCode') and enumerates the three search modes (text/files/symbols), so an agent knows exactly what the tool does. It does not differentiate against siblings such as opencode_file, but the mode taxonomy makes the purpose unambiguous on its own.

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?

'Useful for understanding the codebase before sending tasks to the agent' gives an implied usage context, so the agent can infer this is a pre-task exploration tool. There is no explicit when-not guidance and no named alternative for cases like reading a single known file, which would be the natural sibling to route to.

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