Skip to main content
Glama

translate_key_material

Convert an ECDH-wrapped TR-31 key block into a KEK-wrapped TR-31 key block without importing the working key into APC storage. Use for deriving shared session keys from ECC key pairs and certificates.

Instructions

Call this when implementing ECDH-based key agreement — for example, deriving a shared session key from an ECC key pair and a counterparty certificate, then wrapping the result as a TR-31 key block for local use. Also use when a key exchange protocol delivers a key via Diffie-Hellman and you need it in APC format.

Translate an ECDH-wrapped TR-31 key block into a KEK-wrapped TR-31 key block without ever importing the working key into APC storage.

The only documented use case is ECDH → TR-31 (KEK): incoming_key_material = { "DiffieHellmanTr31KeyBlock": { "CertificateAuthorityPublicKeyIdentifier": "", "KeyBlockHeaders": {...}, "PrivateKeyIdentifier": "", "PublicKeyCertificate": "", "DerivationData": "", "KeyAlgorithm": "AES_128", "KeyDerivationFunction": "NIST_SP800", "KeyDerivationHashAlgorithm": "SHA_256" } } outgoing_key_material = { "Tr31KeyBlock": { "WrappingKeyIdentifier": "" } }

key_check_value_algorithm: CMAC, ANSI_X9_24, HMAC, or SHA_1

Args: incoming_key_material: ECDH-wrapped TR-31 key block (DiffieHellmanTr31KeyBlock) outgoing_key_material: Target KEK-wrapped TR-31 output (Tr31KeyBlock) key_check_value_algorithm: Optional KCV algorithm for the output key block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
incoming_key_materialYes
outgoing_key_materialYes
key_check_value_algorithmNo

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, the description carries the burden of behavioral disclosure. It reveals a key security property: the translation happens 'without ever importing the working key into APC storage', and it labels the KCV parameter as optional. It does not mention permissions, failure modes, side effects, or return behavior, so it is not fully transparent.

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 front-loaded with the invocation context and even includes complete payload examples, which earns the length. It is slightly redundant because the Args section repeats information already shown in the JSON examples, and the ambiguous 'APC format' sentence could be tightened or removed.

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?

Given nested objects, no output schema, and no parameter descriptions in the schema, the example-rich description is unusually helpful. Still, it omits the return value/response shape, does not specify required subfields of KeyBlockHeaders or exact formats like DerivationData beyond '<hex>', and leaves error/edge-case behavior undocumented, so it is not fully complete for a complex crypto tool.

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% and the schema parameters are untyped objects, so the description is the only source of parameter meaning. It compensates thoroughly with full JSON examples showing the required nested fields for DiffieHellmanTr31KeyBlock and Tr31KeyBlock, plus the accepted KCV enum values.

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 core purpose is explicit: 'Translate an ECDH-wrapped TR-31 key block into a KEK-wrapped TR-31 key block', with a specific verb, resource, and result that distinguishes it from translation tools like translate_pin_data. However, the sentence about needing the key 'in APC format' is ambiguous and slightly muddies the otherwise clear ECDH → TR-31 (KEK) scope.

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

Usage Guidelines5/5

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

The description opens with 'Call this when implementing ECDH-based key agreement' and adds 'The only documented use case is ECDH → TR-31 (KEK)', giving explicit selection criteria and a limitation. It also offers concrete examples of incoming and outgoing key material, making the intended context unmistakable.

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