Skip to main content
Glama
aiterm-mcp
by kitepon

agent_approval

Inspect Codex CLI approval prompts and respond with a single-use allow or deny bound to the observed digest; unknown dialogs return a typed blocked error.

Instructions

Codexの現在の承認をinspectし、digestへ束縛した単発許可または拒否をrespondする。恒久許可は選ばない。Claudeは既存claude_approvalを使う。未知dialogはblockedのtyped errorで返す。

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": "agent_approval"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
remoteNo別端末のAitermで実行する時のSSH接続情報。hostだけならssh_configの接続名として使う。Aitermは接続情報を保存・管理しない。passphraseは会話記録に残るため、ssh-agentかpassphrase_env(環境変数名)を推奨する。
session_idYes
approval_choiceNo
observed_prompt_digestNo

Output Schema

NameRequiredDescriptionDefault
atYes
kindYes
actionYes
promptYes
reasonYes
schemaYes
statusYes
choicesYes
harnessYes
launch_idYes
session_idYes
prompt_digestYes
selected_choiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.70.127
    • changedOutput schema / properties / harness / enum
      Previous value: -[
      -  "claude-code",
      -  "claude-machine",
      -  "codex-cli",
      -  "grok-cli",
      -  "cursor-cli",
      -  "antigravity-cli"
      -]New value: +[
      +  "claude-code",
      +  "claude-machine",
      +  "codex-cli",
      +  "codex-machine",
      +  "grok-cli",
      +  "grok-machine",
      +  "cursor-cli",
      +  "cursor-machine",
      +  "antigravity-cli",
      +  "antigravity-machine"
      +]
  2. 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"
      +}
  3. Changed1 schema field changedv0.70.91
    • changedOutput schema / properties / harness / enum
      Previous value: -[
      -  "claude-code",
      -  "codex-cli",
      -  "grok-cli",
      -  "cursor-cli",
      -  "antigravity-cli"
      -]New value: +[
      +  "claude-code",
      +  "claude-machine",
      +  "codex-cli",
      +  "grok-cli",
      +  "cursor-cli",
      +  "antigravity-cli"
      +]
  4. Changed1 schema field changedv0.62.2
    • changedOutput schema / properties / harness / enum
      Previous value: -[
      -  "claude-code",
      -  "codex-cli",
      -  "grok-cli",
      -  "cursor-cli"
      -]New value: +[
      +  "claude-code",
      +  "codex-cli",
      +  "grok-cli",
      +  "cursor-cli",
      +  "antigravity-cli"
      +]
  5. 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"
      +}
  6. Addedv0.35.0

TDQS

A3.9/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 full behavioral burden. It does disclose two non-obvious behaviors — approvals are single-use and digest-bound, and unknown dialogs come back as a blocked typed error — but says nothing about expiration, what 'approve once' grants in scope, or whether respond requires a preceding inspect.

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?

Four short sentences, front-loaded with what the tool does, followed by constraints and the sibling escape hatch. No boilerplate or restatement of the tool name.

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 digest/single-shot semantics are covered. However, this tool takes a complex nested remote/SSH object and a session_id that the description never touches, leaving a real gap for a 5-parameter tool.

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 description coverage is only 20%, so the description must compensate more than it does. It clarifies the digest parameter's role and the approve_once/deny choice semantics ('single-shot'), but leaves session_id and the entire nested remote/SSH object undefined outside the schema.

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?

States a concrete verb pair and resource: inspect the current Codex approval, then respond with a one-shot approve or deny bound to a digest. It explicitly scopes the tool to Codex and names the sibling claude_approval as the tool for the other case, so an agent can pick correctly without opening schemas.

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 negative rule ('do not choose a permanent approval') and an explicit alternative ('Claude uses the existing claude_approval'), which is strong routing guidance. It only implies, rather than states, the ordering that you must inspect first to obtain the digest needed by respond.

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