Skip to main content
Glama

decrypt_data

Decrypt cardholder data or payment fields from terminals, acquirers, or issuers. Supports DUKPT session-key and EMV confidentiality decryption using specified encryption keys.

Instructions

Call this when decrypting cardholder data or payment fields received from a terminal, acquiring host, or issuer — including DUKPT session-key decryption and EMV confidentiality decryption.

Supported key types: D0, D1, B0 (DUKPT), E1/E6 (EMV). All inputs and outputs are hexBinary encoded.

Args: key_identifier: Key ARN or alias of the KEK (when using wrapped_key) or the working key cipher_text: Hex-encoded ciphertext decryption_attributes: Algorithm-specific parameters (mirrors encrypt_data) wrapped_key: Optional TR-31 wrapped working key (key_identifier becomes the KEK)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cipher_textYes
wrapped_keyNo
key_identifierYes
decryption_attributesYes

Schema Changelog

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

  1. First observedv1.2.0

TDQS

A4.5/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 burden of behavioral disclosure. It states that all inputs and outputs are hexBinary encoded, lists supported key types (D0, D1, B0, E1/E6), and explains how wrapped_key changes the interpretation of key_identifier. It could add more about response structure or error conditions, but the information given is meaningful.

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?

The description is well-organized with a clear trigger statement, supported key types, encoding note, and a compact Args list. Every sentence carries useful information without redundancy.

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?

Given no annotations, no output schema, and nested parameters, the description is fairly complete. It covers when to use, supported keys, encoding, and parameter semantics. The only real gap is that decryption_attributes details are delegated to 'mirrors encrypt_data', and the return value is only characterized as hexBinary encoded rather than explicitly described.

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

Parameters5/5

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

Schema description coverage is 0%, yet the description compensates well. Every parameter is explained with purpose and format: key_identifier distinguishes KEK vs working key, cipher_text is hex-encoded, decryption_attributes is algorithm-specific, and wrapped_key is optional with TR-31 behavior. This adds substantial value beyond the bare schema.

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 explicitly states the action ('decrypting cardholder data or payment fields') and the specific sources (terminal, acquiring host, issuer), and enumerates supported decryption types (DUKPT, EMV). This clearly distinguishes it from sibling operations like encrypt_data, verify_mac, and generate_pin_data.

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?

The description opens with 'Call this when...' and provides concrete scenarios, including DUKPT and EMV confidentiality decryption. It does not explicitly list exclusions or alternative tools, but the guidance is specific enough to route an agent correctly.

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