Skip to main content
Glama

Aggregate traffic by field

malcolm_aggregate
Read-only

Count distinct values in network traffic by aggregating into top-N buckets per field. Use it to identify top talkers, protocol distributions, or other field value rankings.

Instructions

Aggregate network traffic into top-N value buckets for one or more fields.

    Use this to count distinct values (top talkers, protocol distribution)
    rather than fetch documents — for the documents themselves use
    malcolm_search. For distinct values of a single field with less setup,
    malcolm_field_values is simpler. Returns the raw Malcolm /mapi/agg
    response (bucket keys with doc counts); when no buckets came back and an
    aggregated or filtered field is not one Malcolm indexes, the correct
    field name is reported above the response.

    With no time_from this covers only the LAST 24 HOURS, unlike
    malcolm_search which covers all history. Against a capture older than a
    day that returns an empty bucket list, which reads as "no such traffic"
    when it means "nothing in the last day" — suspect the window before the
    data.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax buckets per aggregation level.
fieldsYesComma-separated field names to aggregate on; multiple fields give multi-level buckets. E.g. "network.protocol"; "source.ip,destination.ip"; "rule.name,suricata.alert.severity".
doctypeNoTarget index selector (see malcolm_search). Empty = network index.
filtersNoJSON filter object (Malcolm filter syntax, see malcolm_search).{}
time_toNoEnd time, dateparser format. Empty = now.
time_fromNoStart time, dateparser format. Empty = the LAST 24 HOURS (unlike malcolm_search, which defaults to all history) — pass a range to reach older data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds critical behavior: returns raw /mapi/agg response, reports correct field name when an aggregated field isn't indexed, and defaults to LAST 24 HOURS. This goes well beyond the annotation safety profile.

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?

Three tightly written paragraphs: purpose, usage, and behavioral caveats. Every sentence provides actionable information; no filler or repetition.

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 a tool with 6 parameters, output schema, and sibling complexity, the description covers purpose, selection criteria, edge cases (empty buckets, time window), and return format. An agent can correctly invoke it without additional context.

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?

All six parameters have schema descriptions covering 100% of the schema. The description adds the time_from default context, but this is also in the schema. Baseline 3 is appropriate since the schema does the heavy lifting.

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 'Aggregate network traffic into top-N value buckets for one or more fields', which is a specific verb+resource+scope. It clearly differentiates from sibling tools by stating when to use malcolm_search and malcolm_field_values instead.

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?

Explicit guidance: 'Use this to count distinct values (top talkers, protocol distribution) rather than fetch documents — for the documents themselves use malcolm_search. For distinct values of a single field with less setup, malcolm_field_values is simpler.' Also warns about the 24-hour default window and how to avoid empty results.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nagameTW/mcp-server-malcolm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server