Skip to main content
Glama

Recent events

recent_events
Read-onlyIdempotent

Fetches recent events from a Nostr relay, newest first, filtered by kind, author, age, or tags. Verifies signatures and drops invalid ones.

Instructions

Fetches recent events from a relay, newest first, optionally filtered by kind, author and age. Content is cleaned (hidden characters removed) and truncated. Signatures are verified; events with a bad signature are dropped and counted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter by single-letter tags, e.g. {"e": ["<event id>"]} for events that reference an event, {"p": ["<pubkey>"]} for mentions, {"t": ["bitcoin"]} for hashtags. e and p take 64-hex values.
kindsNoOnly these event kinds (e.g. [1] for notes, [7] reactions).
limitNoHow many events (1-100).
relayNoRelay URL (wss://…). It must be one of the configured relays; default: the first one. See nostrclaw_status.
relaysNoSeveral relays (each must be configured): the same question goes to all of them and the answers are merged without duplicates; the result says what each relay returned. Overrides `relay`.
authorsNoOnly these authors (64-hex public keys).
sinceHoursNoOnly events newer than this many hours.
maxContentCharsNoTruncate each content to this many characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.14.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive/openWorld, so the safety profile is done. The description adds genuinely non-obvious behavior: content is cleaned of hidden characters and truncated, signatures are verified, and bad-signature events are silently dropped but counted. That post-processing disclosure is valuable context beyond structured fields.

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?

Three tight sentences, front-loaded with purpose, then filters, then processing caveats. No filler or repetition of 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?

For an 8-parameter read tool with no output schema and annotations already covering safety, the description covers purpose, ordering, filtering and the cleaning/verification pipeline. It could say more about how dropped events are reported or how multi-relay results are surfaced, but nothing critical is missing.

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 tags, kinds, limit, relay/relays, authors, sinceHours and maxContentChars in detail. The description only restates a subset (kind, author, age) and adds the ordering fact; it contributes little parameter meaning beyond the schema, 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 ('fetches recent events from a relay'), plus ordering ('newest first') and the filter axes (kind, author, age). It is clearly distinguishable from count_events or relay_overview by implication, but it never names a sibling to sharpen the boundary.

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 phrase 'optionally filtered by kind, author and age' implies the intended use case, but there is no explicit when-to-use versus alternatives such as count_events (counting) or compare_relays (relay comparison), and no exclusions. Usage is inferable rather than stated.

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