Skip to main content
Glama
Nizoka

pkinative-mcp

Explain a code (errors, reasons, diagnostics, wrapper codes)

explain_code
Read-onlyIdempotent

Explain or list PKI error, verdict, diagnostic, and wrapper codes with cause, severity, and remedy, letting you branch on stable codes instead of message text.

Instructions

Explain any code this server can emit, from the registries vendored at the pkinative v1.0.0 tag: the 57 PKI_* engine error codes (coarse class, PkiError subclass, when raised, CWE, the engine's remedy and the MCP input that lifts it), the 43 PKI_REASON_* codes a verdict returns, the 97 PKI_DIAG_* diagnostics (with severity) and the wrapper's own codes (VALIDATION_ERROR, SECURITY_VIOLATION, LIMIT_CEILING_EXCEEDED, SECRET_REQUIRED, …). list:true enumerates (kind filters one vocabulary). Branch on codes, never on message text.

Input Schema

NameRequiredDescriptionDefault
codeNoThe code to explain (PKI_*, PKI_REASON_*, PKI_DIAG_* or a wrapper code such as SECURITY_VIOLATION). Omit with list:true to enumerate.
kindNoRestrict a listing to one vocabulary.
listNoList the codes (optionally of one kind) instead of explaining one.
fieldsNoDot-paths to keep after verbosity (arrays map over elements); unmatched paths land in _meta.unmatchedFields.
verbosityNo'summary' keeps the scalar fields only (token-frugal).full

Output Schema

NameRequiredDescriptionDefault
cweNo
codeNo
kindNo
codesNo
countNo
sinceNo
remedyNo
summaryNoWhen the code is raised / returned.
severityNo
standardNo
errorClassNoThe coarse class (usage, input, parse, security, limit, unsupported, crypto, password, check, internal).
engineClassNoThe PkiError subclass.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a read-only, idempotent, non-destructive, closed-world call. The description adds useful behavioral context: which fields each code family explains (class, subclass, when raised, CWE, remedy, lifting input, severity) and that list mode enumerates rather than explains. It does not contradict the annotations.

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?

Two sentences, with the core action front-loaded and no filler. The long first sentence packs the code-family counts and returned details that an agent needs to understand scope, and the listing/branching guidance follows compactly.

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?

The tool has an output schema and full parameter descriptions, so the description need not explain the return shape. It covers the code vocabularies, list mode, and filtering sufficiently for an agent to call it correctly; no critical behavior is missing.

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

Parameters3/5

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

With 100% schema description coverage for all five parameters, the schema already defines code, kind, list, fields, and verbosity. The description only repeats the list/kind behavior and adds no new syntax for fields or verbosity, so the baseline of 3 applies.

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 uses the specific verb "Explain" on a precise resource, "any code this server can emit", and enumerates the four vocabularies: PKI_* errors, PKI_REASON_* codes, PKI_DIAG_* diagnostics, and wrapper codes. That is enough to separate it from sibling tools that inspect or create PKI artifacts.

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 makes the primary use case clear and documents the listing path ("list:true enumerates") and kind filter, plus the operational rule "Branch on codes, never on message text." It does not explicitly name when to prefer a sibling such as describe_engine or state exclusions, so it stops short of a 5.

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