Skip to main content
Glama

Stream decrypt data (post-quantum)

crypto_stream_decrypt
Read-onlyIdempotent

Decrypt a post-quantum hybrid STREAM AEAD ciphertext using server-held X25519 and ML-KEM-768 key handles, then wipe plaintext memory after decoding.

Instructions

Decrypt a post-quantum hybrid STREAM AEAD ciphertext using server-held x25519 and ml-kem-768 key handles. Plaintext memory is wiped after decoding.

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>",
      "x25519KeyHandle": "<x25519KeyHandle>",
      "mlKemKeyHandle": "<mlKemKeyHandle>"
    },
    "name": "crypto_stream_decrypt"
  }
}

Input Schema

NameRequiredDescriptionDefault
chunkSizeNoChunk size used during encryption (default 65536).
ciphertextYesBase64-encoded STREAM ciphertext.
mlKemKeyHandleYesHandle of the recipient ML-KEM-768 key. Key handles look like 'kh_' followed by 32 hex characters.
x25519KeyHandleYesHandle of the recipient X25519 key (or 32-byte symmetric-256 key). Key handles look like 'kh_' followed by 32 hex characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly=true, idempotent=true, destructive=false and closed-world, so the safety profile is covered. The description adds genuine context beyond that: the keys are server-held handles (never raw key material) and plaintext memory is wiped after decoding. It does not say what happens on AEAD authentication failure or on a stale/destroyed key handle, which are the behaviors an agent most needs.

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?

Two sentences, front-loaded with the operation and its key inputs, with the memory-wipe note as a secondary security remark. Dense technical phrasing but no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description should say what comes back — raw plaintext, base64-encoded plaintext, or a decoded string — and it does not. Combined with the missing chunkSize-match caveat and failure-mode behavior, the definition is adequate but leaves real gaps for a decryption primitive.

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 four parameters are already documented, including handle format and base64 encoding — the baseline is 3. The description adds only a small clarification that both handles refer to server-held recipient keys, and it says nothing extra about chunkSize beyond what the schema already states.

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?

The description gives a specific verb (decrypt) plus a precise resource (post-quantum hybrid STREAM AEAD ciphertext) and names the exact key material involved (x25519 + ml-kem-768 handles). It is unambiguous about what operation is performed, but it never distinguishes this from the nearby crypto_decrypt or crypto_stream_multi_decrypt siblings, so the agent must infer which decrypt variant applies.

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 guidance at all: nothing says this is for stream-mode ciphertexts produced by crypto_stream_encrypt versus single-shot crypto_decrypt, and nothing points to crypto_stream_multi_decrypt for multiple chunks. Nor does it state the precondition that chunkSize should match the value used at encryption time, which is the most likely invocation mistake.

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