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.
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": {
"ciphertext": "<ciphertext>",
"sender_pubkey": "<sender_pubkey>"
},
"name": "nostr_decrypt_dm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Encryption scheme. `auto` (default) tries NIP-44 first, falls back to NIP-04. Force a specific scheme if you know which the sender used. | |
| ciphertext | Yes | The encrypted message payload (the `content` field of a kind:4 event). | |
| sender_pubkey | Yes | Author pubkey of the event (32-byte hex). |