Skip to main content
Glama

Castle MCP by usefulapi

Search security events

castle_search_events
Read-only

Query the security event stream — logins, registrations, transactions and their risk verdicts. Read-only despite being a POST: Castle takes the query in the body. Castle: POST /v1/events/query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-based page number.
columnsNoOnly return these event fields.
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.
query_typeNoReturn matching records, just a count, or both. Defaults to records.
results_sizeNoResults per page, 1-100.

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?

Annotations already declare readOnlyHint=true, but the description adds genuinely useful context beyond them by resolving the tension the agent would otherwise hit: 'Read-only despite being a POST: Castle takes the query in the body.' It also names the concrete endpoint POST /v1/events/query. Pagination limits and rate-limit behavior are still unaddressed.

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 sentences, zero filler, with the purpose front-loaded and the read-only/POST clarification following. The endpoint reference is compact and useful rather than redundant padding.

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?

For a 5-parameter search tool with 100% schema coverage and no output schema, the description covers purpose, read semantics and transport. It does not explain ordering, default page size or result-shape expectations, but the description is not obligated to cover return values here.

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 already documents filters, columns, page, results_size and query_type thoroughly, including the operator list and the pointer to castle_get_events_schema. The description adds no parameter-level meaning on top of that, so the baseline 3 is correct.

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 — 'Query the security event stream' — and enumerates the payload ('logins, registrations, transactions and their risk verdicts'), so an agent knows exactly what comes back. It does not, however, differentiate itself from the aggregation sibling castle_group_events, which also targets the event stream.

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?

Usage is implied by the resource ('search security events') but there is no explicit when-to-use or when-not-to-use guidance, and no mention of alternatives such as castle_group_events for aggregated views. The instruction to call castle_get_events_schema first lives in the schema, not the description, so the description itself routes nothing.

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.