Skip to main content
Glama

opencode_find_file

Read-onlyIdempotent

Locate files and directories by name using fuzzy matching. Specify a search query, optionally filter by file or directory type, and set a limit for results.

Instructions

Find files and directories by name (fuzzy match)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoLimit results to 'file' or 'directory'
limitNoMax number of results (1-200)
queryYesSearch string for file/directory names
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
searchDirectoryNoOverride the project root for the search

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, destructiveHint=false. The description adds the fuzzy-match behavior and clarifies the search-scope distinction between directory and searchDirectory. No contradictions 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.

Conciseness4/5

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

The description is a single sentence that is front-loaded with the essential purpose. It's appropriately minimal, though it could arguably mention the fuzzy-match behavior more explicitly as the key differentiator.

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?

Given the output schema exists, annotations cover safety, and all parameters are documented in the schema, the description is complete enough. It could add a note about how searchDirectory relates to directory, but the schema already covers this. Complexity is low; an agent can invoke this correctly.

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 documents all parameters. The description adds the fuzzy-match semantics that apply to query. The directory parameter is already well-documented in the schema with its fallback behavior.

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 states a clear verb and resource: 'Find files and directories by name (fuzzy match)'. It distinguishes from siblings like opencode_find_text and opencode_find_symbol by focusing on file/directory names, though it doesn't explicitly name those alternatives.

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

Usage Guidelines4/5

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

The description implies when to use this tool: when searching for files/directories by name. It doesn't explicitly exclude alternatives like opencode_find_text or opencode_find_symbol, but the fuzzy-match-by-name phrasing is clear enough context for an agent to select it.

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