Skip to main content
Glama

Castle MCP by usefulapi

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. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, and the description reinforces this with the useful clarification 'Read-only despite being a POST' — a genuinely helpful note that prevents an agent from avoiding the tool out of write-operation caution. It stops short of describing pagination or result shape.

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: purpose and use case first, then the read-only clarification and endpoint. No filler, and the most decision-relevant facts are front-loaded.

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 readOnlyHint covering the safety profile and full schema coverage of all four parameters, the definition is nearly self-sufficient. The one remaining gap is that no output schema exists and the description does not characterize the aggregated result shape, though the grouping semantics imply it.

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 the schema fully documents filters, group_by_fields, page and results_size, including operator lists. The description adds no parameter-level meaning beyond restating that grouping takes 'one or more fields,' 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 and resource: 'Aggregate matching events by one or more fields,' and names the grouping mechanism. It distinguishes itself conceptually from castle_search_events (aggregation vs. listing) but never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'the fast way to see which IPs, devices or countries dominate a spike' gives a concrete use case, which implies when the tool is appropriate. However, it never states when NOT to use it or names castle_search_events as the alternative for raw event retrieval, leaving the routing decision to inference.

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.