Skip to main content
Glama

opencode_send_message

Send detailed instructions to an active opencode session and receive the agent's response for precise, step-by-step coding tasks.

Instructions

Send a detailed instruction to an active opencode session and return the response.

PROMPTING RULES:

  • Specify EXACT file paths (absolute). Never say 'the config file' — say the full path.

  • Break multi-step work into numbered steps within the same message.

  • Specify the output format: 'return a code block', 'return JSON', 'list changed files'.

  • If the task involves multiple files, list all of them explicitly.

  • If you want opencode to run a command, say exactly which command and in which directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe full, detailed instruction for opencode. ALWAYS include: (1) exact file paths for every file to read or modify, (2) step-by-step instructions — one action per step, (3) expected output format or file structure. Vague prompts produce vague results. Example GOOD: 'Read C:/projects/app/src/auth.py. Add function validate_token(token: str) -> bool checking JWT expiry. Write back to the same file. Return the updated function as a code block.' Example BAD: 'Fix the auth module.'
session_idYesSession ID returned by opencode_start_session.
timeout_secondsNoSeconds to wait for a response. Increase for long code generation tasks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only says 'send' and 'return the response,' omitting that the tool may be long-running (despite the timeout_seconds parameter), can trigger file changes or command execution, and may block until completion. The prompting rules hint at side effects like running commands and writing files, but they are not framed as behavioral warnings. This is a significant transparency gap.

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?

The core purpose is stated in a single opening sentence, and the PROMPTING RULES are structured as a bullet list, making them scannable. Each rule is actionable and not fluff, though some rules overlap with the schema's parameter descriptions. It is appropriately sized for a tool that depends heavily on prompt quality, but the redundancy with schema prevents a 5.

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?

With 100% schema coverage and an output schema present, the tool description is fairly complete for parameters and return expectations (it says 'return the response'). However, it lacks explicit usage context (e.g., it requires opencode_start_session) and fails to disclose potential side effects or error scenarios. The description gives a good starting point but leaves gaps that the agent must infer from siblings and schema.

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

Parameters4/5

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

Since schema description coverage is 100%, the baseline is 3. The description adds value beyond the schema by offering general prompting rules (exact paths, numbered steps, command execution instructions) that complement the schema's examples. It emphasizes not to say 'the config file' but the full path, and clarifies that commands require a directory, which is extra semantic guidance not present in the schema.

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?

The description clearly states the tool sends a detailed instruction to an active opencode session and returns the response. This distinguishes it from session lifecycle tools like opencode_start_session and other provider prompt tools (gemini_prompt, qwen_prompt) by naming 'opencode' specifically. However, it does not explicitly compare with siblings or mention when to prefer this over gemini_prompt, so it stops short of a 5.

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?

The description implies usage for active opencode sessions and provides extensive PROMPTING RULES about how to craft the message, but it does not state when to use this tool versus alternatives or give exclusion criteria. There is no explicit 'use this when' or 'not for' guidance, so it relies on context rather than direct comparison.

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

Install Server

Other Tools

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/h19overflow/polycode'

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