Skip to main content
Glama

Cause and result code lookup

cause_lookup
Read-onlyIdempotent

Decode what a telecom cause or result code means for Diameter, GTP, SIP, NAS and other protocols, returning the meaning, spec reference and related codes for a ticket.

Instructions

What a telecom cause or result code means, with the spec reference to quote in a ticket. No capture is read. protocol is one of diameter, gtpv2, gtpv1, pfcp, nas_emm, nas_esm, nas_5gmm, nas_5gsm, s1ap, ngap, sip, q850, isup, camel_release, map, tcap_abort, sccp_return, sgsap, rp, cp, tp_status, http_sbi, dns, tls, icmp, icmpv6, http, nas. code: 78, "0x4e"; s1ap/ngap "radioNetwork:21"; icmp "3:13"; http_sbi a cause ("USER_NOT_FOUND"). For Diameter, application (s6a, s13, gx, gy, rx, cx, sh, swx, s6b, s6c, sgd, t6a, or base) picks the Experimental-Result-Code meaning: 5001 or 5004 differ between the base Result-Code and an application. message (a SIP method such as REGISTER or INVITE) adds the note for that message. Returns name (from tshark's own value strings, name_source says so, otherwise the server's table), meaning, ref, typical_causes, related codes and check_next (which tool to run on the capture); explained: false means only the name is known. Give query instead of code to list the codes whose name or meaning contains every word ("apn", "roaming").

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": {
      "protocol": "<protocol>"
    },
    "name": "cause_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoThe code: 78, "0x4e", "radioNetwork:21" (s1ap, ngap) or a ProblemDetails cause (http_sbi)
limitNoMost rows per page
queryNoWords to search the cause names for
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)
messageNoSIP method the code answered (REGISTER, INVITE, ...)
protocolYesdiameter, gtpv2, gtpv1, pfcp, nas_emm, nas_esm, s1ap, ngap, sip, q850, map, ... (see the description)
applicationNoDiameter application name (s6a, gx, gy, rx, cx, sh, s13, swx) or id
max_output_kbNoLower output cap, KB

Output Schema

NameRequiredDescriptionDefault
avpNo
refNo
alsoNo
codeNo
nameNo
noteNo
codesNorows with keys: code, name, avp, explained, meaning, protocol
countNo
errorNo
knownNo
queryNo
offsetNo
windowNo
droppedNo
meaningNo
messageNo
relatedNo
has_moreNo
protocolNo
returnedNo
explainedNo
by_messageNo
check_nextNo
applicationNo
name_sourceNo
next_offsetNo
total_foundNo
message_noteNo
other_tablesNo
tshark_fieldNo
total_matchedNo
by_applicationNo
typical_causesNo
packets_matchedNo
packets_scannedNo
application_noteNo
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the baseline is lower. The description adds useful behavior such as `explained: false` meaning only the name is known and that `check_next` points to the next tool, but it is mostly lookup mechanics rather than additional operational constraints.

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 first sentence is front-loaded and every section maps to a parameter or behavior. It is dense and the long protocol enumeration weighs it down, but the density is mostly justified for an 11-parameter lookup tool.

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?

The description covers the code formats, protocol-specific exceptions, Diameter application semantics, query alternative, return fields, and the meaning of partial results. With annotations and an output schema also present, this is complete enough for an agent to call the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite full schema coverage, the description adds real meaning: it explains code forms like 78, "0x4e", and "radioNetwork:21", how Diameter `application` selects the Experimental-Result-Code interpretation, and how `message` adds a SIP-method-specific note. That is substantive semantics beyond the schema text.

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 description opens with a precise statement of purpose: translating a telecom cause/result code into meaning plus a spec reference. It clearly frames the tool as a lookup resource and distinguishes it from capture-reading tools with 'No capture is read.'

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 explicitly tells the agent to use `query` instead of `code` when listing codes by name or meaning, and clarifies that the tool does not read a capture. That is strong conditional guidance, though there is no direct comparison with sibling lookup tools.

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