Skip to main content
Glama

Compare two captures

compare_captures
Read-onlyIdempotent

Compare a working and failing packet capture of the same procedure to align message ladders and report the first divergence, changed steps, and timing gaps.

Instructions

Compare a working and a failing capture of the same procedure. Builds the message ladder of each (the trace_subscriber timeline for imsi/msisdn; give imsi_b/ msisdn_b when capture B is a different subscriber; without any identity, every Diameter, GTPv2-C, MAP and SIP transaction of the file), drops keepalives (CER, DWR, Echo), merges consecutive identical retries into one step with repeat, aligns the two ladders by protocol and message, and reports first_divergence (the first step that is missing, replaced or different), every aligned step with its op (same, changed, replaced, only_a, only_b) and, for changed steps, the differences: result, pairing, the key Diameter AVPs (flags, Cancellation-Type, subscription APNs, ...) and the GTP IEs (APN, RAT, cause, F-TEID interfaces, PAA allocated); identities are ignored. timing lists the largest round-trip and offset gaps. Both captures share one time budget. limit caps the ladder rows returned (default 100).

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": {
      "path_a": "<path_a>",
      "path_b": "<path_b>"
    },
    "name": "compare_captures"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoSame forms as start
imsiNoIMSI, 6 to 15 digits
limitNoMost rows per page
startNoISO 8601, epoch s, +Ns from start, -Ns from end
imsi_bNoIMSI in the second capture, when it differs
msisdnNoMSISDN (E.164 digits, no +)
offsetNoRows to skip (next_offset)
outputNosummary: all but rows, plus 3 rows (<8 KB)rows
path_aYesFirst capture (working, or before): absolute path
path_bYesSecond capture (failing, or after): absolute path
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff
columnsNoRow keys to keep (frame keys stay)
msisdn_bNoMSISDN in the second capture, when it differs
max_output_kbNoLower output cap, KB
collapse_repeatsNoFold repeated identical messages into one step

Output Schema

NameRequiredDescriptionDefault
aNokeys: path, identity, steps, messages, duration_s, by_protocol, unanswered, failed, passes
bNokeys: path, identity, steps, messages, duration_s, by_protocol, unanswered, failed, passes
countNo
errorNo
notesNo
ladderNorows with keys: op, a, b, differences, ladder_position, after
offsetNo
timingNo
windowNo
droppedNo
summaryNo
has_moreNo
returnedNo
identicalNo
next_offsetNo
total_foundNo
total_matchedNo
packets_matchedNo
packets_scannedNo
first_divergenceNokeys: op, a, b, differences, ladder_position, after
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/non-destructive annotations: it discloses preprocessing (keepalives dropped, consecutive identical retries folded into one step with `repeat`), alignment strategy, that identities are ignored when diffing, that both captures share one time budget, and that limit caps ladder rows at 100.

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 purpose, then the mechanics; nearly every clause carries information. The middle mechanics section is one very long run-on sentence, which slightly hurts scanability but does not add waste.

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?

For a 15-parameter diff tool with an output schema, this covers what an agent needs: the comparison model, identity handling, repeat collapsing, shared time budget, and result shape (first_divergence, op values, differences, timing). Nothing material 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 coverage is 100%, so the baseline is 3, but the description adds genuine semantics: identity selection and the differing-subscriber case for imsi_b/msisdn_b, the no-identity scope, collapse_repeats/`repeat`, and the meaning of limit. It leaves limit-vs-max_output_kb-vs-output interactions only lightly touched.

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?

Opens with a specific verb and resource ('Compare a working and a failing capture of the same procedure') and then enumerates the artifacts produced (message ladder, first_divergence, per-step op, differences, timing), which distinguishes it from trace_subscriber or capture_index without needing their schemas.

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?

Establishes a clear use case (working vs failing capture of the same procedure) and gives conditional guidance for the parameters — supply imsi_b/msisdn_b only when capture B is a different subscriber, and the no-identity fallback is spelled out. It does not name a sibling alternative or state when not to use it, so it falls short of explicit routing.

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