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
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | The 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_id | Yes | Session ID returned by opencode_start_session. | |
| timeout_seconds | No | Seconds to wait for a response. Increase for long code generation tasks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||