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
| Name | Required | Description | Default |
|---|---|---|---|
| dirs | No | Include directories in results (files action only) | |
| query | No | Search query (required for files/symbols) | |
| action | Yes | ||
| pattern | No | Search pattern (required for text) | |
| directory | No | Override search root directory |