Skip to main content
Glama

Permission requests

opencode_permission

List pending OpenCode permission requests, approve or reject them, and report or apply bridge policy profiles to unblock headless runs.

Instructions

Headless runs block when OpenCode asks for permission. Use action=list to see pending requests and action=reply to approve or reject them. action=policy reports the bridge profile, or applies its ruleset to a session (approximate: OpenCode evaluates rules in order, so profiles are best-effort).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "opencode_permission"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
messageNo
profileNo
decisionNo
directoryNo
requestIDNo
sessionIDNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false, so the description carries most of the burden. It usefully discloses that headless runs block without intervention and that policy application is approximate because OpenCode evaluates rules in order, but it omits whether 'always' decisions persist, what applying a policy does to existing session rules, and whether a reply is idempotent.

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 blocking-run context is front-loaded in the first sentence and the remaining two sentences map cleanly to the actions. It is compact with little waste, though the policy sentence packs the approximation caveat awkwardly into parentheses.

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?

With seven parameters, no schema descriptions, and no output schema, an agent needs more than this to call the tool correctly. The description covers intent per action but not which fields each action requires or what 'list' returns, leaving a real gap for a multi-action tool.

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% across seven parameters, so the description must compensate and largely does not. It implies requestID/decision for reply and profile/sessionID for policy by referencing the actions, but never names parameters, and leaves 'message' and 'directory' entirely unexplained in either schema or description.

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

Purpose4/5

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

The description states a concrete subject (OpenCode permission requests) and breaks it into three named actions, each with a specific purpose: list pending requests, approve or reject, report or apply a policy profile. It is clear what the tool does, though it does not explicitly distinguish itself from session-oriented siblings like opencode_session_prompt.

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?

It supplies the triggering situation ('Headless runs block when OpenCode asks for permission') and routes each action to its use case, which is genuine when-to-use guidance. It stops short of stating exclusions or ordering rules, e.g. whether policy must be applied before a session runs, or when a reply should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.