Skip to main content
Glama

Hybrid post-quantum KEM decapsulate

crypto_hybrid_kem_decapsulate

Derive the combined X25519 + ML-KEM shared secret from stored key handles and ciphertext, returning an opaque symmetric-256 key handle without exposing private key material.

Instructions

Recover a Post-Quantum Hybrid KEM shared secret (X25519 + ML-KEM) using server-held x25519 and ml-kem key handles. Returns a symmetric-256 keyHandle for the combined shared secret. Secret key material stays inside the server; only an opaque keyHandle is returned.

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": {
      "x25519KeyHandle": "<x25519KeyHandle>",
      "mlKemKeyHandle": "<mlKemKeyHandle>",
      "x25519EphemeralPublic": "<x25519EphemeralPublic>",
      "mlKemCiphertext": "<mlKemCiphertext>"
    },
    "name": "crypto_hybrid_kem_decapsulate"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNoML-KEM security level (512, 768, or 1024). Default is inferred from key or 768.
mlKemKeyHandleYesHandle of the recipient ML-KEM key. Key handles look like 'kh_' followed by 32 hex characters.
mlKemCiphertextYesHex-encoded ML-KEM ciphertext (1536, 2176, or 3136 hex characters).
x25519KeyHandleYesHandle of the recipient X25519 key. Key handles look like 'kh_' followed by 32 hex characters.
x25519EphemeralPublicYesHex-encoded sender ephemeral X25519 public key (64 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 declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=false; the description is consistent with these (it produces a new keyHandle, so not read-only, and nothing is destroyed). It adds genuinely useful security context — private key material never leaves the server and only an opaque keyHandle is returned — but says nothing about failure modes (e.g. a mismatched ciphertext or invalid handle) or cost/latency.

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?

Three short sentences, front-loaded with the operation and algorithm, then the return value, then the security guarantee. The final clause slightly restates the keyHandle return, but there is no filler.

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?

With no output schema, the description correctly explains the return value (a symmetric-256 keyHandle) and the trust boundary. However, for a five-parameter crypto operation it leaves out sibling disambiguation and error behavior, which is a meaningful gap relative to the tool's complexity.

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 every parameter already carries its own format, pattern, length, and enum documentation. The description adds no parameter-level meaning beyond that baseline, such as how the level is inferred or the required correspondence between ciphertext size and ML-KEM level.

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 ('Recover'), a specific resource (Post-Quantum Hybrid KEM shared secret) and names the exact algorithm combination (X25519 + ML-KEM). This distinguishes it from the plain crypto_kem_decapsulate by algorithm, though it never names the sibling variants (multi_decapsulate, crypto_kem_decapsulate) directly.

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?

The description gives no when-to-use guidance, no prerequisites, and no exclusions. It does not say when to pick this over crypto_hybrid_kem_multi_decapsulate or crypto_kem_decapsulate, so the agent must infer selection from the tool name alone.

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