Skip to main content
Glama

Group security events

castle_group_events
Read-only

Aggregate matching events by one or more fields — the fast way to see which IPs, devices or countries dominate a spike. Read-only despite being a POST. Castle: POST /v1/events/group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-based page number.
filtersYesCastle query filters, ANDed together. Each is {field, op, value} — e.g. {"field":"user.email","op":"$eq","value":"a@example.com"}. Operators: $eq, $neq, $in, $nin, $like, $nlike, $contains, $ncontains, $starts_with, $nstarts_with, $ends_with, $nends_with, $matches, $nmatches, $ip_range, $nip_range, $relative_range (value {gt,gteq,lt,lteq} in seconds ago), $range, $exists. Call castle_get_events_schema first to see the available field names.
results_sizeNoResults per page, 1-100.
group_by_fieldsYesFields to group by, e.g. ["ip", "user.email"]. Names come from the event schema.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint, and the description usefully resolves the mismatch by stating 'Read-only despite being a POST' — exactly the kind of context an agent needs when the HTTP verb would otherwise imply mutation. It does not cover pagination limits or result-size behavior, but the route hint (POST /v1/events/group) adds traceability.

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?

Two tight sentences: the purpose/benefit first, then the behavioral caveat and endpoint. No filler, nothing repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description could say more about the shape of the aggregation result, but it does establish the read-only nature, the endpoint, and the schema prerequisite. Adequate for a 4-parameter aggregation 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?

Schema description coverage is 100%, so filters, group_by_fields, page and results_size are all documented in the schema itself. The description adds no syntax or semantics beyond a generic mention of grouping, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (aggregate/group) and resource (matching security events) plus the grouping fields involved, so the operation is unambiguous. It does not name a sibling for contrast, but 'aggregate' versus a search/list tool is self-evident.

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 a clear motivating context — 'the fast way to see which IPs, devices or countries dominate a spike' — and a concrete prerequisite ('Call castle_get_events_schema first'). It stops short of naming an explicit alternative such as castle_search_events for when grouping is not wanted.

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.