Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
opencode_runA

Delegate a coding task to OpenCode and block until it completes, errors, or needs input (a question or a permission).

  • New task: pass directory + task + agent (a new session is created). agent is REQUIRED for a new session.

  • Continuation / resume: pass session_id (+ task for a NEW turn on that session, or task is ignored when the turn is still in flight). agent is not needed to resume an in-flight turn (it is taken from the turn's durable state); pass it only when starting a fresh turn on an existing session.

  • agent: the OpenCode agent to run as root. Free string, validated dynamically against the project's live agent list (GET /agent). It MUST be a primary agent of that directory (project-specific primary agents are preferred when they fit the task; build is the generic implementation agent; plan is read-only). Subagents are rejected as root. Do not rely on the server's default_agent: always choose explicitly for a new session.

  • model: optional 'provider/model' override.

RESUME: if session_id is given and that session still has a turn in flight (busy/retry) — e.g. the controller restarted mid-turn — the prompt is NOT resubmitted: the wait loop simply resumes on the SAME turn (task and agent are ignored in that case).

The call blocks until the turn ends. While OpenCode works, NOTHING is polled — the controller watches SSE + REST internally. If OpenCode asks a question or requests a permission, the call returns state='needs_agent_input' (kind='question' or 'permission') with everything needed to decide; answer with opencode_answer / opencode_permission, which resume the SAME turn. Returns the final assistant text + diff on completion.

opencode_answerA

Answer a pending OpenCode question (state=needs_agent_input, kind=question) and keep blocking until the turn completes, errors, or needs input again.

  • answers: ONE entry per sub-question, in order. Each entry is a string or a list of strings. When a sub-question offers options and does not allow custom answers, each value MUST be an exact option label (the server rejects anything else — this tool validates before posting).

  • The answer is posted to OpenCode and the SAME turn resumes (the prompt is never resubmitted).

  • If the question is no longer pending (already answered/consumed), an error is returned; the turn may have moved on.

opencode_permissionA

Decide a pending OpenCode permission (state=needs_agent_input, kind=permission) and keep blocking until the turn completes, errors, or needs input again.

  • reply: exactly one of 'once' (allow this call), 'always' (allow this pattern for the session), 'reject'. Decide as supervisor: allow normal actions necessary for the delegated task; reject destructive or out-of-scope requests.

  • The decision is posted to OpenCode and the SAME turn resumes (the prompt is never resubmitted).

  • If the permission is no longer pending, an error is returned.

opencode_abortA

Abort the active OpenCode session (or a specific one). Does not require the run lock, so it can stop a stuck run.

opencode_inspectA

DIAGNOSTIC ONLY: one-shot snapshot of a session (status, tree, pending permissions/questions, last assistant text). NEVER use this to poll or monitor a running task — opencode_run / opencode_answer / opencode_permission block until the turn ends; polling wastes tokens and is forbidden. Use only for exceptional diagnostics (after a timeout, or to inspect a session you did not start).

opencode_sessionsB

List OpenCode sessions for a directory (to pick a session_id to reuse).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ArthurHtr/opencode-hermes-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server