{"jsonrpc":"2.0","id":2,"result":{"tools":[{"name":"opencode_request","description":"Call any OpenCode HTTP API endpoint directly. Use this for endpoints that do not have a specialist tool. The path must be relative to the configured OpenCode server (for example /session or /api/info). Authentication is added automatically. Non-2xx responses are returned as data, not as tool failures, so inspect `status`.","inputSchema":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","description":"Path beginning with '/', e.g. '/session' or '/session/ses_.../message'"},"query":{"anyOf":[{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"type":"null"}],"description":"Optional query string parameters. Repeat a key with an array of values."},"body":{"anyOf":[{},{"type":"null"}],"description":"Optional JSON request body."}},"required":["method","path"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}},{"name":"opencode_server_info","description":"Return version, process id, URLs, and paths for the connected OpenCode server.","inputSchema":{"type":"object","additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_create","description":"Create a new OpenCode session and return it. Set directory to create the session in a specific project.","inputSchema":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentID":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parent session id, for creating a subagent session."},"directory":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Absolute project directory for the new session."},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Agent id to use by default, e.g. 'build' or 'plan'."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model reference in the form 'provider/model' or 'provider/model#variant'."},"metadata":{"anyOf":[{"type":"object"},{"type":"null"}]}},"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_list","description":"List sessions, newest first by default. Supports search, pagination, and filtering by parent or directory.","inputSchema":{"type":"object","properties":{"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"order":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"search":{"anyOf":[{"type":"string"},{"type":"null"}]},"parentID":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"directory":{"anyOf":[{"type":"string"},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_get","description":"Get a session's metadata and status.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_read","description":"Read a session and its messages. This is the main tool for inspecting a conversation. Messages are returned newest first by default; pass order 'asc' for chronological order.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]},"order":{"anyOf":[{"type":"string","enum":["asc","desc"]},{"type":"null"}]},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["agent-switched","model-switched","location-switched","user","synthetic","system","skill","shell","assistant","compaction","idle"]},{"type":"null"}]}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_prompt","description":"Send a prompt to an OpenCode session. Use delivery 'queue' to wait for the current turn, or 'steer' to inject into it. This returns as soon as the prompt is accepted; use opencode_session_wait to wait for the assistant to become idle, then opencode_session_read to read the reply.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"text":{"type":"string"},"files":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"uri":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["uri"],"additionalProperties":true}},{"type":"null"}]},"agents":{"anyOf":[{"type":"array","items":{"type":"string"},"description":"Agent names to mention in the prompt."},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"},"description":"Skill ids to attach to the prompt."},{"type":"null"}]},"delivery":{"anyOf":[{"type":"string","enum":["steer","queue"]},{"type":"null"}]},"resume":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["sessionID","text"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_wait","description":"Wait until a session finishes its current turn (becomes idle).","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"timeoutSeconds":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}],"description":"Maximum time to wait. Defaults to 120 seconds."}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_interrupt","description":"Interrupt the assistant's current turn in a session.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_update","description":"Update a session's title or archived state.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_delete","description":"Permanently delete a session and its messages.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_fork","description":"Fork a session, optionally before a specific message.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"before":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Fork before this message id. Omit to fork at the end."}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_session_diff","description":"Get the file diffs produced by a session, optionally between two messages.","inputSchema":{"type":"object","properties":{"sessionID":{"type":"string"},"from":{"anyOf":[{"type":"string"},{"type":"null"}]},"to":{"anyOf":[{"type":"string"},{"type":"null"}]},"context":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]},{"type":"null"}]}},"required":["sessionID"],"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_agent_list","description":"List the agents available on the OpenCode server, optionally for a specific directory.","inputSchema":{"type":"object","properties":{"directory":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}},{"name":"opencode_model_list","description":"List the models available on the OpenCode server, optionally for a specific directory.","inputSchema":{"type":"object","properties":{"directory":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":true},"annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}}]}}
