Skip to main content
Glama

Structurally diff two SIP messages

diff_sip_messages
Read-only

[cost: free (pure CPU, no network) | read-only, no persistence]

Take two SIP messages (typically the same request observed at two adjacent hops - e.g. the INVITE leaving FreeSWITCH and the INVITE arriving at Kamailio) and surface a structured per-header diff: added, removed, mutated (with old/new value), duplicated (single header → many), de-duplicated, whitespace-only-change, parameter-reorder (Via params, From tag), and body-changed. SDP bodies on both sides are delegated to compareSdp for codec / DTLS / ICE diffs.

Use FIRST when the user has two captures or two log lines that should be carrying the same message and wants to know what an intermediate proxy / SBC / B2BUA changed. Far more reliable than visual inspection.

Pair with: parse_sip_message to inspect either side in isolation; lint_sip_request if the diff reveals the downstream side became malformed; search_sip_docs(vendor=<intermediate>) once you know which hop's behavior is the source of the change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesSIP message as observed at the *downstream* hop (e.g. what Kamailio believes it received).
beforeYesSIP message as observed at the *upstream* hop (e.g. what FreeSWITCH believes it sent).
labelAfterNoDisplay label for the downstream side. Default "after".after
labelBeforeNoDisplay label for the upstream side. Default "before".before

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, but description adds 'cost: free (pure CPU, no network) | read-only, no persistence' and details internal behavior like delegating SDP to compareSdp. This is genuinely useful context beyond annotations, with no contradiction.

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

Conciseness5/5

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

Although longer than minimal, every sentence earns its place: it opens with cost/read-only tag, then a concise functional summary, followed by explicit usage guidance and sibling pairings. The structure is front-loaded and scannable with no filler.

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 tool is complex (diff categories, SDP delegation, hop semantics), but the description covers all essential behavioral aspects without an output schema. It explains the diff output categories, edge cases like parameter reordering, and the delegation to compareSdp, making it self-sufficient for an agent.

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

Parameters3/5

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

Schema coverage is 100%, so each parameter already has a clear description (e.g., 'before' and 'after' with hop directions). The description reinforces this with examples but does not add significant new parameter-specific meaning beyond the schema's coverage.

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 clearly states the tool's function: 'Take two SIP messages ... and surface a structured per-header diff' with specific categories (added, removed, mutated, etc.). It distinguishes from siblings by naming exact alternatives and when to use them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use ('when the user has two captures or two log lines that should be carrying the same message'), and provides direct alternatives and pairings: 'parse_sip_message to inspect either side in isolation; lint_sip_request if the diff reveals the downstream side became malformed; search_sip_docs(vendor=<intermediate>)'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes. The only notable overlap is between detect_sip_stack and detect_sip_vendor_from_config, which could cause confusion. Otherwise, each tool covers a unique aspect of SIP debugging.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (e.g., compare_sdp_offer_answer, detect_sip_stack, validate_stir_shaken_identity). No mixing of styles.

Tool Count4/5

22 tools is slightly above the typical 3-15 range, but each tool serves a specific and necessary function for comprehensive SIP debugging. The count is justified by the server's broad scope.

Completeness4/5

The tool set covers a wide range of SIP debugging tasks: parsing, diffing, DNS, STIR validation, config review, codec comparison, etc. Minor gaps exist (e.g., no dedicated RTP analysis tool), but core workflows are well-supported.