Skip to main content
Glama

opencode_message_send_async

Destructive

Send a prompt to an OpenCode session asynchronously and get its messageId, then use that ID with opencode_wait to observe the turn's result.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text message to send
agentNoAgent to use
formatNoResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
modelIDNoModel ID (e.g. 'claude-3-5-sonnet-20241022')
variantNoModel variant (e.g. 'fast', 'smart')
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
sessionIdYesSession ID
providerIDNoProvider ID (e.g. 'anthropic')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag mutating behavior (destructiveHint=true, readOnlyHint=false), so the description adds value by disclosing the async timing behavior and the exact mechanism for correlating the result to a turn via opencode_wait. This goes beyond what annotations alone convey, though it doesn't cover failure modes or side effects in depth.

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

Conciseness5/5

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

Two sentences, no filler, front-loaded with the core action and outcome. The follow-up instruction earns its place by explaining the purpose of the returned messageId in a concrete workflow.

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

Completeness4/5

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

For a tool with an output schema and well-documented parameters, the description covers the critical async workflow and links to the necessary companion tool. It is slightly light on what asynchronous dispatch means for error handling or response timing, but nothing essential to invoking it correctly is missing.

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 coverage is 100% and every parameter already has a description. The tool description adds limited semantic value, mostly by explaining the role of sessionId in the follow-up wait step, but it does not deepen understanding of parameters like format, agent, or providerID beyond the schema.

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

Purpose5/5

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

Description states a specific action ('Send a prompt asynchronously') and a specific result ('return its messageId'). It is clearly distinguishable from the sibling opencode_message_send by the explicit async qualifier, and from opencode_wait by describing the send-vs-observe relationship.

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

Usage Guidelines4/5

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

Provides clear contextual guidance: after sending, pass sessionId and messageId to opencode_wait to observe the exact turn. It does not explicitly call out when not to use it or name the synchronous alternative, but the workflow is unambiguous enough for an agent to know how to use it.

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

Deploy Server

Other Tools