Skip to main content
Glama
kitepon
by kitepon

pty_observe

Inspect any PTY session's health, status, pane presence, process identity, screen changes, and CPU activity without exposing content or argv, using a cursor for differential updates.

Instructions

指定sessionの存在、paneとharnessの生存、状態と理由、native process identity、画面変化とCPU活動を構造化して観測する。画面本文と生argvは返さない。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNo前回のactivity.cursor。省略・session再作成時は活動差分をnullで返す
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
existsYes
reasonYes
schemaYes
harnessYes
activityYes
launch_idYes
pane_aliveYes
session_idYes
token_hintYes
observed_atYes
pane_processYes
harness_aliveYes
harness_processYes
process_identityYes
parent_deliveriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.35.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries full behavioral burden. It meaningfully discloses that the tool excludes screen body and raw argv and outlines exactly which observations are returned. It does not state whether the tool has side effects or what happens when the session is missing, but for an observation tool this is a solid transparency baseline.

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 concise sentences with no filler: the first lists the exact observation dimensions, the second gives the crucial exclusion guarantee, making the scope self-contained. The tool description is front-loaded with the key purpose and all content earns its place.

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?

The output schema exists, so return shape is already documented. The description adds the observation scope and negative compared with it, and cursor semantics are given in the schema. Yet it doesn't mention that session_id must come from an existing would-be decoration (for example pty_open or pty_list), which is a small but practical gap for an agent that uses the tool in a conversation with no prior context.

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 50%; session_id has no field description. The tool description adds nearly nothing about the parameters: it only re-states 'specified session' and never explains the cursor parameter or the session_id value format or origin. The cursor semantics are only documented in the schema, and the description does not reinforce or extend them.

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?

The description names a precise verb and resource: it observes structured aspects of a specified PTY session — existence, pane/harness liveness, status and reason, process identity, screen changes, and CPU activity. It also explicitly states what it does not return (screen body and raw argv), which separates it from content-returning tools like pty_read.

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

Usage Guidelines3/5

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

The intended context is implied: use this when you need structured health and liveness observations rather than screen content. However, the description never explicitly names alternative tools such as pty_read or states when not to use this tool, leaving the choice to inference from the excluded 'screen body and raw argv'.

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