Skip to main content
Glama

Find tshark fields

find_fields
Read-onlyIdempotent

Search tshark field and protocol definitions by abbreviation, name, or description to build display filters or field lists for packet analysis. Filter results by protocol and paginate rows.

Instructions

Search the fields and protocols this tshark knows (tshark -G fields) to build a display filter or a fields list for filter_packets. Every word of query must appear in the field's abbreviation, name or description (case-insensitive), e.g. "result code", "teid", "Session-Id" or "retransmission". protocol keeps only the fields of one protocol (its abbreviation, e.g. "diameter", "gtpv2", "tcp"). Rows give the field abbreviation, its name, type (FT_UINT32, FT_STRING, ... or "protocol"), its protocol and description; the exact abbreviation comes first, then abbreviations that start with or contain the query, then names, then descriptions. No capture is read.

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": {
      "query": "<query>"
    },
    "name": "find_fields"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMost rows per page
queryYesWords or part of a field name, such as 'result code'
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)
protocolNoKeep fields of this protocol (diameter, gtpv2, sip, ...)
max_output_kbNoLower output cap, KB

Output Schema

NameRequiredDescriptionDefault
countNo
errorNo
queryNo
fieldsNorows with keys: field, name, type, protocol, display, description
offsetNo
windowNo
droppedNo
has_moreNo
protocolNo
returnedNo
next_offsetNo
total_foundNo
total_matchedNo
packets_matchedNo
packets_scannedNo
total_is_lower_boundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent, closed-world read, and the description reinforces that with 'No capture is read.' It adds real behavioral detail beyond annotations: AND semantics for multi-word queries, case-insensitive matching across abbreviation/name/description, and deterministic result ordering (exact abbreviation, then prefix/contains, then names, then descriptions). It does not discuss pagination or the summary mode, which the schema covers instead.

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?

Dense but front-loaded: purpose, then query semantics, then protocol filter, then row shape and ordering. The row-format sentence partially duplicates the output schema, but the ordering information it carries is not otherwise available, so it still earns its place.

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?

For an 8-parameter lookup tool with full schema coverage, an output schema, and annotations, nothing an agent needs to invoke it correctly is missing: matching rules, protocol scoping, result ordering, and the no-capture-read guarantee are all stated.

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 baseline is 3, but the description genuinely adds meaning: `query` matches all words case-insensitively against abbreviation, name, or description (the schema only says 'words or part of a field name'), and `protocol` is specified to take a protocol abbreviation. Other parameters (limit, offset, output, redact, columns, max_output_kb) are left entirely to the schema.

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?

States a specific verb and resource: searching the field/protocol registry that tshark knows (`tshark -G fields`). It explicitly separates this from capture-reading tools with 'No capture is read' and names filter_packets as the downstream consumer, so an agent can place it precisely among 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?

Gives clear context for use: build a display filter or a `fields` list for filter_packets, with concrete query examples. It does not name an alternative for adjacent tasks (e.g. validating a finished filter with check_filter), so exclusion guidance is implied rather than stated.

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