Skip to main content
Glama

opencode_ask

Destructive

Ask OpenCode a coding question in one step: creates a session, sends your prompt, and returns the AI response. Get direct answers without managing sessions.

Instructions

Ask OpenCode a question in one step. Creates a new session, sends your prompt, and returns the AI response. This is the easiest way to interact with OpenCode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNoAgent to use (e.g. 'build', 'plan')
titleNoOptional title for the session
formatNoResponse format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool.
promptYesThe question or instruction to send
systemNoOptional system prompt override
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.
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

B3.1/5.0
Behavior3/5

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

Annotations indicate destructiveHint=true, which is consistent with the description mentioning creating a new session, which could have side effects. However, the description doesn't add much beyond that, such as mentioning that it creates a session or that it might use resources. The openWorldHint is noted but not explained.

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 description is short and front-loaded with the key behavior, but it doesn't waste words. It clearly states the one-step nature and that it's the easiest way, which is concise and efficient. More detail could be added, but it's not overly lengthy.

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?

Given the tool's complexity with 9 parameters and an output schema, the description is sparse but not entirely incomplete. The schema and output schema cover most aspects. However, it doesn't mention the output response details or any side effects (e.g., session creation) that might be relevant for a one-step action. The description could benefit from mentioning that it is a higher-level convenience wrapper.

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?

The schema has 100% coverage, so the description of parameters is complete within the schema. The description does not add much beyond the schema, but the schema's own descriptions are detailed, including the format options and directory behavior. Given high coverage, a baseline of 3 is extended to 4 because the format parameter's description is notably clarifying about JSON Schema requirements.

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

Purpose3/5

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

The description states it asks OpenCode a question in one step, creating a session, sending the prompt, and returning the response. However, it doesn't clearly distinguish from similar tools like opencode_conversation or opencode_session_create, and the verb 'ask' is vague compared to more specific actions like 'send message' or 'get response'.

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

Usage Guidelines2/5

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

The description says this is the 'easiest way to interact', implying it's for quick, one-off interactions, but it doesn't explicitly state when to prefer this over opencode_message_send or opencode_session_create. No mention of when not to use it or what conditions might require a different tool.

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