Resolve workspace directory
opencode_workspaceReport the working directory OpenCode sessions will use, show where that setting came from, or persist a new default before creating a session.
Instructions
Report which directory sessions will use, where that choice came from (argument, MCP roots, env, config, cwd), or persist a new default. Use this before creating a session when you are unsure about the working directory.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "opencode_workspace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Default: info | |
| directory | No | Absolute path (required for set-default) |