Call any OpenCode operation
oc_apiCall any OpenCode API endpoint by operationId or HTTP method and path, filling path parameters from params and sending remaining values as query parameters.
Instructions
Raw access to the whole OpenCode API (worktrees, MCP, credentials, integrations, web search, files, terminals, config…). Give an operationId (see oc_api_ops) or method+path. Path parameters are filled from params, the rest goes to the query string.
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": "oc_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| path | No | ||
| method | No | ||
| params | No | Path and query parameters. Objects are sent as deepObject (e.g. location: {directory: "/my/project"}). | |
| directory | No | Shortcut for params.location = {directory}. | |
| operation | No |