opencode-mcp

v3.1.0
opencode-mcp Checked 17 hours ago Published 1 month ago

MCP server for OpenCode coding workflows, durable async jobs, project resources, and explicit user input

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

opencode_health

Check server health and version

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_config_get

Get the current opencode configuration

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_config_update

Update the opencode configuration. Pass a partial config object with fields to update.

ParameterTypeDescription
config *objectPartial config object with fields to update
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_config_providers

List all configured providers and their default models

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_project_list

List all projects known to the opencode server

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_project_init

Initialize or open a project directory to host an independent OpenCode session. Use this to create new empty folders, or to explicitly open preexisting projects on the MCP host machine for parallel code generation workloads. This tool operates on the local filesystem; create remote server directories separately.

ParameterTypeDescription
path *stringThe absolute file path where the project directory is located or should be created.

opencode_project_current

Get the current active project

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_list

List all sessions

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_create

Create a new session. Optionally provide a parentID to create a child session, and a title.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
parentIDstringParent session ID
titlestringSession title

opencode_session_get

Get details of a specific session by ID

ParameterTypeDescription
id *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_delete

Delete a session and all its data

ParameterTypeDescription
id *stringSession ID to delete
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_update

Update session properties (e.g. title)

ParameterTypeDescription
id *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
titlestringNew title for the session

opencode_session_children

Get child sessions of a session

ParameterTypeDescription
id *stringParent session ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_status

Get status for all sessions (running, idle, etc.)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_todo

Get the todo list for a session

ParameterTypeDescription
id *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_init

Analyze the app and create AGENTS.md for a session. NOTE: This is a long-running operation that may take 30-60+ seconds depending on project size.

ParameterTypeDescription
id *stringSession ID
messageID *stringMessage ID
modelID *stringModel ID (e.g. 'claude-3-5-sonnet-20241022')
providerID *stringProvider ID (e.g. 'anthropic')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
variantstringModel variant (e.g. 'fast', 'smart')

opencode_session_abort

Abort a running session

ParameterTypeDescription
id *stringSession ID to abort
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_fork

Fork an existing session, optionally at a specific message

ParameterTypeDescription
id *stringSession ID to fork
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
messageIDstringMessage ID to fork at (optional)

opencode_session_share

Share a session publicly

ParameterTypeDescription
id *stringSession ID to share
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_unshare

Unshare a previously shared session

ParameterTypeDescription
id *stringSession ID to unshare
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_diff

Get the diff for a session, optionally for a specific message

ParameterTypeDescription
id *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
messageIDstringMessage ID (optional)

opencode_session_summarize

Summarize a session using a specified model. NOTE: This is a long-running operation that may take 30-60+ seconds.

ParameterTypeDescription
id *stringSession ID
modelID *stringModel ID (e.g. 'claude-3-5-sonnet-20241022')
providerID *stringProvider ID (e.g. 'anthropic')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
variantstringModel variant (e.g. 'fast', 'smart')

opencode_session_revert

Revert a message in a session

ParameterTypeDescription
id *stringSession ID
messageID *stringMessage ID to revert
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
partIDstringPart ID to revert (optional)

opencode_session_unrevert

Restore all reverted messages in a session

ParameterTypeDescription
id *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_permission_list

List all pending permission requests across all sessions. When a session is blocked waiting for approval (e.g. to run a shell command or access a file outside the project), it appears here. Respond with `opencode_session_permission`.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_session_permission

Respond to a permission request in a session. Use `opencode_permission_list` to see pending requests. Reply values: 'once' (approve this request only), 'always' (approve this + future matching requests for this session), 'reject' (deny the request).

ParameterTypeDescription
id *stringSession ID
permissionID *stringPermission request ID
reply *stringResponse to the permission request: 'once' to approve once, 'always' to auto-approve matching future requests, 'reject' to deny
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_message_list

List all messages in a session with formatted output showing roles and content

ParameterTypeDescription
sessionId *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
limitnumberMaximum number of messages to return

opencode_message_get

Get details of a specific message in a session

ParameterTypeDescription
messageId *stringMessage ID
sessionId *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_message_send

Send a prompt message to a session and wait for the AI response. Use parts to send text, and optionally specify a model.

ParameterTypeDescription
sessionId *stringSession ID
text *stringThe text message to send
agentstringAgent to use
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringModel ID (e.g. 'claude-3-5-sonnet-20241022')
noReplybooleanIf true, inject context without triggering AI response (useful for plugins)
providerIDstringProvider ID (e.g. 'anthropic')
systemstringSystem prompt override
variantstringModel variant (e.g. 'fast', 'smart')

opencode_message_send_async

Send a prompt asynchronously and return its messageId. Pass sessionId and messageId to opencode_wait to observe this exact turn.

ParameterTypeDescription
sessionId *stringSession ID
text *stringThe text message to send
agentstringAgent to use
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringModel ID (e.g. 'claude-3-5-sonnet-20241022')
providerIDstringProvider ID (e.g. 'anthropic')
variantstringModel variant (e.g. 'fast', 'smart')

