SmartCLI
The SmartCLI MCP server enables programmatic driving, perception, and automation of interactive terminal programs (TUIs, REPLs, editors) by simulating a user in a persistent PTY session. Core capabilities:
Session Management: Start (
start), list (list_sessions), close (close), and check health (alive) of sessions with configurable command, size, working directory, and environment variables.Input: Send literal text (
send_text), a line (text + Enter,send_line), or specific key tokens (send_keys) like arrows, function keys, and Ctrl/Meta combos.Perception: Capture semantic screen snapshots (
snapshot) containing rendered text, alternate screen status, and content/visual hashes.Wait & Synchronization: Block until a regex matches (
wait_regex), screen content changes from a baseline (wait_change), visual elements (text, styling, cursor) change (wait_visual_change), any of multiple patterns race (wait_any), or the screen becomes stable/ready (wait_ready).Other: Resize terminal dimensions (
resize).
Build automation scripts that perceive and react to the actual screen state to interact with tools like vim, lazygit, htop, or custom REPLs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SmartCLIDrive lazygit in a terminal and show me the latest commit diff"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SmartCLI
Read this in: English · 简体中文 · 繁體中文 · 日本語 · 한국어
A local Python toolkit for driving, perceiving, and rendering the terminal — three agent skills over one pluggable PTY + pyte core.
Let an AI drive, perceive, and render real terminal programs. SmartCLI reads
the actual screen with a pyte cell model — not a byte pipe — so it knows which
menu row is highlighted, presses the right keys, and waits for the screen to
settle. Below: it drives the real lazygit TUI end-to-end (arrow-key
navigation, opening a commit diff, highlighting a branch) — no script, no mock.
pip install smartcli-toolkitRequires Python 3.10 or newer. The install includes the shared Python library, the persistent TUI driver, and the stdio MCP server.
Drive something in 30 seconds
Copy-paste this. It starts a real Python REPL under a PTY, waits for the prompt
(never a blind sleep), types into it, and reads the screen back:
pip install smartcli-toolkit
SID=$(smartcli-tui start --cmd "python3 -i -q" --cols 80 --rows 24 --json | python3 -c "import json,sys;print(json.load(sys.stdin)['sid'])")
smartcli-tui wait-regex --id $SID ">>> " --timeout-ms 15000
smartcli-tui send-line --id $SID "print(6*7)"
smartcli-tui wait-regex --id $SID "42" # prints the cell grid it sees
smartcli-tui close --id $SIDOn Windows use --cmd "py -i -q". Swap the command for vim, htop or
lazygit and the same five verbs drive those too — that is the whole point:
wait-regex and friends react to what the screen actually shows, so an agent
never guesses whether its keystroke landed.
Want the same thing against a real editor, end to end and verifiable?
examples/drive_vim.py drives the actual vim binary —
opens a file, appends a line, saves, and then checks the filesystem, not the
screen:
python examples/drive_vim.py
# [OK ] vim painted its screen
# [OK ] file contents visible on screen
# [OK ] alternate screen is active
# [OK ] vim entered insert mode (so G and o both landed)
# [OK ] typed text appears on screen
# [OK ] vim restored the main screen on exit
# [OK ] file on disk really changedNote the fourth step. It is there because the example itself once sent five
keystrokes back to back with nothing between them, and under load vim had not
processed G by the time o arrived, so nothing was inserted and the run failed
with no useful diagnosis. Confirming insert mode proves both keys landed — the
same discipline the tool exists to provide, applied to its own demo.
Run the same file against smartcli-toolkit==0.1.8 and two steps fail — and the
file is never saved, because a driver that cannot see the alternate screen
mistimes the :wq. That is why the emulation work below matters: a wrong screen
model does not error, it silently succeeds at nothing.
Already running an MCP client (Claude Code, Cursor, VS Code)? The same verbs are MCP tools, with the per-session token attached for you:
smartcli-mcp # stdio MCP server; or `uvx --from smartcli-toolkit smartcli-mcp`What & why
SmartCLI is a workspace for terminal work that agents and humans both do: driving
interactive terminal programs, perceiving what a screen actually shows, and
rendering visuals and layouts back out. It is built on one shared, pluggable PTY
backend plus a pyte screen model — chosen over screenshot/vision so a single
structured screen model feeds both perception (read the screen) and rendering
(draw the screen). The PTY layer is intentionally not tmux-bound: local dev runs
on Windows via ConPTY (pywinpty), while target programs can run under POSIX ptys
or tmux elsewhere. Three skills sit on that core, each a self-contained tool you run
in place from the checkout.
Related MCP server: Forge
Driving a real TUI
The demo above is SmartCLI driving lazygit — a real full-screen curses app —
through its perceive → act → confirm loop: it reads the pyte cell grid (which
row is selected, the alt-screen diff), moves with arrow keys, opens a commit's
diff, and highlights a branch. Captured by driving the actual program in a Linux
container, not scripted or mocked. A byte-stream matcher like pexpect can't
perceive "which row is highlighted"; a screen model can.
How we know the perception is right. A screen model is only useful if it
matches what a real terminal shows, so we measure that instead of asserting it:
identical bytes go to a real tmux pane and to our model, and the two cell
grids are diffed. Three suites do it — 35 curated cases, a three-way check that
only trusts a behaviour when tmux and GNU screen agree, and a generative
fuzz over random VT sequences. That campaign found and fixed 12 emulation bugs,
including the alternate screen buffer (pyte implements none of modes
1049/1047/47, so a full-screen program's output used to be painted over the main
screen and never restored). Scope and remaining edges:
LIMITATIONS.md.
Live effects
Real captures of the cmd-art fx engine — each GIF is the actual effect
rendered frame-by-frame through the project's own pipeline (no screen recorder).
Reproduce any with python -m fx play <name> (see Quickstart).
|
|
|
donut — the classic ASCII torus | fire — demoscene heat field | rain — Matrix digital rain |
🌐 Explore the live showcase → — play with the effect engine, drive a menu with arrow keys, and poke the widgets, right in your browser.
Install
Just want the three Claude Code skills? Download one zip, unzip it, done — no git, no pip, no marketplace:
curl -LO https://github.com/dwgx/SmartCLI/releases/latest/download/smartcli-skills.zipunzip smartcli-skills.zip -d ~/.claude/skills/That gives you cmd-art, drive-tui and tui-ui (309 KiB total). cmd-art and
tui-ui then work with nothing but CPython 3.10+ — verified on a bare virtualenv,
all 30 effects and all 17 widgets load. drive-tui additionally needs pyte, which
the PyPI install below provides. Or install all three via the plugin marketplace:
/plugin marketplace add dwgx/SmartCLI.
Primary — from PyPI (the library, the CLI, and the MCP server):
pip install smartcli-toolkitDistribution vs import name: the PyPI distribution is
smartcli-toolkit(the namessmartcli/smart-cliwere taken or blocked), but the importable package issmartcli_core. So afterpip install smartcli-toolkityou still writefrom smartcli_core import PtySession.
Alternative — reproduce the full dev environment from a source checkout:
git clone https://github.com/dwgx/SmartCLI SmartCLI
cd SmartCLI
python -m pip install -r requirements.txtrequirements.txt installs pyte, the MCP SDK, and pywinpty on Windows only
(POSIX uses the stdlib pty backend). pip install . installs smartcli_core
plus the smartcli-tui, smartcli-mcp, and smartcli-toolkit commands. The
visual cmd-art and tui-ui skills still run in place from a checkout via
python -m fx and python -m ui.
Optional extras (real FIGlet fonts, raster images, authoritative cell widths — all degrade gracefully to stdlib fallbacks when absent):
python -m pip install -r requirements-optional.txt
# or, from the checkout, via pyproject extras:
pip install ".[all]" # pyfiglet + Pillow + wcwidth
pip install ".[art]" # pyfiglet only
pip install ".[image]" # Pillow only (also: the PNG screenshot harness needs it)
pip install ".[width]" # wcwidth onlyWindows note: set UTF-8 output before running any skill so box-drawing and CJK glyphs encode cleanly (the CLIs also auto-reconfigure stdout, but set this to be safe):
set PYTHONIOENCODING=utf-8Verified dep versions on the dev box (Windows 11, CPython 3.14.6): pyte 0.8.2,
pywinpty 3.0.5, pyfiglet 1.0.4, Pillow 12.2.0, wcwidth 0.8.1.
Diagnostics. python -m smartcli_core prints your OS, Python, terminal, PTY
backend, and dependency versions. smartcli-tui doctor reports where the core
was loaded from and whether drive dependencies are present. Include both outputs
when filing a terminal-sensitive bug.
Quickstart
cmd-art — terminal visual effects
cd skills/cmd-art
python -m fx list # list all 30 effects
python -m fx play donut --seconds 5 # play one effect (bounded)
python -m fx gallery # one frame of each effect
python -m fx show --seq "donut:fire:3,plasma::3"tui-ui — cell-accurate terminal UI
cd skills/tui-ui
python -m ui widgets # list all 17 widgets
python -m ui gallery --width 100 --height 30
python -m ui demo table --width 80 --height 12 --theme dashboarddrive-tui — perceive & drive interactive programs
Persistent-session CLI (state survives across shell calls):
smartcli-tui start --cmd "python3 -i -q" --cols 80 --rows 24
smartcli-tui wait-regex --id <SID> ">>> " --timeout-ms 15000
smartcli-tui send-line --id <SID> "print(6*7)"
smartcli-tui snapshot --id <SID>
smartcli-tui close --id <SID>On Windows use py -i -q as the child command. From a source checkout, replace
smartcli-tui with python skills/drive-tui/scripts/tui.py.
Or drive from any MCP client — the same verbs as MCP tools, with the per-session token attached automatically:
pip install smartcli-toolkit
smartcli-mcp # stdio MCP server; smartcli-toolkit is an equivalent aliasAs a library
The shared core is importable directly:
import sys
from smartcli_core import PtySession
s = PtySession()
s.start([sys.executable, "-q"])
s.wait_for(r">>> ") # readiness sync, never a blind sleep
print(s.snapshot().to_text()) # pyte-backed structured screen
s.close()For the full command reference, the screenshot/AGENTCLI harnesses, and the regression
suite, see README-USAGE.md.
Features
cmd-art (skills/cmd-art) — a "living-template" effect engine: an Effect ABC +
@register decorator + auto-discovery. 30 effects (donut, solarsystem, fire, plasma,
rain, starfield, tunnel, text3d, cube, sphere, boids, life, fireworks, sparkle, decrypt,
gradient_text, banner_scroll, image2ascii, typewriter, julia, mandelbrot, perlin, flames, water, nebula, text_flyin, text_converge, text_decrypt, spectrum_bars, cbonsai) across 8 themes (mono, fire,
ocean, synthwave, viridis, pastel, matrix-green, rainbow). Effects are pure frame
producers; play is bounded by default and always restores the terminal.
tui-ui (skills/tui-ui) — a web-like terminal layout engine emitting tmux-safe
ANSI frames (SGR color runs + newlines only; no cursor moves, no alt-screen). 17
widgets (badge, banner, braille_chart, card, fuzzy_filter_list, gradient_rule, kv,
meter, panel, preview_pane, progress, radial_glow, rule, slider_track, table, tabs,
tree) over a real engine:
field.py (shader compositors), raster.py (sub-cell half/quad/braille pixels),
box_junction.py (edge-algebra box joins), color_model.py (honest truecolor → 256 →
16 → mono degrade). Display-cell accurate for CJK/emoji/ZWJ so columns never desync.
drive-tui (skills/drive-tui) — drives interactive terminal programs (REPLs,
menus, pagers, y/N prompts, wizards) through a PTY via a
perceive → decide → act → wait → confirm loop, never a blind sleep. A thin CLI
(scripts/tui.py) offers a persistent detached session and a one-shot run mode, with
an importable pattern library of 8 recipes (repl, menu_select, pager, search_filter,
confirm, form, progress, wizard) that classify() a screen and drive() it.
Shared core (smartcli_core) — the pluggable PTY backend + pyte screen model +
semantic snapshot + readiness sync (pty_backend / screen_model / snapshot / readiness / session). The reusable, importable foundation under all three skills.
Knowledge graph (knowledge/) — a wiki-link graph (140+ .md files) of exact
rendering formulas, ANSI sequences, and measured constants, each note carrying a
source and cross-links. See knowledge/INDEX.md.
Project layout
SmartCLI/
smartcli_core/ shared PTY + pyte engine (importable package)
skills/cmd-art/ fx effect package and CLI (30 effects, 8 themes)
skills/drive-tui/ TUI pattern library and PTY driver CLI (8 recipes)
skills/tui-ui/ terminal UI layout engine and widgets (17 widgets)
tools/screenshot/ pyte -> PNG smoke-test harness
tools/agentcli/ agent-CLI control validation harness
knowledge/ wiki-link knowledge graph, 140+ .md files (see knowledge/INDEX.md)
showcase/ rendered effect PNGs + demo GIFs (shown above)
tests/ direct script-style regressions
research/ archived first-pass research notesDocumentation
README-USAGE.md— the full usage cheat-sheet: every skill, the screenshot and AGENTCLI harnesses, and the regression commands.knowledge/INDEX.md— the knowledge graph (140+.mdfiles).AGENTCLI-VALIDATION.md— agent-CLI control test matrix.CHANGELOG.md— release history.
License
MIT — see LICENSE.
Available Tools
14 toolsaliveARead-onlyIdempotent
Check whether the session's child process is still running.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, and the description adds the specific detail of checking the child process. It does not disclose edge cases like invalid session IDs or return value behavior, but this is minor for a read-only check.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the action and resource, with no unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple check tool, the description adequately states the purpose and the tool name implies a boolean result. The lack of explicit return value documentation is a minor gap, but the tool's simplicity mitigates this.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has one required parameter (sid) with no description, and the tool description only implies sid is the session identifier. It does not explicitly define the parameter format, origin, or constraints, leaving the agent to infer meaning from the purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('check') and a clear resource ('session's child process'), distinguishing it from sibling tools like list_sessions or start. It unambiguously states what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage is implied: use this tool when you need to determine if a session's child process is still running. However, it provides no explicit 'when not to use' or alternatives to other similar tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
closeADestructiveIdempotent
Terminate a session and its daemon. Always close sessions when done.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds the specific detail that the daemon is also terminated, which is beyond the annotations' destructive hint. However, it does not disclose side effects, reversibility, or return behavior. With annotations already indicating destructiveness, this partial additional context earns a middle score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded sentences with no filler. Every word earns its place, and the imperative 'Always close sessions when done' is a clear, useful addition without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (1 param, no output schema), and the description covers the primary action and a usage guideline. However, it omits any mention of return values, potential errors, or what happens to unsaved data, which is relevant for a destructive operation. The presence of annotations helps but does not fully compensate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has one parameter 'sid' with no description (0% coverage), so the description must compensate. Yet the description does not mention 'sid', its purpose, format, or constraints. It is only inferable from tool context, but the description itself adds no semantic value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('terminate') and names the resource ('a session and its daemon'), clearly distinguishing it from sibling tools like list_sessions or start. It fully communicates the tool's core function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The instruction 'Always close sessions when done' provides clear context on when to use this tool. It does not explicitly name alternatives or exclusions, but the context is sufficient given the sibling tools and the lifecycle implied by 'close' versus 'start'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sessionsARead-onlyIdempotent
List active drive-tui sessions.
Returns {"ok", "sessions"}: each entry carries "sid", "port", "pid", "cmd", "cols", "rows", "cwd" and "started".
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds value by specifying the exact return fields and structure, reinforcing that this is a safe, non-mutating observation tool. No contradictions found.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences, front-loaded with the primary action, and the return-field list is compact and information-dense. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter listing tool, the description is nearly complete: it documents the return structure and fields. It does not mention error cases or empty-list behavior, but those are minor in context and not essential for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema fully covers parameter semantics. The description's return-field list indirectly confirms that no inputs are needed, which is sufficient for this case.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'List' and identifies the resource as 'active drive-tui sessions'. It clearly distinguishes this from sibling tools that modify or send input to sessions, and it even documents the return shape.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies the tool is for enumerating active sessions, but it does not explicitly state when to use it instead of alternatives like 'alive' or 'wait_ready'. No exclusions or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resizeBIdempotent
Resize the session's terminal to cols x rows.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| cols | Yes | ||
| rows | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide idempotentHint=true and destructiveHint=false, so the safety profile is known. However, the description adds no additional behavioral context such as side effects, error behavior, or interaction with existing terminal content. It only restates the action without enriching transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the action and target. Every word earns its place, and there is no verbose or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is low complexity, but the description lacks return value information (no output schema) and doesn't mention potential failure modes such as invalid dimensions or non-existent session IDs. It is adequate for a simple resize but leaves open questions about observable effects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It clarifies 'cols' and 'rows' as dimensions via 'cols x rows,' but it does not explain 'sid' beyond the implication from 'session's.' No constraints, bounds, or format details are given, leaving gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Resize' and the resource 'session's terminal' with the target dimensions 'cols x rows.' It is distinct from sibling tools like close, snapshot, or send_text, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when the terminal needs resizing) but provides no explicit exclusions, alternatives, or relationship to other session tools. It doesn't mention when not to use it or what to consider before invoking.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_keysA
Send key tokens, e.g. ["Down", "Down", "Enter"], ["C-c"], ["M-x"].
Named tokens: Enter, Return, Tab, BackTab, Space, Backspace, Delete, Escape, Esc, Up, Down, Right, Left, Home, End, PageUp, PageDown, Insert, F1-F12. Combos: "C-" or "^" (Ctrl — letters plus @, Space, [, , ]) and "M-" (Meta/Alt, ESC prefix). Any other token is not an error — it is typed as literal text.
Arrow keys adapt to the app's cursor-key mode (SS3 under DECCKM, CSI else), so menu navigation works in curses apps.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| keys | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description goes beyond the sparse annotations by disclosing key non-obvious behaviors: unknown tokens are typed as literal text (not errors), and arrow keys automatically adapt to the app's cursor-key mode (SS3 vs CSI) for curses navigation. This gives the agent insight into edge cases that wouldn't be evident from the schema or annotations alone.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is relatively long but all content is functional: examples, token list, combos, and two critical behavioral notes (literal text, arrow-key adaptation). It is front-loaded with examples and well-structured. While it could be slightly more concise, it avoids redundancy and earns its length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and minimal annotations, the description covers the tool's complex input format comprehensively, including edge cases like literal text and arrow-key modes. The main gap is the unexplained 'sid' parameter and lack of any note about return behavior or errors. Given the tool's complexity, the description is largely complete but has small omissions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must explain parameters. It thoroughly explains the 'keys' format, including examples, named tokens, combinations, and literal fallback behavior. However, it entirely omits the 'sid' parameter, which is not self-explanatory from its name/type alone. Thus, only half of the parameters are semantically enriched, leaving a clear gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Send key tokens' with concrete examples (["Down", "Down", "Enter"], ["C-c"]). It distinguishes itself from siblings like send_text/send_line by focusing on key tokens (special keys, combos) rather than arbitrary text. The comprehensive list of named tokens leaves no ambiguity about what constitutes a key token.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides detailed semantics but does not explicitly compare to alternatives. It implies usage when you need to send key presses, combos, or arrow keys, and notes that unknown tokens are typed as literal text, suggesting overlap with send_text. However, no explicit 'use send_text when you want to type text' guidance is given, so the usage context is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_lineA
Type text followed by Enter — the common 'run this command' action.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| text | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, indicating a mutation. The description adds the key behavioral detail that it appends Enter to the text, which is not captured in annotations or schema. It does not cover side effects or prerequisites, but for a simple typing tool this is reasonable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the essential behavior without filler. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with no output schema and two string parameters, the description covers the core action well. However, the 'sid' parameter is not explained, and the description does not mention any side effects beyond typing, which prevents a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description implicitly references the 'text' parameter but gives no meaning for 'sid'. With two required parameters, the description fails to explain the purpose of 'sid', leaving the agent to guess based on the parameter name alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Type text followed by Enter' clearly states a specific verb-action (type text) and the result (followed by Enter), and frames it as 'the common run this command action', which distinguishes it from siblings like send_text or send_keys. It is specific and non-tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'the common run this command action' conveys that this tool is the standard way to execute a command in a session, providing clear usage context. However, it does not explicitly mention alternatives or when not to use it, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_textA
Type literal text into the session (no Enter). Use for filling fields.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| text | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that it types literal text and does not press Enter. With readOnlyHint=false and destructiveHint=false, this adds useful behavioral context beyond annotations. However, it does not describe potential side effects like overwriting existing field content.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with action. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-param tool with annotations, the description covers purpose, usage, and key behavior. Lacks explicit detail on sid and possible side effects, but is sufficient for most agents.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema provides no descriptions for sid or text, so description must compensate. It implies sid is the session identifier and text is the literal text, but does not explicitly define sid or elaborate on text limitations. Partial compensation only.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Type literal text into the session' with a specific verb and resource. Distinguishes from siblings by explicitly noting 'no Enter' and 'filling fields', differentiating from send_line and send_keys.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives usage context: 'Use for filling fields.' Implicitly indicates when to use (form filling) and excludes sending Enter, but does not explicitly reference sibling tools or state when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
snapshotARead-onlyIdempotent
Read a semantic snapshot of the session's current screen.
Returns {"ok", "alive", "alt_screen", "text", "hash", "visual_hash"}:
alt_screen is true while a full-screen program (vim, less, htop, ...)
owns the screen — keys are commands to that program, not input to a
shell, and text is its frame rather than scrollback. text is the
rendered screen; json (the structured cell/cursor model) is included only
when as_json=true. hash covers text content only — use it as the
wait_change baseline; visual_hash also covers styling, selection and
cursor state — use it as the wait_visual_change baseline. Don't mix the
two. This is the 'perceive' step — always snapshot after acting rather
than assuming an action landed.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| as_json | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark it read-only, idempotent, and non-destructive. The description adds substantial behavior: alt_screen semantics, json inclusion only with as_json=true, hash vs visual_hash scoping, and a warning not to mix them. This goes well beyond structured annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two paragraphs, front-loaded with purpose. Every clause adds value: alt_screen behavior, hash baselines, the perceive-step instruction, and parameter effects. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the full burden of return semantics and mostly succeeds, covering ok/alive/alt_screen/text/hash/visual_hash and wait baselines. Minor gaps remain, such as the exact meaning of `sid` and a precise definition of `ok`/`alive`, but the tool is adequately specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains as_json's effect (structured json included only when true) and clarifies text vs json. However, with 0% schema description coverage, the required `sid` parameter is not explicitly described, so the description only partially compensates for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Read a semantic snapshot of the session's current screen' and immediately clarifies its role as the 'perceive' step. This clearly distinguishes snapshot from sibling send/wait/action tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'always snapshot after acting rather than assuming an action landed' and explains how to use hash/visual_hash as baselines for wait_change/wait_visual_change. It does not provide explicit when-not-to-use alternatives, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
startA
Spawn a program in a new detached, persistent session and return its id.
The session survives across tool calls (a localhost-only daemon owns the live
PtySession). cmd is the command line to spawn, e.g. "python3" or
"lazygit". cwd and env configure only the controlled child process.
Returns {"ok", "sid"} on success. Use the returned sid for every other tool.
Server-side limits (violations return an error): at most 8 concurrent
sessions by default (tunable via SMARTCLI_MAX_SESSIONS); sid must be 1-64
chars matching [A-Za-z0-9][A-Za-z0-9_.-]*; env keys must be valid
identifiers and may not start with SMARTCLI_TUI_; cwd must be an existing
directory; terminal size is capped at 1000 cols x 500 rows (100000 cells).
Note: env values pass through the process command line briefly (visible
in ps) — avoid secrets.
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | ||
| cwd | No | ||
| env | No | ||
| sid | No | ||
| cols | No | ||
| rows | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations, the description discloses key behaviors: the session is owned by a localhost-only daemon, persists across calls, has server-side limits (concurrent sessions, sid format, env restrictions, terminal size cap), and env values may be visible in ps. This is rich, non-obvious behavioral context that helps the agent anticipate side effects and constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded: purpose first, then persistence semantics, then parameter details, then constraints, then security note. Every sentence contributes essential information without repetition or fluff, making it readable despite the density.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex 6-parameter tool with no output schema, the description covers purpose, return format, workflow integration, supported parameter range, failure modes, and security implications. It is complete enough for an agent to invoke the tool correctly and to interpret the returned sid.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining cmd with examples, cwd as a required existing directory, env key constraints, sid format, and cols/rows via the terminal size cap and defaults. It also adds security guidance about env values appearing on the command line, which is vital for safe invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence 'Spawn a program in a new detached, persistent session and return its id' is a specific verb+resource statement that clearly distinguishes start from sibling tools like list_sessions, send_text, and close. It also immediately establishes the tool's role as the session creation entrypoint.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains that the session survives across tool calls and instructs 'Use the returned sid for every other tool,' which clearly positions start as the first step in a session lifecycle. It does not explicitly mention alternatives or when-not-to-use, but the context makes the intended workflow clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_anyARead-onlyIdempotent
Wait for ANY of patterns to appear on screen (pexpect expect([...]) style).
Race several possible outcomes at once — e.g. patterns=[">>> ", "Error",
"Password:"] — and learn WHICH happened. Patterns are scanned in list order
each poll, so the earliest in the list wins a same-poll tie (put the most
specific first). Screen lines are right-padded with spaces — end-anchored
patterns never match; use unanchored markers. Returns {"ok", "index",
"matched", "alive", "text", "json"} where index is the 0-based position
of the matched pattern. Timeout is not an error: the call returns ok=true
with index=-1 and matched=false plus the final screen snapshot.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| patterns | Yes | ||
| timeout_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint and idempotentHint annotations, the description discloses critical behavioral traits: list-order tie-breaking, screen-line right-padding making end-anchored patterns never match, and timeout not being an error. These details are crucial for correct invocation and are not present in annotations or schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, then efficiently covers edge cases. Every sentence adds value: example, tie-breaking, padding caveat, return format, timeout semantics. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description fully explains the return object and its key field `index`. It covers the tricky aspects of pattern matching, timeout behavior, and screen padding. The tool is complex (multiple outcomes, tie-breaking, non-error timeout), and the description addresses all of these, making it complete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates for the most important parameters: it explains the semantics of `patterns` (list ordering, tie-breaking) and `timeout_ms` (returns success with index=-1 on timeout). It does not explicitly explain `sid`, but that is a standard session identifier likely inferred from context. Overall, it adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Wait for ANY of `patterns` to appear on screen.' It clearly distinguishes from sibling tools like wait_regex (single pattern) and wait_change by emphasizing racing multiple patterns. The pexpect reference and example make the purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use this tool: 'Race several possible outcomes at once' and gives a concrete example. It also provides ordering and timeout behavior, but does not explicitly contrast with alternative wait tools. The context is clear enough for an agent to decide, though exclusions are absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_changeARead-onlyIdempotent
Block until the screen content changes, then snapshot.
The precise "did my action land?" primitive: call it right after send_line/
send_keys to wait for ANY change from the baseline (default: the screen at
call time; or pass a prior hash to change away from). Returns {"ok",
"changed", "hash", "alive", "text", "json"} — hash is the new screen hash,
reusable as the next baseline. Timeout is not an error: the call returns
ok=true with changed=false plus the final screen snapshot. Can't
false-positive on text that was already on screen, unlike wait_regex.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| timeout_ms | No | ||
| baseline_hash | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes far beyond annotations by explaining the baseline default (screen at call time), hash reuse as next baseline, timeout behavior (returns ok=true with changed=false instead of error), and the exact return object fields. Annotations already indicate read-only and idempotent, but the description adds crucial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences, each essential. The description is front-loaded with the main purpose, then logically details baseline semantics, timeout handling, and return fields—no wasted words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description explicitly lists the return fields and their semantics, covers timeout and baseline behavior, and gives a usage hint. This makes the tool's behavior fully understandable for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description compensates by explaining baseline_hash ('pass a prior hash') and timeout_ms ('Timeout is not an error'). The required sid is not described, but it is a common session identifier across sibling tools, so the gap is minor.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: block until screen content changes, then snapshot. It uses a specific verb ('Block until') and resource ('screen content changes'), and explicitly differentiates from sibling wait_regex by noting it can't false-positive on existing text.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs when to use: 'call it right after send_line/send_keys to wait for ANY change from the baseline.' It also names an alternative (wait_regex) and explains why this tool is better in this scenario, providing clear context and exclusion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_readyARead-onlyIdempotent
Wait for a regex marker OR for the screen to go quiet (stable), then
snapshot. Use marker="" to wait purely for stability.
Returns a snapshot plus reason: "MARKER" (the regex appeared), "STABLE"
(the screen went quiet), or "TIMEOUT". Timeout is not an error: the call
still returns ok=true with the final screen snapshot. Screen lines are
right-padded with spaces — end-anchored markers never match; use
unanchored markers.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| marker | No | ||
| quiet_ms | No | ||
| max_wait_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description richly discloses behavior beyond the annotations: it explains the return reason values ('MARKER', 'STABLE', 'TIMEOUT'), that timeout returns ok=true, and the right-padding caveat affecting marker matching. This adds substantial context beyond the read-only/idempotent annotations and does not contradict them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded. The first sentence gives the primary purpose, followed by a parameter usage note, then return behavior and a critical caveat. Every sentence contributes valuable information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description fully explains return values (snapshot plus reason with possible values), timeout semantics, and the right-padding pitfall. It covers the tool's complexity well and provides enough context for an agent to select and invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema description coverage at 0%, the description must compensate. It does for the marker parameter by explaining it is a regex, should be unanchored, and how to use it for stability-only. It also implies timeout behavior (max_wait_ms) and quiet stability (quiet_ms). However, it does not explicitly describe sid, quiet_ms, or max_wait_ms by name, leaving some reliance on naming conventions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action: 'Wait for a regex marker OR for the screen to go quiet (stable), then snapshot.' It uses a specific verb, resource (screen), and condition (regex or stability), and implicitly distinguishes from sibling wait tools by combining both conditions. The additional note 'Use marker="" to wait purely for stability' further clarifies the tool's purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool, including the variant 'Use marker="" to wait purely for stability.' It also explains timeout behavior ('Timeout is not an error'), which is important usage guidance. However, it does not explicitly contrast with sibling alternatives like wait_regex or wait_change.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_regexARead-onlyIdempotent
Block until pattern (a regex) appears on screen, then snapshot.
Returns {"ok", "matched", "alive", "text", "json"}. Timeout is not an error: the call returns ok=true with matched=false plus the final screen snapshot. Screen lines are right-padded with spaces — end-anchored patterns never match; use unanchored markers. This is the readiness sync — prefer it over a blind delay after send_line/send_keys.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| pattern | Yes | ||
| timeout_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses critical behavioral traits: timeout returns ok=true with matched=false, screen lines are right-padded causing end-anchored patterns to never match, and it lists the exact return fields (ok, matched, alive, text, json). This is valuable context for an agent's decision-making.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded: purpose in the first line, then essential return info and caveats. No filler words; every sentence adds value, from the timeout behavior to the padding trap to the usability recommendation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description provides a complete picture for effective use: return keys, timeout handling, regex padding pitfall, and when to prefer this over a delay. This is sufficient for an agent to select and invoke the tool correctly in most contexts.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains `pattern` as a regex to match on screen and describes the timeout semantics (not an error, returns final snapshot). However, `sid` (session ID) is not explained, and the schema already gives names and types. With 0% schema coverage, the description partially compensates by clarifying two of the three parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb-resource pair: "Block until `pattern` (a regex) appears on screen, then snapshot." This clearly distinguishes it from siblings like wait_change and wait_visual_change by focusing on regex-based screen matching, and the phrase "the readiness sync" reinforces its distinct role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says "This is the readiness sync — prefer it over a blind delay after send_line/send_keys," giving direct guidance on when to use this tool instead of a naive delay. The timeout behavior ("Timeout is not an error") also helps agents handle non-matching cases correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_visual_changeARead-onlyIdempotent
Wait for text, selection styling, or cursor position to change.
Prefer this after arrow/navigation keys in full-screen TUIs. Pass a prior
visual_hash, or omit it to use the current rendered state as the baseline.
Timeout is not an error: the call returns ok=true with changed=false plus
the final screen snapshot.
| Name | Required | Description | Default |
|---|---|---|---|
| sid | Yes | ||
| timeout_ms | No | ||
| baseline_hash | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds valuable behavioral details: timeout is not an error, returns ok=true with changed=false plus the final screen snapshot, and explains how the baseline is chosen. This goes beyond the annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with the core purpose, then usage guidance, then timeout behavior. Every sentence earns its place, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, usage context, baseline behavior, and timeout semantics. Since there is no output schema, it reasonably explains the return contract. Minor gap: 'visual_hash' is not formally defined, but the meaning is clear from context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate. It explains baseline_hash (referred to as 'visual_hash') and how to use it, but it does not explain sid at all. Timeout_ms is self-explanatory from its name and default. This is partial compensation, not complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action: waiting for visual changes in text, selection styling, or cursor position. This specific verb+resource phrasing distinguishes it from siblings like wait_regex, which focuses on textual patterns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit context: 'Prefer this after arrow/navigation keys in full-screen TUIs,' telling the agent when to use this tool. It doesn't explicitly name alternatives, but the preference direction is clear and helpful.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
14 tool updates
v0.2.1- First observed
alive - First observed
close - First observed
list_sessions - First observed
resize - First observed
send_keys - First observed
send_line - First observed
send_text - First observed
snapshot - First observed
start - First observed
wait_any - First observed
wait_change - First observed
wait_ready - First observed
wait_regex - First observed
wait_visual_change
TDQS
Most tools have distinct purposes, but the five wait_* variants (wait_regex, wait_change, wait_visual_change, wait_any, wait_ready) overlap conceptually and could be misselected without careful attention. Send tools and lifecycle tools are clearly separated.
All tools follow a consistent snake_case verb-first convention, with send_* and wait_* prefixes grouping related actions. Single-verb tools like snapshot, close, start, alive, resize fit the pattern naturally.
14 tools is well-scoped for a terminal session manager, covering lifecycle, input, perception, and synchronization without unnecessary bloat. Each tool earns its place in the API.
The set provides comprehensive coverage of the domain: session lifecycle (start, list, close, alive, resize), input (send_text, send_line, send_keys), perception (snapshot), and synchronization (all wait_* tools). No critical gaps are apparent.
Maintenance
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.8619MIT
- AlicenseNot gradedqualityDmaintenanceTerminal MCP server for AI coding agents with persistent PTY sessions, ring-buffer incremental reads, headless xterm screen capture, multi-agent orchestration, and a real-time web dashboard.2423MIT
- AlicenseAqualityDmaintenanceAn MCP server that lets AI agents launch, interact with, and inspect Textual TUI applications headlessly.124MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that lets AI agents see and interact with terminal/CLI applications through virtual terminals and PNG screenshots.153MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dwgx/SmartCLI'
If you have feedback or need assistance with the MCP directory API, please join our Discord server


