Skip to main content
Glama

Get Command History

get_command_history
Read-only

Retrieve Packet Tracer terminal command history with timestamps, device names, and prompts to review lab steps, spot typos, or build command cheat sheets.

Instructions

Return Packet Tracer's command log: commands typed into device terminals (by a person in the CLI tab, or by send_terminal_command/verify_connectivity; send_cli_command and configure_device are not logged), with time, device and prompt (so the mode is visible, e.g. "R1(config-if)#"). Great for reviewing how a lab was solved, spotting a typo, or building a study sheet of the commands used. Most recent last.

Examples:

  • "What commands did I type on R1?"

  • "Make me a cheat sheet from the commands I used in this lab"

  • "Which command did I mistype?"

Input Schema

NameRequiredDescriptionDefault
nameNoOnly this device (display name); omit for all devices
limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description is consistent with that. Beyond annotations it adds genuinely useful behavior: the ordering (most recent last), the exact fields captured (time, device, prompt/mode), and the sourcing rules for the log. It does not mention truncation behavior when results exceed the default limit, which matters for a log-shaped return.

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 definition and scoping rules, then use cases, then compact examples. The parenthetical about logging sources is dense but every clause carries information; only the example block is mildly redundant with the stated use cases.

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?

An output schema exists, so return-value shape needn't be explained, and the description covers sourcing, ordering, and result content well. The remaining gap is the undocumented `limit` parameter and resulting truncation semantics, which an agent needs to call it correctly on a large log.

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 only 50%: the `name` filter is documented in schema but `limit` is undocumented anywhere. The description reinforces the per-device filter through its examples ("What commands did I type on R1?") but says nothing about the limit or default of 200 / max 2000, leaving a parameter the agent must set blind.

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 and resource (return the command log of commands typed into device terminals) and precisely scopes what counts by naming the populating tools (send_terminal_command, verify_connectivity) and the excluded ones (send_cli_command, configure_device). An agent can distinguish this from the sibling log/command tools without opening any schema.

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?

Gives concrete when-to-use scenarios (reviewing how a lab was solved, spotting a typo, building a cheat sheet) backed by user-style example queries, and implies a when-not by explicitly stating which sibling commands are not captured. It stops short of naming a specific alternative tool (e.g. get_console_log) for the excluded logs, so routing in that direction is left to inference.

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