opencode_command_execute

Execute a slash command in a session (e.g. /init, /undo, /redo)

ParameterTypeDescription
command *stringThe slash command to execute (e.g. 'init', 'undo')
sessionId *stringSession ID
agentstringAgent to use
argumentsstringArguments for the command
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
modelIDstringModel ID
providerIDstringProvider ID
variantstringModel variant

opencode_shell_execute

Run a shell command through the opencode session

ParameterTypeDescription
agent *stringAgent to use for the shell command
command *stringShell command to execute
sessionId *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
modelIDstringModel ID
providerIDstringProvider ID

opencode_find_text

Search for text patterns in project files (regex supported). Returns file paths, line numbers, and matching lines.

ParameterTypeDescription
pattern *stringText or regex pattern to search for in files
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_find_file

Find files and directories by name (fuzzy match)

ParameterTypeDescription
query *stringSearch string for file/directory names
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
limitnumberMax number of results (1-200)
searchDirectorystringOverride the project root for the search
typestringLimit results to 'file' or 'directory'

opencode_find_symbol

Find workspace symbols by name (functions, classes, variables, etc.)

ParameterTypeDescription
query *stringSymbol name to search for
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_file_list

List files and directories at a path

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
pathstringPath to list (defaults to project root)

opencode_file_read

Read the content of a file

ParameterTypeDescription
path *stringFile path to read
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_file_status

Get status for tracked files (VCS changes: modified, added, deleted, etc.)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_provider_list

List all configured providers with their connection status. Returns a compact summary — use opencode_provider_models to see models for a specific provider.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_provider_models

List available models for a specific provider. Call opencode_provider_list first to see provider IDs.

ParameterTypeDescription
providerId *stringProvider ID (e.g. 'anthropic', 'openrouter', 'google')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
limitnumberMax models to show (default 30). Use 0 for all.

opencode_provider_auth_methods

Get available authentication methods for all providers

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_provider_oauth_authorize

Start OAuth authorization for a provider

ParameterTypeDescription
providerId *stringProvider ID to authorize
inputsobjectAdditional inputs requested by the selected authentication method
methodintegerAuth method index from opencode_provider_auth_methods (default 0)

opencode_provider_oauth_callback

Handle OAuth callback for a provider

ParameterTypeDescription
callbackData *objectOAuth callback data
providerId *stringProvider ID

opencode_auth_set

Set authentication credentials for a provider (e.g. API key). Credentials are stored globally and shared across all projects.

ParameterTypeDescription
key *stringAPI key or credential value
providerId *stringProvider ID (e.g. 'anthropic')
type *stringAuth type (e.g. 'api')

opencode_path_get

Get the current working path of the opencode server

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_vcs_info

Get VCS (version control) info for the current project (branch, remote, status)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_instance_dispose

Dispose the current opencode instance (shuts it down). WARNING: This is destructive and will terminate the server.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_agent_list

List all available agents with their names, descriptions, and modes (primary/subagent)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_command_list

List all available commands (built-in and custom slash commands)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_lsp_status

Get the status of LSP (Language Server Protocol) servers

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_formatter_status

Get the status of configured formatters

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_mcp_status

Get the status of all MCP servers configured in opencode

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_mcp_add

Add an MCP server dynamically to opencode

ParameterTypeDescription
config *objectMCP server configuration object
name *stringName for the MCP server
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tool_ids

List all available tool IDs that the LLM can use (experimental)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tool_list

List tools with JSON schemas for a given provider and model (experimental)

ParameterTypeDescription
model *stringModel ID
provider *stringProvider ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_log

Write a log entry to the opencode server

ParameterTypeDescription
level *stringLog level
message *stringLog message
service *stringService name for the log entry
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
extraobjectExtra data to include in the log entry

opencode_setup

Check OpenCode status, provider configuration, and optionally initialize a project directory. Use this as the first step when starting work — it tells you what is ready and what still needs configuration.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_ask

Ask OpenCode a question in one step. Creates a new session, sends your prompt, and returns the AI response. This is the easiest way to interact with OpenCode.

ParameterTypeDescription
prompt *stringThe question or instruction to send
agentstringAgent to use (e.g. 'build', 'plan')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringModel ID (e.g. 'claude-3-5-sonnet-20241022')
providerIDstringProvider ID (e.g. 'anthropic')
systemstringOptional system prompt override
titlestringOptional title for the session
variantstringModel variant (e.g. 'fast', 'smart')

opencode_reply

Send a follow-up message to an existing session. Use this to continue a conversation started with opencode_ask or opencode_session_create.

ParameterTypeDescription
prompt *stringThe follow-up message
sessionId *stringSession ID to reply in
agentstringAgent to use
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringModel ID
providerIDstringProvider ID
variantstringModel variant

opencode_conversation

Get the full conversation history of a session, formatted for easy reading. Shows all messages with their roles and content.

ParameterTypeDescription
sessionId *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
limitnumberMax messages to return (default: all)

opencode_sessions_overview

Get a quick overview of all sessions with their titles and status. Useful to find which session to continue working in.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_context

