opencode_log
Log service events with a specified level, message, and optional extra data to the OpenCode server, enabling debugging and monitoring across projects.
Instructions
Write a log entry to the opencode server
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": {
"service": "<service>",
"level": "<level>",
"message": "<message>"
},
"name": "opencode_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| extra | No | Extra data to include in the log entry | |
| level | Yes | Log level | |
| message | Yes | Log message | |
| service | Yes | Service name for the log entry | |
| 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 |