Skip to main content
Glama

events query

events_query
Read-only

Declarative query over a JSON event log (array, NDJSON or a URL to either, up to 500,000 events) without writing a parser: filter on dotted field paths (eq, ne, gt, gte, lt, lte, contains, regex, in, exists, missing), sort by a field, compute the delta and percent change between successive events (optionally per group_by key, e.g. per agent) and keep only events whose delta crosses a threshold, collapse runs shorter than N consecutive events, pick output fields, and get group counts, delta stats and a manifest of every field the query assumed. Built for agent traces, latency logs and state-transition dumps. Costs $0.004 USDC per call (x402).

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": {
      "events": "<events>"
    },
    "name": "events_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
deltaNo{field, op (gt|lt|abs), threshold}
limitNo
whereNo[{field, op, value}]
eventsYesJSON array, NDJSON string, or URL
selectNocomma-separated field paths
sort_byNo
group_byNo
collapse_runs_shorter_thanNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With readOnlyHint and openWorldHint already declared, the description still adds real behavioral context: the per-call cost ($0.004 USDC via x402), the 500,000-event ceiling, and that no parser needs to be written. It omits how payment is settled and any rate/error behavior, but the cost and scale disclosures go well beyond the annotations.

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?

Purpose is front-loaded in the first clause, followed by a compact enumeration of capabilities, then a use-case line and a cost line. It is dense and the opening sentence is a long run-on, but every clause carries distinct information rather than restating the name.

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 complex 8-param tool with no output schema, the description covers inputs, the shape of returned artifacts (group counts, delta stats, field manifest) and the payment model. Remaining gaps are minor: the 'limit' parameter and the mechanics of satisfying the x402 charge are not addressed.

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?

Against 50% schema coverage and 8 params (with nested where/delta objects), the prose compensates well: it explains the filter operator set, delta computation with optional per-group_by keying and threshold crossing, run collapse, and output-field selection. Only 'limit' is left unexplained, and the schema's nested descriptions (where, delta) are echoed rather than contradicted.

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?

The description opens with a precise verb+resource ('Declarative query over a JSON event log') and enumerates the exact operations supported, so its scope is unmistakable. It does not, however, name or contrast itself with the sibling 'events' tool, leaving that differentiation to inference rather than stating it.

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?

'Built for agent traces, latency logs and state-transition dumps' implies the intended domain, which is useful context for choosing it. But there is no explicit when-to-use vs. when-not guidance and no named alternative, so an agent must infer selection from the use-case phrasing alone.

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.

Resources