Skip to main content
Glama
aiterm-mcp
by kitepon

claude_approval

Inspect and answer a displayed permission prompt during a correlated Claude turn: fetch a screen digest, then approve once or deny only if the same operation and digest remain active.

Instructions

aiterm相関付きClaudeのactive turn中に表示された権限確認UIを、turn相関を保ったまま検査・応答する専用面。inspectで画面digestと安全な単発Yes/Noだけを取得し、respondは同じoperation・同じdigestが現在も表示中の場合だけ送信する。

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>",
      "session_id": "<session_id>"
    },
    "name": "claude_approval"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
remoteNo別端末のAitermで実行する時のSSH接続情報。hostだけならssh_configの接続名として使う。Aitermは接続情報を保存・管理しない。passphraseは会話記録に残るため、ssh-agentかpassphrase_env(環境変数名)を推奨する。
session_idYes
operation_idNodurable operationのID。通常pty_send由来の匿名turnでは省略する
approval_choiceNorespondだけに指定する
observed_prompt_digestNo直前のinspectが返したdigest。respondだけに指定する

Output Schema

NameRequiredDescriptionDefault
atYes
actionYes
schemaYes
statusYesnone: a machine-mode seat has no tool permission pending (an AskUserQuestion is answered with stream_send)
choicesYes
session_idYes
operation_idYes
prompt_digestYes
selected_choiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.70.112
    • addedInput schema / properties / remote / properties / ssh
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Pinned ssh: {known_hosts_file, host_key_alias?, identity_agent | identity_file, strict_host_key?: true} (absolute paths). Strict host checking against that file with that one identity, no user ssh config. Not combinable with identity_file, ssh_options, passphrase or passphrase_env. Needs Aiterm 0.70.101 on the other computer.",
      +  "properties": {
      +    "host_key_alias": {
      +      "pattern": "^(?!-)[A-Za-z0-9._%:\\[\\]-]{1,255}$",
      +      "type": "string"
      +    },
      +    "identity_agent": {
      +      "pattern": "^(\\/|[A-Za-z]:[\\\\/])[^\\s\"'`]*$",
      +      "type": "string"
      +    },
      +    "identity_file": {
      +      "pattern": "^(\\/|[A-Za-z]:[\\\\/])[^\\s\"'`]*$",
      +      "type": "string"
      +    },
      +    "known_hosts_file": {
      +      "pattern": "^(\\/|[A-Za-z]:[\\\\/])[^\\s\"'`]*$",
      +      "type": "string"
      +    },
      +    "strict_host_key": {
      +      "const": true,
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "known_hosts_file"
      +  ],
      +  "type": "object"
      +}
  2. Changed5 schema fields changedv0.70.91
    • addedOutput schema / properties / prompt_digest / anyOf
      Added value: +[
      +  {
      +    "pattern": "^sha256:[0-9a-f]{64}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / prompt_digest / pattern
      Removed value: -"^sha256:[0-9a-f]{64}$"
    • removedOutput schema / properties / prompt_digest / type
      Removed value: -"string"
    • addedOutput schema / properties / status / description
      Added value: +"none: a machine-mode seat has no tool permission pending (an AskUserQuestion is answered with stream_send)"
    • changedOutput schema / properties / status / enum
      Previous value: -[
      -  "approval_required",
      -  "submitted"
      -]New value: +[
      +  "none",
      +  "approval_required",
      +  "submitted"
      +]
  3. Changed1 schema field changedv0.39.1
    • addedInput schema / properties / remote
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "別端末のAitermで実行する時のSSH接続情報。hostだけならssh_configの接続名として使う。Aitermは接続情報を保存・管理しない。passphraseは会話記録に残るため、ssh-agentかpassphrase_env(環境変数名)を推奨する。",
      +  "properties": {
      +    "host": {
      +      "pattern": "^(?!-)[A-Za-z0-9._%:\\[\\]-]{1,255}$",
      +      "type": "string"
      +    },
      +    "identity_file": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "passphrase": {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "passphrase_env": {
      +      "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
      +      "type": "string"
      +    },
      +    "port": {
      +      "maximum": 65535,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "ssh_options": {
      +      "items": {
      +        "pattern": "^[A-Za-z][A-Za-z0-9]*=[^\\r\\n]*$",
      +        "type": "string"
      +      },
      +      "maxItems": 32,
      +      "type": "array"
      +    },
      +    "user": {
      +      "pattern": "^(?!-)[A-Za-z0-9._@\\\\-]{1,128}$",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "host"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.20.2

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the whole behavioral burden. It does disclose the important safety guard (respond is transmitted only if operation_id and observed_prompt_digest still match what inspect returned) and that answers are limited to a single Yes/No, but it says nothing about what happens on a digest mismatch, whether approval is recorded elsewhere, or what authority the caller needs.

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?

Two dense sentences with the resource stated first and the inspect-to-respond workflow second; no filler. It is compact enough that nothing could be trimmed without losing the digest precondition.

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?

An output schema exists, so return values need not be explained, and the nested ssh details live in the schema. Still, for a tool with a mutation-like action and no annotations, the description leaves the session_id semantics and the relationship to claude_turn / agent_approval unstated.

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?

At 67% schema coverage the schema documents most fields, including the remote/ssh block, and the description reinforces operation_id as the durable-turn identifier and observed_prompt_digest as the value returned by the preceding inspect. It adds nothing about session_id or the remote connection parameters, so it only marginally improves on the schema.

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?

Names a concrete verb pair (inspect / respond) and a concrete resource: the permission-confirmation UI displayed during an aiterm-correlated Claude active turn. It does not, however, distinguish itself from the similarly named sibling agent_approval or agent_auth, so the agent must infer which approval surface applies.

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?

Gives an explicit two-step contract: inspect first to obtain the screen digest and a single Yes/No, then respond only when the same operation and the same digest are still displayed. That is real when-to-use guidance, though it offers no exclusion rule for the sibling approval/auth tools.

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