Skip to main content
Glama

generate_pin_data

Create IBM 3624 or Visa PVV PINs, compute PIN offsets for card personalization, or produce encrypted test PIN blocks from a PAN and scheme-specific attributes.

Instructions

Call this when implementing IBM 3624 or Visa PVV PIN generation, generating a PIN offset for card personalization, or producing a test PIN block for a given PAN. Issuer function — use with care in acquirer contexts.

Supported schemes via generation_attributes: Visa PVV: {"VisaPin": {"PinVerificationKeyIndex": 1}} Visa PVV value: {"VisaPinVerificationValue": {"EncryptedPinBlock": "...", "PinVerificationKeyIndex": 1}} IBM3624 offset: {"Ibm3624PinOffset": {"DecimalizationTable": "...", "PinValidationData": "..."}} IBM3624 random: {"Ibm3624RandomPin": {"DecimalizationTable": "..."}} IBM3624 natural: {"Ibm3624NaturalPin": {"DecimalizationTable": "..."}} IBM3624 from offset: {"Ibm3624PinFromOffset": {"DecimalizationTable": "...", "PinOffset": "...", "PinValidationData": "..."}}

Supported key types: generation_key_identifier: V1 (IBM3624) or V2 (Visa) PVK encryption_key_identifier: P0 PIN Encryption Key (or KEK when using encryption_wrapped_key)

primary_account_number is optional for ISO_FORMAT_1 (which does not include PAN).

Args: generation_key_identifier: ARN or alias of PVK (V1 or V2 key) encryption_key_identifier: ARN or alias of PEK (P0 key) to encrypt output PIN block generation_attributes: Scheme-specific generation parameters pin_block_format: ISO_FORMAT_0, ISO_FORMAT_1, ISO_FORMAT_3, or ISO_FORMAT_4 primary_account_number: 12-19 digit PAN (required for all formats except ISO_FORMAT_1) pin_data_length: PIN length (4-12); omit to use scheme default encryption_wrapped_key: Optional TR-31 wrapped PEK (encryption_key_identifier becomes the KEK)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pin_data_lengthNo
pin_block_formatYes
generation_attributesYes
encryption_wrapped_keyNo
primary_account_numberNo
encryption_key_identifierYes
generation_key_identifierYes

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, the description carries the behavioral burden and largely succeeds: it discloses supported schemes with JSON shapes, required key types (V1/V2 PVK, P0 PEK or wrapped KEK), and the ISO_FORMAT_1 PAN exception. It omits the exact response structure and error/side-effect conditions, but the core operational behavior is clearly conveyed.

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 long, but its length is justified by the tool's complexity. It front-loads trigger conditions, then uses compact structured examples and an Args list so each sentence earns its place.

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 7 parameters, nested generation_attributes, and four PIN block formats, the description covers scheme variants, key mapping, and PAN/format special cases. The main gap is the absent output schema and no explicit response-field or error documentation, which prevents a full 5.

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 coverage is 0%, so the description must compensate, and it fully does. Every parameter receives operational meaning: ARN/alias key identifiers, scheme-specific generation_attributes examples, accepted PIN block formats, PAN length and requirement rules, PIN length range, and wrapped-key behavior. This far exceeds the bare input 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?

States a specific verb/resource: IBM 3624 and Visa PVV PIN generation, PIN offsets for card personalization, and test PIN block production. The algorithm-specific contexts and 'issuer function' qualifier distinguish this from sibling translation/verification tools even without naming them.

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?

Explicitly opens with 'Call this when' and gives three concrete use cases, plus warns that it is an issuer-side function to use with care in acquirer contexts. It does not explicitly say when to use translate_pin_data or verify_pin_data instead, so the when-not guidance is somewhat implicit.

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