Skip to main content
Glama

Media path check (one-way audio, 488)

media_path_check
Read-onlyIdempotent

Checks a call's media path by comparing SDP offer/answer against captured RTP per direction, exposing one-way, missing, NAT/relay, and codec issues.

Instructions

Check one call's media path: the SDP offer and answer (the last completed exchange, so a re-INVITE wins) against the RTP actually captured in each direction. directions gives, for offerer to answerer and back, the expected source and destination from the SDP, the streams seen and a status: as negotiated, arrives from another source (NAT or relay), sent elsewhere, or missing. issues explain one-way or no audio and failed calls: no_rtp, one_way_media, source_differs_from_sdp, nat_not_latched (a private SDP address whose far end keeps sending to it), rtp_to_wrong_address, private_sdp_address, media_direction (sendonly, recvonly, inactive), media_rejected (port 0), payload_type_not_negotiated, codec_mismatch (no codec in common between the offer and the answer, or the SDP of a 488) and no_answer. verdict is the most telling issue in one sentence. RTP to or from the call's SDP addresses is read; heuristic: true also decodes RTP that no SDP in the capture set up.

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>",
      "call_id": "<call_id>"
    },
    "name": "media_path_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoSame forms as start
pathYesCapture file (absolute, in an allowed dir) or open_capture handle
startNoISO 8601, epoch s, +Ns from start, -Ns from end
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff
call_idYesSIP Call-ID of the call
heuristicNoAlso decode RTP without SIP/SDP (heuristic RTP over UDP)

Output Schema

NameRequiredDescriptionDefault
errorNo
foundNo
offerNo
answerNo
issuesNorows with keys: kind, detail
windowNo
call_idNo
verdictNo
directionsNorows with keys: direction, expected, status, streams
failure_sdpNo
rtp_streamsNo
common_codecsNo
display_filterNo
packets_scannedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare that this is a read-only, idempotent, closed-world, non-destructive operation, so the description does not need to cover safety. It does add real behavioral scope: RTP is read only to or from the call's SDP addresses, and heuristic decoding of unsignaled RTP happens only when heuristic:true. That is useful context beyond the structured fields, but the fallback when the SDP is absent and the effect of a redacted result are not described, so it stays at 3.

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 purpose is front-loaded in the first clause, followed by what directions and issues contain. The enumeration of issue codes is dense but each token earns its place by naming a diagnosable condition. The long parenthetical asides (NAT not latched, 488, sendonly/recvonly) make it harder to scan, which keeps it at 4.

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?

An output schema exists, and annotations cover safety, so the description does not owe the agent a return-value spec; it does owe scope and edge cases, and it supplies both (last SDP exchange wins, RTP limited to SDP addresses unless heuristic). It is complete for a complex diagnostic tool, with only a minor gap in not stating prerequisites for the capture or the time-window parameters.

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 schema already documents all six parameters and the baseline is 3. The description nevertheless explains what heuristic:true actually does (decodes RTP that no SDP set up) and implies that path accepts a capture file or an open_capture handle. It says nothing about start, end, or redact beyond the schema, so it earns only one step above baseline.

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 description uses a specific verb and resource: it checks one call's media path by comparing the last completed SDP offer/answer against the RTP actually captured in each direction. That is far more precise than 'media check', and 'one call' scoping separates it in spirit from capture-wide siblings like rtp_streams. It falls short of a 5 because it never names a sibling or states which tool to use for packet-level or stream-level views.

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?

Usage context is clear: the tool is for one-way or no audio and for failed calls such as a 488, which the title reinforces. The notion of 'last completed exchange, so a re-INVITE wins' tells the agent when this view is authoritative. No explicit when-not or alternative-tool routing is given, so it does not reach 5.

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