Skip to main content
Glama

Structurally parse a single SIP message

parse_sip_message
Read-only

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

Parse a single raw SIP message (request OR response) and return a structured view: start line (method/status), every header in order with line numbers, body, duplicate-header counts, and a list of structural flags the parser noticed (missing-crlf, tag-on-pai, tag-on-ppi, invalid-folding, duplicate-single-instance, content-length-mismatch).

Use FIRST when the user pastes a single INVITE / 200 / NOTIFY and asks 'what does this look like to a parser?' or 'is this even valid?'. The output makes header-level bugs (two From: headers, ;tag= on PAI/PPI, missing CRLF between headers, broken Identity folding) obvious without an LLM having to scan visually.

Pair with: lint_sip_request for the full RFC compliance suite (request only); diff_sip_messages to compare two parsed messages structurally; validate_stir_shaken_identity if the message carries an Identity header.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesRaw SIP message text. Should start with a request line (`INVITE sip:...@... SIP/2.0`) or status line (`SIP/2.0 200 OK`). Headers must be CRLF or LF separated.

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description reinforces this with 'read-only, no persistence' and adds cost-free/pure CPU/no-network details. It also discloses the structural flags the parser detects, which is valuable behavioral context beyond the annotations. No contradiction found.

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?

The description is well-structured with a cost/read-only prefix, a detailed output summary, explicit usage guidance, and a pairing section. Every sentence is purposeful, and there is no wasted or redundant wording despite the length.

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?

Although there is no output schema, the description enumerates the exact return elements: start line, headers in order with line numbers, body, duplicate-header counts, and a list of structural flags. It also names sibling tools and gives clear scope boundaries, making it fully complete for an agent to decide to invoke the tool.

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?

The only parameter 'text' has 100% schema description coverage, including max length and delimiter expectations. The tool description adds the context of 'single raw SIP message' but does not introduce new parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

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 states a specific verb and resource: 'Parse a single raw SIP message (request OR response) and return a structured view', followed by detailed output components. It additionally distinguishes itself from siblings by naming lint_sip_request, diff_sip_messages, and validate_stir_shaken_identity as complementary tools with different purposes.

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?

The description explicitly tells the agent when to use this tool ('Use FIRST when the user pastes a single INVITE / 200 / NOTIFY...') and gives concrete alternative tools for related tasks. This makes the selection decision unambiguous.

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.