Skip to main content
Glama
Nizoka

pkinative-mcp

Compute fingerprint (DER digest, key identifier, SHAKE256)

compute_fingerprint
Read-onlyIdempotent

Computes SHA fingerprint, RFC 5280 key identifier, or SHAKE256 digest for a certificate, CSR, public key, or DER/PEM object, with configurable algorithm and hex formatting.

Instructions

Read-only digest of ONE object. mode:'fingerprint' (default) hashes the exact DER of the input (SHA-256 by default; SHA-1 / SHA-384 / SHA-512; webcrypto:true uses Web Crypto, same result) — what openssl x509 -fingerprint prints; mode:'key-id' computes the RFC 5280 §4.2.1.2 key identifier (SHA-1 by default, or SHA-256) of the public key found in a certificate, a CSR or a PUBLIC KEY, reporting where it came from; mode:'shake256' squeezes outputLength bytes (default 32, ≤ 1048576) of SHAKE256 — the digest of an Ed448 CMS signer. hex is lowercase without separators, formatted follows separator (':' default) and letterCase (upper default). Any PEM label or DER is accepted (a private key may be digested: the digest reveals nothing and no input byte is returned); a bundle of several blocks is refused (extract one with convert_pem). Refuses: an algorithm outside its mode, SHA-384/512 for a key identifier, outputLength or webcrypto outside their mode (VALIDATION_ERROR); key-id on an object that holds no public key (PKI_X509_* / PKI_ASN1_*). Token-frugal: verbosity:'summary', fields:[…].

Input Schema

NameRequiredDescriptionDefault
modeNo'fingerprint' (default): the digest of the exact DER. 'key-id': the RFC 5280 §4.2.1.2 identifier of the public key of a certificate, a CSR or a PUBLIC KEY. 'shake256': SHAKE256 output of `outputLength` bytes.fingerprint
inputYesThe object to digest (any PEM label, or DER): exactly one of pem / derBase64 / path. A bundle of several blocks is refused: extract one with convert_pem.
fieldsNoDot-paths to keep after verbosity (arrays map over elements); unmatched paths land in _meta.unmatchedFields.
limitsNoRaise pkinative's 22 named security bounds for this call (trusted input only; absent keys keep the engine defaults). A value above an operator ceiling (PKINATIVE_MCP_MAX_INPUT_BYTES, PKINATIVE_MCP_MAX_KDF_ITERATIONS, PKINATIVE_MCP_MAX_PATHS_EXPLORED) is LIMIT_CEILING_EXCEEDED; describe_engine lists the defaults and the ceilings.
strictNoEscalate the first engine warning to a PKI_STRICT_DIAGNOSTIC error instead of listing it in diagnostics[].
pemModeNo'strict' (RFC 7468 exactly, default) or 'lax' (tolerates whitespace, line length and RFC 1421 headers).strict
algorithmNofingerprint: SHA-1 | SHA-256 (default) | SHA-384 | SHA-512. key-id: SHA-1 (default, RFC 5280 method 1) | SHA-256. Not for shake256.
separatorNoPlaced between octets of `formatted` (default ':'; '' for none).:
verbosityNo'summary' keeps the scalar fields only (token-frugal).full
webcryptoNofingerprint only: digest through Web Crypto instead of the pure-TypeScript hashes (identical result).
letterCaseNoHex case of `formatted` (`hex` is always lowercase).upper
outputLengthNoshake256 only: output bytes (default 32, ≤ 1048576; 64 for an Ed448 CMS signer).
encodingRulesNo'der' (strict X.690 DER, default) or 'ber' (indefinite / non-minimal lengths and constructed strings, as legacy CMS producers write).der

Output Schema

NameRequiredDescriptionDefault
hexNoThe digest as lowercase hex, no separator.
fromNokey-id: where the public key came from.
modeNo
labelNoThe PEM label of the input, null for DER.
algorithmNoSHA-1 | SHA-256 | SHA-384 | SHA-512, or 'SHAKE256'.
formattedNoThe digest with the separator and case asked for (AB:CD:… by default).
sizeBytesNoBytes digested: the DER of the input (fingerprint, shake256) or the public key bits (key-id).
diagnosticsNoNon-fatal concerns the engine raised (PKI_DIAG_*, de-duplicated, at most 200; explain_code explains one).
outputLengthNoshake256: the output length in bytes.
diagnosticCountNo
diagnosticCountsNoOccurrences per diagnostic code.
diagnosticsTruncatedNotrue when distinct diagnostics beyond the 200 listed were dropped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), yet the description still adds real context: which algorithm×mode combinations produce VALIDATION_ERROR, which inputs yield PKI_X509_*/PKI_ASN1_* errors, that a private key may be digested without returning input bytes, and the hex/formatted formatting contract. It stops short of describing the response fields (which the output schema covers), so a 4 rather than 5.

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?

Front-loaded with the core statement, then mode-by-mode detail, then output format, then refusals — a sensible order. It is a dense single block with em-dash clauses that reward careful reading, but no sentence is filler.

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?

For a 13-parameter tool with an output schema and full annotation coverage, the description supplies everything an agent needs to pick a mode, avoid validation errors, and interpret the two hex outputs. Nothing material is missing.

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 coverage is 100%, so baseline is 3; the description nonetheless adds cross-cutting meaning — algorithm defaults differ per mode, `hex` is always lowercase while `formatted` obeys separator and letterCase (upper default), outputLength default 32 with the 1048576 cap, and webcrypto is fingerprint-only with identical results. That is genuine semantic value, though `limits`, `strict`, `pemMode`, and `encodingRules` are left entirely to the 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?

Opens with a precise verb+resource+scope ('Read-only digest of ONE object') and then defines each of the three modes concretely: DER fingerprint, RFC 5280 key identifier, and SHAKE256 squeeze. The reference to what `openssl x509 -fingerprint` prints anchors it against a behavior an agent already knows.

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?

Mode selection is spelled out with defaults and per-mode constraints (key-id over cert/CSR/PUBLIC KEY; shake256 for an Ed448 CMS signer output). It also names the alternative for a common failure case — a multi-block bundle is refused, 'extract one with convert_pem' — which is explicit routing to a sibling.

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