Skip to main content
Glama

Multi-recipient hybrid KEM encapsulate

crypto_hybrid_kem_multi_encapsulate

Encapsulates a symmetric key for multiple recipients using X25519 + ML-KEM-768 hybrid KEM and AES-256-GCM wrapping, returning per-recipient ciphertexts and a key handle.

Instructions

Encapsulate a symmetric key for multiple recipients using post-quantum hybrid KEM (X25519 + ML-KEM-768 + AES-256-GCM key wrapping). Returns recipient ciphertexts and a symmetric-256 keyHandle.

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": {
      "recipients": "<recipients>"
    },
    "name": "crypto_hybrid_kem_multi_encapsulate"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyHandleNoOptional handle of an existing symmetric-256 key to encapsulate. Refused unless the server sets MCP_ALLOW_KEY_EXPORT=1, since it sends the key to the recipients. If omitted, a fresh 256-bit DEK is generated. Key handles look like 'kh_' followed by 32 hex characters.
recipientsYesJSON-serialized array of recipient public key objects: [{ id?, x25519PublicKey, mlKemPublicKey }].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the bar is lower. The description adds the useful fact that recipient ciphertexts plus a symmetric-256 keyHandle are returned and discloses the hybrid construction, but it omits the operationally critical behavior that passing an existing keyHandle is refused unless MCP_ALLOW_KEY_EXPORT=1, and does not warn that repeated calls produce fresh ciphertexts because the operation is non-idempotent.

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?

Two tightly written sentences with zero filler: the operation and algorithm first, the return values second. Nothing is repeated from the title and every clause carries information.

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, and the description does compensate by naming the return values (recipient ciphertexts and a keyHandle). However, for a non-idempotent cryptographic mutation that can be blocked by a server flag, the definition leaves out failure conditions and the keyHandle export caveat, so an agent could attempt a call that is predictably refused.

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 both parameters are already fully documented, including the kh_ handle pattern, the export gate, and the JSON-serialized recipient array shape. The description adds no syntax, format, or constraint detail beyond what the schema provides, 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+resource+scope: 'Encapsulate a symmetric key for multiple recipients', and names the exact algorithm composition (X25519 + ML-KEM-768 + AES-256-GCM wrapping). This clearly separates it from the single-recipient crypto_hybrid_kem_encapsulate in behavior, though it never names that sibling explicitly.

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

Usage Guidelines3/5

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

The multi-recipient scope is stated, which implies when this tool is appropriate rather than the single-recipient variant, but there is no explicit when-to-use/when-not guidance. Nothing tells the agent how to choose between this, crypto_hybrid_kem_encapsulate, and crypto_kem_encapsulate, and no prerequisites (such as having recipient public keys on hand) are spelled out.

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