Skip to main content
Glama

query_events

List recent events for an agent, newest first, with optional limit and event-type filtering to audit agent activity and trace what happened.

Instructions

List recent events for an agent.

Args:
    agent:      Agent identifier to query
    limit:      Number of events to return (default 20)
    event_type: Filter by event type, e.g. "tool_call" (optional)

Returns:
    List of events ordered by time (most recent first)

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": {
      "agent": "<agent>"
    },
    "name": "query_events"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentYes
limitNo
event_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose ordering (most recent first) and the default limit of 20, which is genuinely useful, but it says nothing about how far back "recent" reaches, whether results are paginated or capped, permissions/auth requirements, or error behavior.

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?

The docstring pattern is well structured and front-loaded: one-line purpose, then Args, then Returns. Every line is substantive, though the default of 20 is stated redundantly with the schema default.

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 simple three-parameter read tool with no output schema, the definition covers all parameters and summarizes the return ordering. Remaining gaps (recency window, pagination, valid event types) are meaningful but modest for a tool of this complexity.

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?

Schema description coverage is 0%, so the description must compensate, and it largely does: it explains agent as the identifier to query, limit as count with default 20, and event_type as an optional filter with an example value ("tool_call"). It stops short of listing valid event_type values or the expected format of the agent identifier.

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 first line gives a specific verb and resource ("List recent events for an agent") plus a scoping constraint ("for an agent"). It is clear what the tool returns, but it never names a sibling to contrast with, so the agent must infer that log_event is the write counterpart.

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 only implied by "List recent events"; there is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named. An agent can guess this is the read path but gets no help distinguishing it from retrieval tools like get_context or search_memory.

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