session_prompt
Sends prompt text to a specified OpenCode peer session and optionally waits for the remote response; use the server argument only when multiple servers are available.
Instructions
Prompt a session on one server. Omit the server argument when exactly one server is available.
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": {
"session_id": "<session_id>",
"prompt": "<prompt>"
},
"name": "session_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Prompt text to send. | |
| server | No | Server id. Omit when exactly one server is available. | |
| allowed | No | Allow write operations (gated). | |
| wait_for | No | Wait up to this many milliseconds for the remote session to complete, then return its response. Null/omitted returns immediately. | |
| session_id | Yes | Session id on that server. |