Skip to main content
Glama
aiterm-mcp
by kitepon

claude_turn

Issues or recovers durable Claude session operations and returns structured pending, unknown, or completed states without parsing human-readable errors.

Instructions

aiterm相関付きClaude sessionのdurable operationを構造化issue/recoverするmachine-caller専用面。pending/unknown/completedを人間向けerror文字列の解析なしで返し、Observer固有ロジックは持たない。

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>",
      "operation_id": "<operation_id>"
    },
    "name": "claude_turn"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
actionYes
reasonYes
schemaYes
statusYes
raw_outputYes
session_idYes
operation_idYes
submit_residueYes
parent_deliveryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.63.7
    • addedOutput schema / properties / parent_delivery / properties / child_error_kind
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / parent_delivery / properties / child_failure
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "boundary": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "event_cursor": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "input_id": {
      +              "pattern": "^[a-f0-9]{32}$",
      +              "type": "string"
      +            },
      +            "operation_id": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "turn_id": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "event_cursor",
      +            "operation_id",
      +            "turn_id"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "category": {
      +      "enum": [
      +        "capacity",
      +        "rate_limited",
      +        "transient",
      +        "other"
      +      ],
      +      "type": "string"
      +    },
      +    "execution": {
      +      "enum": [
      +        "not_started",
      +        "started",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "future_effects": {
      +      "const": "unknown",
      +      "type": "string"
      +    },
      +    "terminal": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "category",
      +    "execution",
      +    "boundary",
      +    "terminal",
      +    "future_effects"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / parent_delivery / properties / child_vendor_session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. 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"
      +}
  3. Changed1 schema field changedv0.35.0
    • addedOutput schema / properties / parent_delivery
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "child_outcome": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "done",
      +            "closed",
      +            "rate_limited",
      +            "error"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "child_turn_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "delivery_id": {
      +      "type": "string"
      +    },
      +    "error_code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "queued_submission_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "state": {
      +      "enum": [
      +        "waiting",
      +        "ready",
      +        "sending",
      +        "submitted",
      +        "failed",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "delivery_id",
      +    "state",
      +    "child_outcome",
      +    "child_turn_id",
      +    "queued_submission_id",
      +    "error_code"
      +  ],
      +  "type": "object"
      +}
  4. Addedv0.22.0

TDQS

C2.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real behavioral context: results come back as structured pending/unknown/completed instead of parseable error strings, and no Observer-specific logic is applied. It omits idempotency/replay semantics for operation_id, permission or auth requirements, and whether re-issuing mutates state — gaps that matter for a mutating operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with no filler, but the heavy nominalization ('構造化issue/recoverするmachine-caller専用面') packs three ideas into one clause and reads as compressed rather than clear. The negative constraint ('Observer固有ロジックは持たない') is useful but arrives without setup.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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 described, but for a mutating, remote-capable tool with no annotations and a nested SSH object, the description says nothing about failure modes, replay safety, or auth handling. An agent could not confidently decide between issue and recover or predict what happens on a repeated operation_id.

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 only 40%, so the description should compensate, but it explains no parameter at all — action values, session_id, operation_id format, and the remote SSH block are left entirely to the schema. The schema itself documents only text and remote, leaving the three required parameters' meaning implicit.

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?

States a specific verb pair (issue/recover) and resource (durable operations on aiterm-associated Claude sessions), and the action enum confirms the two modes. It is distinguishable from siblings like pty_send or claude_agent by being a structured machine-caller surface, though it never names an alternative explicitly and leans on abstract jargon such as 'durable operation'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only routing guidance is 'machine-caller専用', which restricts the audience but does not say when to choose issue versus recover, or when to prefer this over pty_send/claude_agent for the same session. No prerequisites, no exclusions, no alternative named.

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