Skip to main content
Glama
mcp-interactive-terminal

mcp-interactive-terminal

by hugo94z

terminal_screen

Capture the rendered terminal screen with cursor position, showing exactly what a human sees, including prompts and TUI. Optionally prepend scrollback history lines for context.

Instructions

Return the rendered terminal screen (VT emulation) with cursor position.

This is the clean view: cursor moves, erases and color codes are applied, so it shows exactly what a human would see, including the current prompt or TUI.

Args: session_id: Session returned by terminal_start. max_chars: Maximum characters returned (head+tail with an omission marker). history: Number of scrollback lines to prepend to the visible screen (0 = viewport only).

Returns: text, cursor {x,y}, cols, rows, running, exit_code, history_lines, history_available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "terminal_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
historyNo
max_charsNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • addedInput schema / properties / history
      Added value: +{
      +  "default": 0,
      +  "title": "History",
      +  "type": "integer"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explains that VT emulation applies cursor moves, erases and color codes, that max_chars truncates head+tail with an omission marker, and that history prepends scrollback. It omits blocking behavior, whether the read is side-effect free, and any session-lifetime caveats, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core sentence, then cleanly separated Args and Returns blocks. Slightly verbose in the second sentence but every clause adds behavioral information; nothing is redundant 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?

No output schema exists, and the description compensates by enumerating the return fields (text, cursor x/y, cols, rows, running, exit_code, history_lines, history_available). Combined with the parameter docs this is nearly sufficient for a terminal-state tool; only concurrency/state-change behavior is unaddressed.

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?

Schema coverage is 0%, so the description must compensate and largely does: session_id is tied back to terminal_start, max_chars is described as head+tail truncation with an omission marker (non-obvious behavior), and history is defined as scrollback lines with '0 = viewport only'. No ranges or units are given, but the semantics that matter for correct invocation are present.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Return the rendered terminal screen (VT emulation)') plus the distinguishing qualifier that this is the clean, rendered view rather than raw output. It does not name the sibling it contrasts with (e.g. terminal_read), so an agent must infer the boundary, which keeps it short of a 5.

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 phrase 'this is the clean view ... exactly what a human would see, including the current prompt or TUI' implies the use case: inspecting visual state. But there is no explicit when-to-use/when-not statement and no named alternative for retrieving raw bytes, so guidance remains 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.