Skip to main content
Glama

nostr_query_events

Query Nostr events from a relay pool using NIP-01 filters. Supports filter by kind, author, time, and tags.

Instructions

Query events from the configured relay pool using NIP-01 filters. Supports kinds, authors, since/until/limit, and tag filters (#e, #p, #d, #t). Returns an array of events as plain objects (id, kind, pubkey, created_at, content, tags, sig). The workhorse read tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
d_tagNoFilter for addressable events with these `d` tag values. Maps to NIP-01 `#d`.
e_tagNoFilter for events tagging these event IDs (hex). Maps to NIP-01 `#e`.
kindsNoFilter by event kind numbers (e.g. [0, 1, 30017]).
limitNoMax events to return. Default 50, hard cap 500.
p_tagNoFilter for events tagging these pubkeys (hex). Maps to NIP-01 `#p`.
sinceNoUnix timestamp (seconds). Only events at or after this time.
t_tagNoFilter for events with these hashtag `t` values. Maps to NIP-01 `#t`.
untilNoUnix timestamp (seconds). Only events at or before this time.
authorsNoFilter by author pubkeys (32-byte hex).
Behavior2/5

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

No annotations exist, so the description must disclose behavioral traits. It does not mention that this is a read-only operation with no side effects, nor does it discuss authentication, rate limits, or potential errors. The word 'Query' implies reading, but it is not explicit.

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 description is a single paragraph of ~40 words. It front-loads the purpose, lists filters, mentions return format, and ends with a characterizing phrase. No redundant sentences, but could be slightly more structured.

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 9-parameter tool with no output schema, the description covers the return format, filter types, and source (configured relay pool). It mentions the limit default and maximum in the schema, but the description doesn't add pagination or error handling context. Overall adequate.

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 coverage is 100%, so baseline is 3. The description summarizes the filter types (kinds, authors, etc.) and adds context about NIP-01 mapping, which adds some value but does not go beyond summarizing existing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Query', the resource 'events', and specifies it uses NIP-01 filters. It lists the supported filter types and calls itself 'The workhorse read tool', which clearly distinguishes it from sibling publish/decode tools.

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

Usage Guidelines4/5

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

The description implicitly indicates this is the primary read tool for events, and there are no sibling tools that query events, so usage context is clear. However, no explicit when-to-use or when-not-to guidance is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/llmops-pro/nostr-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server