Skip to main content
Glama

Unwrap a key (KMS)

crypto_kms_unwrap

Unwrap a previously wrapped data encryption key (DEK) into a symmetric-256 key handle for in-process use; secret material remains server-side and only an opaque handle is returned.

Instructions

Unwrap a DEK previously wrapped by crypto_kms_wrap in this server process into a symmetric-256 key handle. Only the 'local' provider is configured. 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": {
      "provider": "<provider>",
      "keyId": "<keyId>",
      "wrappedKey": "<wrappedKey>"
    },
    "name": "crypto_kms_unwrap"
  }
}

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.
wrappedKeyYesHex-encoded wrapped key payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.41

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the mutation and openness profile, and the description adds genuine context beyond them: key material never leaves the server, only an opaque handle is returned, and the wrapped blob must originate from this same process. That in-process constraint is the kind of operational behavior an agent cannot infer from the annotations or schema.

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 action and its input source, then the environment constraint, then the return contract. The 'only the local provider is configured' sentence partially duplicates the provider field description, a minor redundancy rather than bloat.

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

Completeness5/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 fills that gap by explaining that the return is an opaque keyHandle for a symmetric-256 key rather than raw key bytes. Combined with the in-process scope and provider restriction, an agent has everything needed to call it correctly and interpret the result.

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 coverage is 100%, with each parameter already carrying a description and the provider enum fully documented. The description reinforces the 'local'-only provider restriction but adds no new meaning about keyId or wrappedKey encoding beyond what the schema states, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (unwrap), a specific resource (a DEK previously wrapped by crypto_kms_wrap), and the result type (a symmetric-256 key handle). It also names the sibling that produces its input, so an agent can place it precisely in the wrap/unwrap pair.

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 phrase 'previously wrapped by crypto_kms_wrap in this server process' gives an implied precondition for use, which is real guidance. However, there is no explicit when-not or comparison to alternatives, and the provider constraint is essentially restated from the schema rather than framed as a usage rule.

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