OpenCode Info
opencode-infoRetrieve this server's configuration and OpenCode's current catalogs (models, agents, roots) without starting a session. Use it to check limits, defaults, and available resources.
Instructions
Discover this server's configuration and OpenCode's current catalogs without starting a session. section "server" (default) reports this server's version, mode, defaults and limits (maxOutputChars, maxBatchIds, output retention, request-id table size, …); "models" and "agents" list what OpenCode currently advertises for a given cwd; "roots" lists this server's allowed working-directory roots. "models"/"agents"/"roots" are paginated (offset/limit) and return a snapshot-id to keep reading the same consistent snapshot; pagination arguments are invalid for "server". Read-only; the "server" section never starts OpenCode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Only for models/agents: which OpenCode directory instance to query (same resolver as opencode's cwd). Omit to use the server default cwd. | |
| limit | No | Only for models/agents/roots: how many items to return in this page (1-100, default 50). | |
| offset | No | Only for models/agents/roots: item offset to resume a paginated read from (default 0). | |
| section | No | What to look up (default "server"): "server" for this server's version/mode/defaults/limits, "models"/"agents" for what OpenCode currently advertises, "roots" for the allowed working-directory roots. Pagination arguments (offset/limit/snapshot-id) are invalid for "server". | |
| provider | No | Only for models: restrict the list to one provider id. | |
| snapshot-id | No | Only for models/agents/roots, required once offset > 0: the id from a prior page of the same read, so pagination stays consistent with one snapshot instead of a live-changing catalog. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | No | ||
| diff | No | ||
| hint | No | ||
| kind | Yes | ||
| turn | No | ||
| agent | No | ||
| error | No | ||
| model | No | ||
| roots | No | ||
| total | No | ||
| action | No | ||
| agents | No | ||
| finish | No | ||
| models | No | ||
| offset | No | ||
| output | No | ||
| reason | No | ||
| server | No | ||
| status | Yes | ||
| tokens | No | ||
| turnId | No | ||
| cleanup | No | ||
| content | Yes | ||
| hasMore | No | ||
| partial | No | ||
| request | No | ||
| results | No | ||
| section | No | ||
| waitFor | No | ||
| readyIds | No | ||
| sessions | No | ||
| threadId | No | ||
| warnings | No | ||
| directory | No | ||
| elapsedMs | No | ||
| sessionId | No | ||
| toolCalls | No | ||
| truncated | No | ||
| nextOffset | No | ||
| observedAt | No | ||
| pendingIds | No | ||
| snapshotId | No | ||
| availability | No | ||
| filesChanged | No | ||
| resendSafety | No | ||
| responseLoop | No | ||
| upstreamRead | No | ||
| omittedFields | No | ||
| toolCallCount | No | ||
| upstreamRetry | No | ||
| executionState | No | ||
| opencodeVersion | No | ||
| pendingApprovals | No | ||
| structuredOutput | No | ||
| filesChangedCount | No | ||
| abortedRunningTurn | No | ||
| pendingApprovalCount | No | ||
| structuredOutputError | No | ||
| structuredOutputStatus | No |