Skip to main content
Glama

opencode_session_permission

Destructive

Approve or deny pending permission requests in a coding session. Use 'once' for one-time approval, 'always' to auto-approve matching requests, or 'reject' to deny.

Instructions

Respond to a permission request in a session. Use opencode_permission_list to see pending requests. Reply values: 'once' (approve this request only), 'always' (approve this + future matching requests for this session), 'reject' (deny the request).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID
replyYesResponse to the permission request: 'once' to approve once, 'always' to auto-approve matching future requests, 'reject' to deny
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.
permissionIDYesPermission request ID

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.2/5.0
Behavior4/5

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

The description adds behavioral detail beyond the annotations: it explains the effects of each reply value ('once' approves only the current request, 'always' approves current and future matching requests, 'reject' denies). It also notes the session scope. Annotations already flag readOnlyHint=false and destructiveHint=true, so the description enriches understanding without contradicting them.

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 two sentences with no redundancy. The first sentence states the purpose, the second gives the prerequisite and defines the reply values. It is front-loaded and every sentence earns its place, with no filler.

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?

The tool is simple and the description covers the core action, the prerequisite (opencode_permission_list), and the reply semantics. The output schema is present, so return details are not required. A minor gap is the lack of a warning about the persistence of 'always' (potentially destructive), but given the annotations already flag destructiveHint, this is acceptable.

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

Parameters3/5

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

Schema coverage is 100% with descriptive text for all parameters, including the reply enum values. The description largely repeats the schema's explanation of 'once', 'always', and 'reject', adding only the session-scope nuance. Per calibration, a 3 is baseline when the schema covers parameters well and the description offers minimal additional meaning.

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 clearly states the tool's action: 'Respond to a permission request in a session.' It names the specific resource (permission request) and the verb (respond), and differentiates itself from the sibling tool opencode_permission_list by explicitly directing the user to that tool for listing pending requests. This distinguishes it from other session-related tools.

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 provides a clear usage context: it tells the agent to use opencode_permission_list first to see pending requests, implying this tool is the follow-up for responding. It does not explicitly mention alternatives like opencode_question_reply, but the context is strong enough to guide correct usage. A slight gap is the lack of an explicit 'when not to use' statement.

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