Skip to main content
Glama

RTP streams and call quality

rtp_streams
Read-onlyIdempotent

Extract RTP streams and quality metrics linked to SIP calls, including loss, jitter, RTCP reports, and MOS estimates; use heuristic decoding when SIP/SDP is missing.

Instructions

RTP streams with quality figures, linked to their SIP call. Per stream (SSRC plus source and destination address:port): the Call-ID whose SDP advertised the destination (or source) address and port (linked_by), payload type and codec from the SDP rtpmap (or the static payload-type table), packets, expected, lost and lost_pct, duplicates, sequence_errors, out_of_order, max/mean interarrival delta, RFC 3550 max/mean jitter in ms, duration, the reverse stream's SSRC or one_way, RTCP reception reports about the stream (fraction lost, cumulative lost, jitter, round trip where the LSR matches a captured SR) and mos_estimate: a simplified G.107 E-model score from loss, jitter, delay and codec. It is an ESTIMATE from network metrics only (method and inputs are returned), never a measured MOS. rtcp_xr lists RTCP XR VoIP metrics the endpoints reported themselves. call_id keeps the streams of one call (RTP to or from its SDP addresses is read, so a NATed source is still found); ssrc (decimal or 0x hex) keeps one stream. tshark decodes RTP from the SDP in the capture; for a capture without the SIP signalling set heuristic: true (heuristic RTP/RTCP over UDP, may misread other UDP traffic as RTP). filter is ANDed with the RTP filter.

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

Input Schema

NameRequiredDescriptionDefault
endNoSame forms as start
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
ssrcNoRTP SSRC: decimal or 0x hex
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
call_idNoSIP Call-ID of the call
columnsNoRow keys to keep (frame keys stay)
heuristicNoAlso decode RTP without SIP/SDP (heuristic RTP over UDP)
max_output_kbNoLower output cap, KB

Output Schema

NameRequiredDescriptionDefault
callsNorows with keys: call_id, sdp
countNo
errorNo
notesNo
offsetNo
windowNo
droppedNo
rtcp_xrNorows with keys: frame, time, reporter_ssrc, r_factor, mos_lq, mos_cq, round_trip_ms
streamsNorows with keys: ssrc, src, dst, call_id, linked_by, sdp_frame, payload_type, codec, codec_source, clock_rate, payload_types, first_time, last_time, duration_s, first_frame, last_frame, packets, expected, lost, lost_pct, duplicates, sequence_errors, out_of_order, max_delta_ms, mean_delta_ms, max_jitter_ms, mean_jitter_ms, telephone_event_packets, marker_packets, rtcp, mos_estimate, reverse_ssrc, one_way, expected_one_way, issues
summaryNo
has_moreNo
returnedNo
mos_methodNo
next_offsetNo
total_foundNo
total_matchedNo
display_filterNo
packets_matchedNo
packets_scannedNo
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare a safe read-only, idempotent operation, and the description adds real behavioural context on top: `mos_estimate` is explicitly an E-model estimate from network metrics only, never measured, with method and inputs returned; `rtcp_xr` is distinguished as endpoint-reported rather than derived; and the heuristic mode is flagged as possibly misreading other UDP traffic as RTP. It also explains that NATed sources are still found because RTP to/from the SDP addresses is read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is well front-loaded, but the long run-on enumeration of per-stream fields (loss, jitter, RTCP reports, mos_estimate, etc.) is largely redundant given an output schema exists, and it pushes the operationally important caveats about heuristic decoding to the very end. Dense prose with semicolon-separated clauses makes it harder to scan than it needs to be.

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 13-parameter analysis tool with annotations and an output schema, the definition covers the remaining risk areas: interpretation of the MOS estimate, the difference between derived and reported RTCP XR metrics, how stream-to-SIP linking works, and the failure mode of heuristic decoding. Nothing an agent needs in order to call it correctly is left unstated.

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 beyond the schema for the parameters that matter: `call_id` is described as keeping all streams of one call including NATed sources, `ssrc` accepts decimal or 0x hex, and `heuristic`/`filter` behaviour (ANDed with the RTP filter) is spelled out. Pagination and redaction parameters get no extra narrative, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific resource (RTP streams) plus a specific capability (quality figures linked to their SIP call), and the paragraph goes on to enumerate exactly what a stream record contains. It never explicitly distinguishes itself from near neighbours such as capture_quality or sip_call_detail, so an agent must infer the boundary from the field list rather than being told.

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?

Concrete usage conditions are given: `call_id` scopes to one call, `ssrc` scopes to one stream, and `heuristic: true` is prescribed for captures lacking the SIP signalling. What is missing is explicit routing — no sentence says when to prefer this over capture_quality or sip_call_detail, leaving alternative selection to the agent.

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