Skip to main content
Glama
kitepon
by kitepon

pty_list

握っているセッション一覧(名前 / 現在の前面コマンド / attach 状態 / サイズ / agent 情報)。

Instructions

握っているセッション一覧(名前 / 現在の前面コマンド / attach 状態 / サイズ / agent 情報)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remoteNo別端末のAitermで実行する時のSSH接続情報。hostだけならssh_configの接続名として使う。Aitermは接続情報を保存・管理しない。passphraseは会話記録に残るため、ssh-agentかpassphrase_env(環境変数名)を推奨する。
env_keysNo帰属確認用の非秘密環境変数名。指定したキーだけを返す

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
sessionsYes
observed_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.60.1
    • addedOutput schema / properties / sessions / items / properties / vendor_session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "agent sessionのharness側の会話ID。Claude CodeとGrokは起動時に--session-idで渡した値(席の中で会話を移した後は追わない)、CodexとCursorは分かった後の値。通常PTYと、まだ分からない席は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. Changed2 schema fields changedv0.35.0
    • addedInput schema / properties / env_keys
      Added value: +{
      +  "description": "帰属確認用の非秘密環境変数名。指定したキーだけを返す",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "observed_at": {
      +      "type": "string"
      +    },
      +    "schema": {
      +      "const": "aiterm.pty-list-result.v1",
      +      "type": "string"
      +    },
      +    "sessions": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "attached": {
      +            "type": "boolean"
      +          },
      +          "current_command": {
      +            "type": "string"
      +          },
      +          "environment": {
      +            "additionalProperties": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "harness": {
      +            "anyOf": [
      +              {
      +                "enum": [
      +                  "claude-code",
      +                  "codex-cli",
      +                  "grok-cli",
      +                  "cursor-cli"
      +                ],
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "height": {
      +            "type": "number"
      +          },
      +          "session_id": {
      +            "type": "string"
      +          },
      +          "width": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "session_id",
      +          "current_command",
      +          "attached",
      +          "width",
      +          "height",
      +          "harness",
      +          "environment"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "schema",
      +    "observed_at",
      +    "sessions"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.20.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it does not state that this is a safe read-only, side-effect-free operation, nor that it can act against a remote host via SSH (only the schema's remote description hints at that). It discloses the returned fields, but the output schema already exists, so that adds little beyond structured data.

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?

A single front-loaded sentence with the resource stated first and the field list in a compact parenthetical. No waste, though the parenthetical enumerates return values that the output schema already covers.

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?

For a zero-required-parameter listing tool with an output schema present, the essentials are covered, but the description omits that listing can be scoped to a remote Aiterm host and says nothing about whether the result is a complete snapshot. Adequate but with visible gaps.

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 100%, so the schema itself documents remote/env_keys and their SSH semantics thoroughly. The description mentions neither parameter, adding no meaning beyond the schema; baseline 3 applies.

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 gives a clear verb+resource (セッション一覧 = list of held sessions) and specifies the returned fields. It is intelligible as a listing tool, but it does not explicitly differentiate itself from adjacent read-style siblings such as pty_observe, pty_read, or diagnostics.

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?

There is no when-to-use guidance, no prerequisites, and no mention of alternatives. An agent must infer from the name alone that this is the discovery step before pty_send/pty_close, and nothing states whether it covers remote sessions.

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