Skip to main content
Glama

re_encrypt_data

Rewrap encrypted payment data under a new key without exposing plaintext. Handles key rotation, moving between security domains, and crypto algorithm transitions entirely within the HSM.

Instructions

Call this when rewrapping payment data under a new key — for example when rotating zone encryption keys, moving data between security domains, or transitioning from TDES to AES. The plaintext never leaves the HSM boundary.

Re-encrypts data from one key to another without exposing plaintext. The decryption and re-encryption occur entirely within the APC HSM boundary.

Args: incoming_key_identifier: ARN or alias of the current encryption key (or KEK) outgoing_key_identifier: ARN or alias of the target encryption key (or KEK) cipher_text: Hex-encoded ciphertext under the incoming key incoming_encryption_attributes: Algorithm params for decryption outgoing_encryption_attributes: Algorithm params for re-encryption incoming_wrapped_key: Optional TR-31 wrapped incoming working key outgoing_wrapped_key: Optional TR-31 wrapped outgoing working key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cipher_textYes
incoming_wrapped_keyNo
outgoing_wrapped_keyNo
incoming_key_identifierYes
outgoing_key_identifierYes
incoming_encryption_attributesYes
outgoing_encryption_attributesYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It discloses the most important behavioral property: 'The plaintext never leaves the HSM boundary' and 'The decryption and re-encryption occur entirely within the APC HSM boundary.' It does not cover permissions, error behavior, or key-state constraints, but the security-boundary disclosure is meaningful and non-obvious.

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?

The description is well-structured: usage context first, then a one-line functional definition, then an Args block. It earns its place, though there is some redundancy in repeating that plaintext never leaves the HSM boundary ('without exposing plaintext' and 'occur entirely within the APC HSM boundary' say essentially the same thing in close proximity).

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

Completeness4/5

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

For a 7-parameter cryptographic operation with no output schema and no annotations, the description covers when to use it, what it does, the security boundary, and parameter meaning. It is missing precise structure for the encryption-attributes objects and any expectation about the return value, but the provided context is sufficient for an agent to understand the operation and invoke it with mostly reasonable arguments.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the argument documentation must compensate. The description adds real semantics for all seven parameters: ARN or alias identifiers, hex-encoded ciphertext, algorithm params, and optional TR-31 wrapped keys. It does not fully define the internal shape of incoming_encryption_attributes or outgoing_encryption_attributes, which remain vague 'Algorithm params' objects.

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?

The description opens with 'Call this when rewrapping payment data under a new key' and restates the operation as 'Re-encrypts data from one key to another without exposing plaintext.' This is a specific verb+resource statement that clearly scopes the tool to re-encryption of existing ciphertext, distinguishing it from siblings like encrypt_data, decrypt_data, and translate_key_material.

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

Usage Guidelines4/5

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

It provides explicit usage conditions with concrete examples: rotating zone encryption keys, moving data between security domains, and transitioning from TDES to AES. It does not explicitly name alternatives or say when not to use this tool, but the use-case framing makes the appropriate context clear.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/J8k3/aws-payment-cryptography-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server