Skip to main content
Glama

GTPv2-C sessions

gtp_sessions
Read-onlyIdempotent

Pairs GTPv2-C requests with responses by sequence number and peer, then reports session messages, subscriber IDs, APN, TEIDs, cause codes and latency, filterable by IMSI, APN or TEID.

Instructions

Pair GTPv2-C requests with responses by sequence number and peer pair. A response sent by the request's target towards another address (a NAT or proxy boundary) is paired too and its path is given as response_path. Reports message names (Create Session, Modify Bearer, Delete Session, Echo, ...), IMSI, MSISDN, APN, F-TEIDs with interface names, cause code and name, allocated UE address (PAA), round-trip ms and unanswered: true. Narrow with imsi (digits), apn (case-insensitive; a network identifier such as internet also matches internet.mnc001.mcc001.gprs) or teid (decimal or 0x hex; matches the header TEID or any F-TEID): the matching requests select sequence numbers, then both halves of each transaction are fetched so responses are kept. filter is a raw display filter ANDed with gtpv2, e.g. gtpv2.message_type == 32; it applies literally to each packet. More detail: resource schema://tools/gtp_sessions.

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": "<path>"
    },
    "name": "gtp_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
apnNoAPN (DNN) name, such as internet
endNoSame forms as start
imsiNoIMSI, 6 to 15 digits
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
teidNoGTP TEID: an int or hex string such as 0xc001
limitNoMost rows per page
startNoISO 8601, epoch s, +Ns from start, -Ns from end
filterNoExtra display filter, ANDed
offsetNoRows to skip (next_offset)
outputNosummary: all but rows, plus 3 rows (<8 KB)rows
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff
columnsNoRow keys to keep (frame keys stay)
max_output_kbNoLower output cap, KB

Output Schema

NameRequiredDescriptionDefault
countNo
errorNo
offsetNo
windowNo
droppedNo
summaryNokeys: by_message, unanswered, failed, legs_without_response, legs_near_capture_end, unanswered_near_capture_end, duplicates
has_moreNo
returnedNo
selectionNo
next_offsetNo
total_foundNo
transactionsNorows with keys: time, src, dst, request_frame, answer_frame, rtt_ms, unanswered, unmatched_answer, leg_without_response, near_capture_end, duplicate_of_frame, chain, note, message, response, seq, teid, imsi, msisdn, apn, rat_type, ebi, request_fteids, cause, cause_name, accepted, paa, response_fteids, response_path
total_matchedNo
packets_matchedNo
packets_scannedNo
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so safety is covered; the description goes further by disclosing the pairing algorithm, NAT/proxy response_path handling, the unanswered flag, and that `filter` is ANDed with gtpv2 and applied literally per packet. It does not discuss cost, paging limits trade-offs, or performance on large captures, which is the only real gap.

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?

The pairing behavior and the filter semantics are front-loaded, and each sentence carries information rather than restating the name. The filter paragraph is dense and slightly over-packed, but nothing is padding.

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 13-parameter transaction tool with an output schema and full annotation coverage, the description covers the hard parts an agent cannot infer: the pairing model, NAT-boundary pairing, and filter interaction with implicit sequence expansion. The enumerated output fields are somewhat redundant against the existing output schema, but they do no harm.

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 would be 3, but the description genuinely enriches the filter parameters: imsi as digits, apn as case-insensitive with suffix matching against internet.mnc001.mcc001.gprs, teid as decimal or 0x hex matching the header TEID or any F-TEID, and filter's AND-with-gtpv2 semantics. The remaining parameters (start/end, limit, offset, redact, columns, output) are left to the schema.

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?

The opening sentence states the specific operation (pair requests with responses) on a specific protocol resource (GTPv2-C), including the join key: sequence number plus peer pair. It also carves out a behavior siblings like diameter_sessions wouldn't have (cross-address pairing at a NAT/proxy boundary), so an agent can distinguish it from the other transaction/session tools.

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?

It gives clear guidance on how to narrow results with imsi, apn, teid, or a raw filter, and explains the important non-obvious consequence that filters select sequence numbers and therefore return both halves of each transaction. What it lacks is explicit steering among alternatives — e.g. gtp_ies or diameter_sessions or filter_packets — so the agent gets context but no exclusions.

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