Skip to main content
Glama

Diameter sessions

diameter_sessions
Read-onlyIdempotent

Groups Diameter traffic by Session-Id to show application, hosts/realms, subscriber IMSI, timing, command codes, result codes, failures, and paired transactions; filter by session/IMSI/command code.

Instructions

Group Diameter traffic by Session-Id. Each session gives the application, origin and destination hosts and realms, User-Name (IMSI), first/last timestamp and duration, the request and answer command codes seen, every Result-Code or Experimental-Result-Code, counts of unanswered and failed transactions (with unanswered_near_capture_end for those the capture stopped too soon after to tell, as in diameter_transactions), the worst round-trip, and the list of transactions (request paired with its answer by Hop-by-Hop id, with RTT). Narrow with session_id (exact), imsi (User-Name digits) or command_code (e.g. 316 for ULR): matching messages select the sessions, then every message of those sessions is fetched so answers are not lost. filter is an extra display filter ANDed with diameter. Messages without a Session-Id (DWR, CER) are counted, not listed.

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": "diameter_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoSame forms as start
imsiNoIMSI, 6 to 15 digits
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
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)
session_idNoDiameter Session-Id
command_codeNoDiameter command code, such as 316 (ULR) or 272 (CCR)
max_output_kbNoLower output cap, KB

Output Schema

NameRequiredDescriptionDefault
countNo
errorNo
offsetNo
windowNo
droppedNo
summaryNokeys: sessions, unanswered, unanswered_near_capture_end, failed, without_session_id, by_application
has_moreNo
returnedNo
sessionsNorows with keys: session_id, first_time, last_time, duration_ms, application_id, application, origin_host, destination_host, origin_realm, destination_realm, user_name, src, dst, transaction_count, request_codes, answer_codes, result_codes, unanswered, unanswered_near_capture_end, failed, max_rtt_ms, transactions
selectionNo
next_offsetNo
total_foundNo
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.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds genuinely non-obvious behavior: filters select sessions and then *every* message of those sessions is fetched so answers are not lost, and Session-Id-less messages (DWR, CER) are counted rather than listed. Those two facts materially change how an agent interprets results and are not derivable from schema or annotations.

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 grouping behavior and then the filter mechanics, with no filler sentences. The long enumeration of returned fields is somewhat redundant given an output schema exists, which keeps it from a 5.

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 aggregation tool, the description covers the grouping model, filter interaction, and edge cases an agent needs before calling it. The field inventory duplicates what the output schema already provides, and pagination behavior is left entirely to the schema, so it is strong but not fully optimized.

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 goes further by defining matching semantics per filter (exact vs. User-Name digits vs. command code) and how `filter` composes with the implicit `diameter` filter. It does not touch limit/offset/output/redact, which the schema already documents adequately.

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+resource+grouping key: 'Group Diameter traffic by Session-Id.' It is immediately distinguishable from the sibling diameter_transactions (per-transaction) and from diameter_avps, and it names the session-level outputs an agent would get.

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 narrowing options (session_id exact, imsi digits, command_code e.g. 316) and explains how each selects sessions, plus the role of `filter` as an ANDed extra. It references diameter_transactions for the near-capture-end caveat but does not state an explicit routing rule like 'use diameter_transactions instead when you want individual messages only.'

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