Get full project context in one call: current project, path, VCS info, config, and available agents. Useful to understand the current state before starting work.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_wait

Wait for a session or durable job. Returns completed, failed, input_required, or a resumable timeout. Cancelling this wait stops observation; use job_cancel or session_abort to stop OpenCode.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
jobIdstringDurable job ID returned by opencode_fire or opencode_run
messageIdstringSubmitted user message ID to correlate the exact response
pollIntervalMsintegerPolling interval in milliseconds (default 2000)
sessionIdstringSession ID (required unless jobId is supplied)
timeoutSecondsnumberMaximum seconds to wait (default 120); timeout is resumable

opencode_review_changes

Get a formatted summary of all file changes made in a session. Shows diffs in a readable format.

ParameterTypeDescription
sessionId *stringSession ID
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
messageIDstringSpecific message ID to get diff for

opencode_provider_test

Quick-test whether a provider is working. Creates a temporary session, sends a trivial prompt, checks the response, and cleans up. Great for debugging auth issues.

ParameterTypeDescription
providerId *stringProvider ID to test (e.g. 'anthropic', 'openrouter')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringSpecific model ID to test. If omitted, discovers the provider default or first available model.
variantstringModel variant

opencode_run

Send a task and wait for its correlated response. Returns a durable job ID; an observation timeout leaves the remote job running and can be resumed with opencode_wait.

ParameterTypeDescription
prompt *stringTask or instruction to send to OpenCode
agentstringOpenCode agent name
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
maxDurationSecondsnumberMaximum observation duration in seconds (default 600); timeout does not abort the job
modelIDstringModel ID from provider discovery
providerIDstringProvider ID from provider discovery
sessionIdstringExisting session to continue; omit to create one
titlestringTitle for a new session
variantstringModel variant

opencode_fire

Dispatch a durable background task and return its job, session and message IDs immediately. Use opencode_check or opencode_wait to observe; job_cancel stops the task.

ParameterTypeDescription
prompt *stringTask or instruction to send to OpenCode
agentstringOpenCode agent name
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
formatResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDstringModel ID from provider discovery
providerIDstringProvider ID from provider discovery
sessionIdstringExisting session to continue; omit to create one
titlestringTitle for a new session
variantstringModel variant

opencode_check

Get current task status, pending input, todos and file counts. Uses session summary metadata instead of fetching patches. Pass jobId for exact durable turn correlation; detailed includes response text.

ParameterTypeDescription
detailedbooleanInclude response text (default false)
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
jobIdstringDurable job ID
messageIdstringSubmitted user message ID to correlate
sessionIdstringSession ID (required unless jobId is supplied)

opencode_status

Get a quick status dashboard: server health, provider count, session count, and VCS info. Lighter than opencode_setup — good for at-a-glance checks.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_append_prompt

Append text to the TUI's prompt input field

ParameterTypeDescription
text *stringText to append to the prompt
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_submit_prompt

Submit the current prompt in the TUI (equivalent to pressing Enter)

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_clear_prompt

Clear the current prompt text in the TUI

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_execute_command

Execute a slash command through the TUI (e.g. '/init', '/undo')

ParameterTypeDescription
command *stringCommand to execute (e.g. '/init')
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_show_toast

Show a toast notification in the TUI

ParameterTypeDescription
message *stringToast message text
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
titlestringOptional toast title
variantstringToast variant (default: info)

opencode_tui_open_help

Open the help dialog in the TUI

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_open_sessions

Open the session selector in the TUI

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_open_models

Open the model selector in the TUI

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_tui_open_themes

Open the theme selector in the TUI

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_events_poll

Poll project events from OpenCode, or explicitly select global scope. Collects up to maxEvents within the duration. Connection failures are reported with any partial events; stopping observation does not abort remote work.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
durationMsintegerHow long to collect events in milliseconds (default: 3000, max: 30000)
maxEventsintegerMaximum number of events to collect (default: 50, max: 1000)
scopestringEvent scope (default: project). Global events include all projects and cannot be combined with directory.

opencode_question_list

List pending OpenCode questions, optionally filtered to a session.

ParameterTypeDescription
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
sessionIdstring

opencode_question_reply

Answer an OpenCode question request. Supply one array of selected labels or free text per question.

ParameterTypeDescription
answers *array
requestId *string
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_question_reject

Reject a pending OpenCode question explicitly.

ParameterTypeDescription
requestId *string
directorystringAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

opencode_job_get

Observe a durable job by ID, including pending inputs and final results.

ParameterTypeDescription
jobId *string

opencode_job_cancel

Explicitly abort the OpenCode session owned by a job. This also stops other work in that session.

ParameterTypeDescription
jobId *string

opencode_job_list

List locally retained jobs in this OpenCode server and credential scope.

ParameterTypeDescription
limitinteger

opencode_job_input

Respond to a job's pending questions or permissions. Omit responses to request MCP forms when supported, or receive manual response instructions. Never approves automatically.

ParameterTypeDescription
jobId *string
responsesarray