Skip to main content
Glama
TomHarkness

iTerm2 MCP Server

by TomHarkness

list_iterm_sessions

Lists iTerm2 sessions with IDs, TTYs, window/tab details, and names to identify targetable sessions; the session Claude runs in is marked and cannot be targeted.

Instructions

List iTerm2 sessions: id, tty, window/tab, name. The session Claude itself runs in is marked and can't be targeted.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it states the return fields and discloses that Claude's own session is specially marked and excluded from targeting. It does not explicitly state read-only safety or ordering, but the key behavioral constraint is clearly surfaced.

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 compact sentences, front-loaded with the core list operation and followed by the key exclusion constraint. Every sentence adds useful information with no filler.

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 zero-parameter list tool with no output schema, the description covers the essential return fields and the important self-session exclusion. It could mention how the returned ids feed into sibling tools, but overall it is complete enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so the baseline is 4. The description does not need to explain parameter syntax, and it appropriately does not waste space doing so.

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 uses a specific verb and resource ('List iTerm2 sessions') and enumerates the returned fields (id, tty, window/tab, name). This clearly distinguishes it from sibling tools such as execute_command, create_new_tab, and read_session_output.

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 statement that Claude's own session is marked and cannot be targeted is a useful constraint, but the description does not explicitly say when to use this tool versus alternatives like read_session_output or execute_command. Usage is implied rather than directly guided.

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