Skip to main content
Glama

nostr_decrypt_dm

Decrypt a Nostr DM ciphertext using the signer's encrypt/decrypt interface, auto-detecting NIP-44 or NIP-04. Provide the encrypted content and sender's public key to retrieve the plaintext.

Instructions

Decrypt a single DM ciphertext using the signer's encrypt/decrypt interface. Useful when you already have a kind:4 event from elsewhere (e.g., nostr_query_events) and just need the plaintext. Auto-detects NIP-44 vs NIP-04 by default. Same NOSTR_DM_TOOLS_ENABLED gate as send/list — reading plaintext is still a confidentiality surface.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoEncryption scheme. `auto` (default) tries NIP-44 first, falls back to NIP-04. Force a specific scheme if you know which the sender used.
ciphertextYesThe encrypted message payload (the `content` field of a kind:4 event).
sender_pubkeyYesAuthor pubkey of the event (32-byte hex).
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses auto-detection of NIP-44 vs NIP-04, the tool gate, and confidentiality concerns. It does not detail error behavior or authentication requirements, but the provided information is adequate for a decryption tool.

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 sentences, each essential: core function, usage context, and technical detail with a warning. No redundancy, perfectly front-loaded.

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?

Given no output schema and three parameters, the description covers purpose, usage, and behavioral traits. It lacks explicit mention of the return value format (plaintext string) and error handling, but the tool is straightforward enough that these are minor gaps.

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 coverage is 100%, so baseline is 3. The description adds concrete context for the version parameter (auto-detection) beyond the schema's enum explanation, providing practical guidance.

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 tool decrypts a single DM ciphertext, specifying the resource (DM ciphertext) and action (decrypt). It distinguishes from siblings by noting it's useful when already having a kind:4 event from nostr_query_events, avoiding confusion with send/list 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 provides clear context on when to use (when you have a kind:4 event) and mentions the NOSTR_DM_TOOLS_ENABLED gate and confidentiality surface. It does not explicitly state when not to use, but the context is sufficient for an AI agent.

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