Skip to main content
Glama

opencode_permission

Resolve pending OpenCode permission requests by replying once, always, or reject, and resume the same turn until completion or further input.

Instructions

Decide a pending OpenCode permission (state=needs_agent_input, kind=permission) and keep blocking until the turn completes, errors, or needs input again.

  • reply: exactly one of 'once' (allow this call), 'always' (allow this pattern for the session), 'reject'. Decide as supervisor: allow normal actions necessary for the delegated task; reject destructive or out-of-scope requests.

  • The decision is posted to OpenCode and the SAME turn resumes (the prompt is never resubmitted).

  • If the permission is no longer pending, an error is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replyYes
timeoutNo
directoryYes
session_idYes
permission_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description thoroughly discloses behavior: it blocks until turn completes/errors/needs input, the same turn resumes (prompt never resubmitted), and an error occurs if the permission is no longer pending. This goes well beyond the schema and gives the agent a clear model of execution.

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 well-structured with bullet points and front-loads the core purpose. It is concise and avoids fluff, though it could be slightly tightened (e.g., repeating 'keep blocking' in the first sentence and subsequent bullets). Overall, it is efficient and easy to scan.

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?

While the tool's blocking and error behavior are explained, the description omits the return format of a successful decision and does not clarify the role of `timeout`. Given the tool's complexity (5 parameters, no annotations, and output schema present but not explained), this leaves important gaps for an agent deciding how long to wait or what to expect in response.

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

Parameters2/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 explains the `reply` parameter thoroughly (values and semantics), but gives no meaning for `directory`, `session_id`, `permission_id`, or `timeout`. These are left to inference, which is insufficient for a tool with zero other documentation.

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 states a specific action (decide a pending OpenCode permission) with clear context (state=needs_agent_input, kind=permission). It distinguishes itself from siblings by focusing on permission decisions, and includes explicit blocking behavior. The purpose is unambiguous and well-scoped.

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 decision policy: allow normal actions, reject destructive/out-of-scope requests, and defines the three reply options. However, it does not explicitly mention when not to use this tool or reference alternatives like opencode_abort or opencode_inspect, leaving some inference to the agent about tool selection.

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