Skip to main content
Glama

Wrap a key (KMS)

crypto_kms_wrap

Wrap a symmetric-256 Data Encryption Key (DEK) handle under a KMS-held Key Encryption Key; the local provider uses in-process key material.

Instructions

Wrap the Data Encryption Key (DEK) a symmetric-256 key handle refers to under a Key Encryption Key held by a KMS provider. Only the 'local' provider is configured.

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": {
      "provider": "<provider>",
      "keyId": "<keyId>",
      "keyHandle": "<keyHandle>"
    },
    "name": "crypto_kms_wrap"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyIdYesLabel of the Key Encryption Key (KEK). It names the key; it is never used to derive it.
providerYesKMS provider ('aws', 'gcp', 'azure', 'vault', or 'local'). Only 'local' (random, in-process key material that does not survive a restart) is configured; the others return an error.
keyHandleYesHandle of the symmetric-256 DEK to wrap. Key handles look like 'kh_' followed by 32 hex characters.

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, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the provider-availability constraint, but that same fact is already in the provider schema field, and it never says what the call produces (a wrapped key blob) or whether repeated wraps are deterministic - notable given idempotentHint=false and no output schema.

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 dense sentence with the operation first and the provider caveat second; nothing is redundant or buried.

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?

For a mutation-style cryptographic tool with no output schema, the definition should say what is returned and how the wrapped result should be handled. Annotations cover the safety flags and the schema covers inputs, but the return-side behavior an agent needs to chain into crypto_kms_unwrap is absent.

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 all three parameters documented including the enum restriction and the keyHandle pattern, so the schema carries parameter semantics fully. The description adds only the 'symmetric-256' qualifier on the DEK and does not explain any parameter 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 names a specific verb ('Wrap') and a precise resource ('the DEK a symmetric-256 key handle refers to') plus the wrapping key ('KEK held by a KMS provider'), so the cryptographic operation is unambiguous. It stops short of naming crypto_kms_unwrap as the inverse, leaving sibling differentiation to inference.

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 only usage direction is the constraint that only the 'local' provider is configured and the others error out, which usefully steers the provider argument. There is no explicit statement of when to wrap versus encrypt, import, or unwrap, so the when-to-use case is only implied.

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