Skip to main content
Glama
Claude Code × OpenCode

Claude Code × OpenCode

by AXLdev123

Send a message to a session

oc_send

Send follow-up messages, slash commands, or skills to an existing OpenCode session and wait for the answer, or start the task in the background.

Instructions

Send a follow-up message (or a slash command, or skills) to an existing OpenCode session, then wait for the answer.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>",
      "message": "<message>"
    },
    "name": "oc_send"
  }
}

Input Schema

NameRequiredDescriptionDefault
waitNotrue (default): wait for the end and return the result. false: start in the background and return the session_id.
agentNoPrimary OpenCode agent (build, plan, general, or a custom agent). See oc_catalog what=agents.
filesNoFile paths (or URIs) to attach to the message.
modelNoModel: "provider/model", "provider/model#variant" (e.g. "opencode/claude-sonnet-5-5#high") or just an id/name ("deepseek-v4.1-flash-free"). Empty = OpenCode's default model.
agentsNoSub-agents to mention (@agent) in the message.
detailNofinal = answer only; summary (default) = answer + tools + files; full = complete transcript of the turn.
skillsNoIds of OpenCode skills to attach to the message (see oc_catalog what=skills).
commandNoOpenCode slash command to run instead of a free prompt (e.g. "review", "init"). `task` then becomes its arguments.
messageYesMessage text (or the command's arguments).
deliveryNoIf the session is already running: steer = inject now, queue = after the current turn.
timeout_sNoMax wait in seconds (default 900). Past it, the task keeps running and oc_wait picks it up.
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose the important blocking behavior ('then wait for the answer'). It does not state what happens on an invalid session_id, whether the message mutates session history irreversibly, or how the timeout/background fallback behaves — that detail lives only in the schema's timeout_s text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler, and the blocking consequence is placed last where it is most useful. It is terse to the point of being thin for a 12-parameter tool, but nothing in it is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Core action and blocking semantics are covered, and the rich schema carries parameter detail, but with no annotations and no output schema the definition should say more about failure modes, session-state effects, and how the wait/timeout interacts with siblings like oc_wait and oc_result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 92%, so per-parameter meaning is already well documented (wait, detail, delivery, command, model, etc.). The description adds only the mention that the message slot can carry a slash command or skills, which is modest value over the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (send a follow-up message, slash command, or skills) and a precise target (an existing OpenCode session), plus the blocking outcome ('then wait for the answer'). The word 'existing' implicitly separates it from session-creation tools, but no sibling is named, so differentiation still requires inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Follow-up' and 'existing session' imply the continuation context, which is useful. However, there is no explicit when-not guidance: nothing tells the agent when to prefer oc_delegate, oc_interrupt, oc_wait, or oc_answer instead, nor what to do if the session is busy.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.