Skip to main content
Glama

get_history

Retrieve recent terminal line history captured by the background daemon, optionally with wall-clock timestamps and session ID, to correlate commands with test framework logs.

Instructions

Retrieve recent chronological line history captured by the background daemon.

By default, each line is prefixed with an accurate wall-clock timestamp [YYYY-MM-DD HH:MM:SS.mmm] captured at the transport reception level. If a line was split across packets with a pause of >= 50ms (e.g. driver pause, delayed response), the continuation line is prefixed with '↳ ' and tagged with its own timestamp for precise correlation against test framework logs.

Args: limit: Number of recent lines to retrieve (default: 50). with_timestamps: If True (default), attaches wall-clock timestamps and continuation symbols on the fly. If False, returns raw clean text lines without timestamps. session_id: Target session ID (defaults to currently active session).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
session_idNo
with_timestampsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Without annotations, the description carries full burden and does well: it explains the wall-clock timestamp format, the 50ms split-detection heuristic, continuation-line tagging ('↳ '), and the effect of with_timestamps=False. It does not state permissions or whether history is mutable, but these are less central for a read operation. Strong behavioral disclosure overall.

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 purpose sentence followed by detailed behavioral notes and a concise Args section. It is somewhat verbose on timestamp mechanics but every sentence conveys distinct, useful information.

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 3-parameter read tool with an output schema (so return format need not be explained), the description covers purpose, parameter meaning, and timestamp/continuation behavior thoroughly. Only the absence of annotation-level safety context is a minor gap.

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 description coverage is 0%, so the description must compensate—and it does: it explains limit (count of recent lines), with_timestamps (attaches timestamps/continuation symbols vs raw text), and session_id (defaults to active session). It adds clear semantics beyond the bare schema types.

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 specific verb (Retrieve) and resource (recent chronological line history) with clear scope ('captured by the background daemon'). The distinction from sibling read_buffer (buffer content) is implicit via 'chronological line history' but the tool's identity as a history-retrieval tool is unambiguous.

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?

Implies usage context through defaults and the session_id parameter, but provides no explicit when-to-use versus alternatives like read_buffer or exec_expect. No when-not-to-use guidance is present.

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