Skip to main content
Glama

Scroll in terminal

terminal_scroll

Scroll up or down inside full-screen console programs by sending mouse-wheel events to a pane or cell; pagers and lists scroll, while non-mouse apps receive arrow keys.

Instructions

Turn the mouse wheel over a cell of a full-screen program: scroll a pager, a file list, a log pane. Behaves as a terminal emulator does — programs that track the mouse receive wheel events at that cell (so the pane under it scrolls); full-screen programs that do not (less, man) receive arrow keys instead. At a plain shell prompt there is nothing to scroll and the call fails: earlier output is read with terminal_read and its page argument, not by scrolling.

Input Schema

NameRequiredDescriptionDefault
colNo1-indexed column the pointer is over. Matters when panes scroll independently. Default: screen center.
rowNo1-indexed row the pointer is over. Default: screen center.
amountNoWheel notches. Most programs move about 3 lines per notch. Default 3.
idleMsNo
directionYes"up" moves toward earlier content, "down" toward later.
maxWaitMsNo
sessionIdYesNumeric id of the session to target. Get one by calling terminal_create. Use terminal_list to enumerate currently-known ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare this is a non-read-only, non-idempotent action, and the description goes well beyond them by disclosing the emulation semantics: mouse-tracking programs receive wheel events at the cell while non-tracking programs (less, man) receive arrow keys instead, plus the failure mode at a bare prompt. It stops short of describing timing behavior for idleMs/maxWaitMs or what the call returns on success.

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?

Four sentences, front-loaded with the mechanism and progressively narrowing to the dual-mode behavior and then the failure case. Every clause carries information an agent needs; no restatement of the tool name or schema.

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 7-parameter mutation tool with no output schema and no annotation coverage of behavior, the description covers the hard parts: what it does, how programs respond, and when it fails. It leaves the timing parameters and the success response undefined, which is a modest but real gap.

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?

Schema coverage is 71%, and the description reinforces the coordinate model by explaining that the target cell matters 'when panes scroll independently' — which clarifies row/col intent beyond the raw bounds. However, it says nothing about amount, idleMs, or maxWaitMs, whose schema entries are terse or absent, so the coverage gap is not compensated.

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?

States a concrete verb and mechanism ('turn the mouse wheel over a cell of a full-screen program') and enumerates the resources it acts on (pager, file list, log pane). It also explicitly distinguishes itself from the sibling terminal_read, so an agent can choose between them without opening either schema.

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

Usage Guidelines5/5

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

Gives positive conditions (full-screen program pane under the cell), an explicit when-not (a plain shell prompt has nothing to scroll and the call fails), and names the alternative for that case: terminal_read with its `page` argument. This is close to a complete decision rule.

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