Skip to main content
Glama
kitepon
by kitepon

pty_open

Open a persistent local terminal and return a session_id. Sessions survive server or client restarts, enabling durable shell access for SSH, Docker, or WSL.

Instructions

ローカル永続端末(POSIXはtmux、Windows nativeはpsmux 3.3.8以上)を1個開き、session_id を返す。backend server常駐ゆえ本サーバや クライアントが再起動してもセッションは生存する。リモート操作は専用ツールにせず、開いた端末の中で pty_send(session_id, "ssh host") と打って入る。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoセッション名(省略時は t1, t2... を自動採番)
shellNo起動シェル(既定 bash)bash
env_varsNo現在のMCP processからsessionへ継承する環境変数名

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.35.0
    • addedInput schema / properties / env_vars
      Added value: +{
      +  "description": "現在のMCP processからsessionへ継承する環境変数名",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observedv0.20.2

TDQS

A4.4/5.0
Behavior4/5

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

No annotations provided, so the description must carry behavioral info. It discloses persistence, backend server residency, and survival across restarts. It does not mention resource cleanup or that pty_close should be used, but the core persistent behavior is well explained.

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?

Two focused sentences; state the purpose, key behavioral trait, and usage pattern without redundancy. Front-loaded with the essential action.

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 create-resource tool, it clarifies persistence, the tmux/psmux dependency, and how to use it with pty_send. It lacks explicit mention of return schema/output shape, but the description mentions session_id is returned.

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%; the description adds no parameter-specific information beyond the schema. The return session_id is mentioned but not parameter behavior.

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?

Description uses a specific verb ('開き') and resource ('ローカル永続端末'), states it returns a session_id, and distinguishes itself from remote operations by directing those to pty_send.

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

Usage Guidelines5/5

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

Explicitly states when to use: to open a persistent local terminal; and when not to use dedicated remote-operation tools, with the alternative (pty_send inside the opened terminal) clearly specified.

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