opencode_session_output
Read what an opencode session did, returning the final answer or a condensed tail of recent messages with controls for message count and output size.
Instructions
READ-ONLY. Read what an opencode session did. mode "last" = the final assistant answer; "tail" (default) = the last N messages condensed (assistant text, tool calls with truncated input / result; reasoning is dropped); "full" = like tail but all fetched messages. Output is cut to max_chars from the end.
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": {
"id": "<id>"
},
"name": "opencode_session_output"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | session id (ses_...) from opencode_sessions | |
| mode | No | last | tail | full (default tail) | |
| messages | No | how many recent messages to fetch (default 12, max 200) | |
| max_chars | No | output size cap (default 6000, max 60000) | |
| tool_chars | No | chars kept of each tool input / result (default 220) |