Skip to main content
Glama

Decrypt data

crypto_decrypt
Read-onlyIdempotent

Decrypts and authenticates AES-256-GCM or ChaCha20-Poly1305 ciphertext with a symmetric-256 key handle plus nonce and authentication tag.

Instructions

Decrypt and authenticate an AES-256-GCM or ChaCha20-Poly1305 ciphertext with a symmetric-256 key handle.

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>",
      "keyHandle": "<keyHandle>",
      "iv": "<iv>",
      "authTag": "<authTag>"
    },
    "name": "crypto_decrypt"
  }
}

Input Schema

NameRequiredDescriptionDefault
ivYesHex-encoded 96-bit nonce (24 hex characters).
authTagYesHex-encoded 128-bit authentication tag.
algorithmNoAlgorithm used for encryption ('aes-256-gcm' or 'chacha20-poly1305'). Default is 'aes-256-gcm'.
keyHandleYesHandle of the symmetric-256 key. Key handles look like 'kh_' followed by 32 hex characters.
ciphertextYesHex-encoded ciphertext.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds one genuinely useful behavioral fact beyond that: the operation authenticates, implying failure on a bad authTag. It does not say what error surfaces on tag mismatch, whether the key handle must be pre-imported/authorized, or how plaintext is returned.

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?

A single front-loaded sentence with zero filler; the operation, authentication property, algorithm set and key type all appear immediately.

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?

With five fully documented parameters and comprehensive annotations, the definition is close to self-sufficient; the algorithm list and authentication note cover the main non-schema facts. The remaining gap is return-value semantics (plaintext encoding) and failure behavior on an invalid auth tag, which matter because no output schema exists.

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% with per-parameter patterns, lengths and enum values already spelled out. The description only echoes the algorithm names and key-handle notion, adding no format or constraint detail 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 pair ("Decrypt and authenticate") plus the resource (AEAD ciphertext), naming both supported algorithms and the key type (symmetric-256 key handle). This implicitly separates it from the stream and KEM decrypt siblings, though it never names them explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no reference to the many sibling decrypt tools (crypto_stream_decrypt, crypto_kem_decapsulate, crypto_hybrid_kem_decapsulate). The agent must infer that this tool pairs with crypto_encrypt and applies only to single-message AEAD ciphertexts.

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