Skip to main content
Glama
kitepon
by kitepon

pty_list

List active PTY sessions with name, foreground command, attach state, size, and agent details. Identify which sessions are running, ready to attach, or need attention.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
env_keysNo帰属確認用の非秘密環境変数名。指定したキーだけを返す

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
sessionsYes
observed_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.20.2

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It communicates that this is a listing operation and enumerates the output fields, but it does not explicitly state that it is read-only, whether it requires an active session, or how it behaves when no sessions exist.

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?

The description is a single compact phrase that lists exactly what the tool returns. There is no filler, and the essential scoping word '握っている' (held) is front-loaded.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool with an output schema and a fully documented optional parameter, the description is largely sufficient. The main gap is the lack of guidance on when to choose pty_list over sibling observation tools, but that is a usage-guidance issue rather than a completeness blocker.

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?

The tool description itself does not mention env_keys, but the input schema fully documents it as non-secret environment variable names for attribution confirmation and states that only specified keys are returned. Since schema coverage is 100%, the baseline of 3 applies; the description adds no extra parameter meaning.

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 clearly identifies the resource (held sessions) and the fields returned (name, current foreground command, attach state, size, agent info), which distinguishes it from action-oriented siblings like pty_open and pty_send. It lacks an explicit verb, presenting the purpose as a noun phrase rather than 'lists sessions', so it stops just short of a 5.

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 guidance on when to use pty_list versus related tools such as pty_observe or pty_read. The list nature of the tool makes the basic use case implicit, but the description never states exclusions or alternatives.

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