Skip to main content
Glama

opencode_answer

Answer pending OpenCode questions to resume the same coding turn, blocking until completion or needing input. Reject invalid options and resume without resubmitting prompts.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answersYes
timeoutNo
directoryYes
session_idYes
question_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries full responsibility and does so excellently. It discloses blocking until completion/error/needs-input, that the prompt is never resubmitted, that answers are validated before posting, and error handling for stale questions. This provides substantial behavioral context beyond what any annotation might offer.

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?

The description is well-structured with a clear lead sentence and bullet points for details. Every sentence provides necessary information without redundancy. The format is easy to parse, front-loading the core purpose and then elaborating on behaviors and constraints.

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?

Given the moderate complexity and presence of an output schema (which covers return values), the description is quite complete. It explains blocking, resumption, validation, and error conditions. The only minor gap is not explicitly stating what happens on successful completion (e.g., turn continues), but that is implied by 'resumes' and covered by output schema. Adequate for an agent to call it correctly.

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?

Schema description coverage is 0%, so the description must compensate. It does a thorough job on the most complex parameter 'answers', explaining sub-question ordering, string/list-of-strings format, and exact label requirement for option-based questions. The other parameters (directory, session_id, question_id, timeout) are self-explanatory from names and standard context, so the description covers the critical semantics sufficiently.

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?

The description explicitly states the verb and resource: 'Answer a pending OpenCode question' with specific state and kind qualifications (state=needs_agent_input, kind=question). This clearly distinguishes it from sibling tools like opencode_run or opencode_inspect, which handle different actions. The purpose is unambiguous and specific.

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?

The description implies usage by specifying the condition for calling (pending question) and warns about the error if the question is no longer pending. It also notes the blocking behavior and that the same turn resumes. However, it does not explicitly mention alternatives or when NOT to use this tool, though the context makes it fairly clear it's for answering questions within an OpenCode session. The guidance is adequate but not exhaustive.

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/ArthurHtr/opencode-hermes-mcp'

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