Skip to main content
Glama

pt_read_packet_trace

Read a simulation's event list to see what each packet did and why, including per-layer decision logs that reveal the cause of dropped pings or failed connections.

Instructions

Reads the simulation's event list: what each packet did and WHY.

Besides the path (device, ingress/egress port, source, destination, traffic type and outcome) it returns the decision log that PT generates per OSI layer — the same text as the "PDU Details" panel of its GUI. That is where the real cause of a failing ping shows up, for example: "The next-hop IP address is not in the ARP table."

Requires Simulation mode with generated traffic (pt_simulation_mode(on=True) and then a ping, or pt_simulation_step so the events move on).

Parameters:

  • limit: maximum frames to return (1-200, default 20).

  • device: if given, only the frames that went through that device.

  • include_decisions: if False, omits the per-layer log (shorter reply).

Example: see why a ping is dropped: pt_read_packet_trace(limit=10)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pt_read_packet_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
deviceNo
include_decisionsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.4/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 mostly does: it declares the tool reads (non-mutating), names the required simulation state, notes that include_decisions=False yields a shorter reply, and bounds limit to 1-200. It does not state what happens when no events exist, whether the log is truncated, or anything about ordering/pagination.

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?

Well front-loaded and segmented — purpose, returned content, prerequisites, parameters, example — so an agent can skim. A few phrases are editorial ("That is where the real cause of a failing ping shows up"), but they justify the tool's value rather than padding it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 values need not be enumerated, yet the description still characterizes the payload (path, outcome, per-layer decision text) in terms of the GUI panel users know. Combined with stated prerequisites, parameter semantics, and an example, nothing essential for correct invocation is missing.

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 for all three parameters: limit's range and default, device as a filter to frames that traversed that device, and include_decisions as a verbosity toggle. The one gap is the expected format of the device value (name vs. ID vs. case sensitivity), which is left unstated.

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 ("Reads the simulation's event list: what each packet did and WHY") and defines the scope as per-packet OSI-layer decision logs, which distinguishes it from the sibling table readers like pt_read_arp or pt_read_routes. An agent can tell what it gets back without opening the 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 preconditions — Simulation mode must be on via pt_simulation_mode(on=True) and traffic must have been generated by a ping or advanced with pt_simulation_step — plus a worked example call. It stops short of explicitly saying when to prefer a sibling (e.g. pt_read_arp for a raw ARP table vs. this tool for the decision log), so routing between alternatives is implicit.

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

Deploy Server

Other Tools