Skip to main content
Glama

Check a display filter

check_filter
Read-onlyIdempotent

Validates a Wireshark display filter without reading a capture, returning compile errors, offsets, warnings, and field names so you can fix syntax before passing it to another tool.

Instructions

Check a Wireshark display filter without reading any capture: tshark compiles it against an empty capture and its own error comes back in errors, with error_at giving the offset and length of the part it points at (e.g. "nosuch.field" is not a valid protocol or protocol field, "0x100000000" too big for this field). When dftest is installed beside tshark, its warnings (deprecated names such as "ssl" or "bootp") come back in filter_warnings; warnings_checked says whether it ran. fields lists the fields and protocols the filter names, with their types. The server's own lint (no ;, backquote or $ outside quotes, ||/&& rather than a single |/&, no control characters) is applied first. Use it before passing a filter to another tool.

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": {
      "filter": "<filter>"
    },
    "name": "check_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
filterYesDisplay filter to check
redactNoReplace subscriber identifiers in this result with tokens; ids+ips hides every IP toooff

Output Schema

NameRequiredDescriptionDefault
errorNo
validNo
errorsNo
fieldsNorows with keys: field, name, type, protocol, display, description
filterNo
windowNo
error_atNokeys: offset, length
rejected_byNo
filter_warningsNo
warnings_checkedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, and the description adds real mechanism: compilation against an empty capture, error offsets via error_at, optional dftest warnings, and a server-side lint pass applied first. However, the output field names (errors, error_at, filter_warnings, warnings_checked, fields) are return values rather than behavior beyond annotations, and the presence of an output schema makes much of that redundant.

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?

Front-loaded with purpose and mechanism, with concrete error message examples that earn their space. It is a single dense block with output-field detail that partly duplicates the output schema, costing a point.

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?

Given annotations, a full schema, and an output schema, the definition covers what the check does, the two failure surfaces (tshark errors with offsets, dftest warnings), the lint precheck, and when to call it. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is 100% and the one required param is self-documenting, so the schema already carries the load; the description clarifies that the filter is compiled rather than executed, which adds modest meaning. The redact parameter is not discussed at all in the description.

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?

Specific verb and resource ("Check a Wireshark display filter") plus the key scoping fact that it requires no capture, which cleanly separates it from filter_packets and other capture-bound siblings.

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?

Ends with an explicit directive: "Use it before passing a filter to another tool." That establishes context and prerequisite clearly; it stops short of naming when-not-to-use or naming a sibling, so not a 5.

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