Skip to main content
Glama
dwgx

SmartCLI

by dwgx

snapshot

Read-onlyIdempotent

Perceive the current terminal screen to verify actions. Returns visible text, alternate-screen status, and hashes for change detection.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidYes
as_jsonNo
Behavior5/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

Install Server

Other Tools

Latest Blog Posts

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