Compare two captures
compare_capturesCompare 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
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Same forms as start | |
| imsi | No | IMSI, 6 to 15 digits | |
| limit | No | Most rows per page | |
| start | No | ISO 8601, epoch s, +Ns from start, -Ns from end | |
| imsi_b | No | IMSI in the second capture, when it differs | |
| msisdn | No | MSISDN (E.164 digits, no +) | |
| offset | No | Rows to skip (next_offset) | |
| output | No | summary: all but rows, plus 3 rows (<8 KB) | rows |
| path_a | Yes | First capture (working, or before): absolute path | |
| path_b | Yes | Second capture (failing, or after): absolute path | |
| redact | No | Replace subscriber identifiers in this result with tokens; ids+ips hides every IP too | off |
| columns | No | Row keys to keep (frame keys stay) | |
| msisdn_b | No | MSISDN in the second capture, when it differs | |
| max_output_kb | No | Lower output cap, KB | |
| collapse_repeats | No | Fold repeated identical messages into one step |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | keys: path, identity, steps, messages, duration_s, by_protocol, unanswered, failed, passes | |
| b | No | keys: path, identity, steps, messages, duration_s, by_protocol, unanswered, failed, passes | |
| count | No | ||
| error | No | ||
| notes | No | ||
| ladder | No | rows with keys: op, a, b, differences, ladder_position, after | |
| offset | No | ||
| timing | No | ||
| window | No | ||
| dropped | No | ||
| summary | No | ||
| has_more | No | ||
| returned | No | ||
| identical | No | ||
| next_offset | No | ||
| total_found | No | ||
| total_matched | No | ||
| packets_matched | No | ||
| packets_scanned | No | ||
| first_divergence | No | keys: op, a, b, differences, ladder_position, after | |
| total_is_lower_bound | No |