opencode_find_text
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.
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": {
"pattern": "<pattern>"
},
"name": "opencode_find_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Text or regex pattern to search for in files | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |