Skip to main content
Glama

extract_cert_serial_and_spki_pins

Read-onlyIdempotent

Extract uppercase Hex certificate serial numbers, SHA-256 thumbprints, and Base64 SHA-256 SPKI pins from X.509 PEM certificates or chains for WeChat Pay v3 and mTLS pinning.

Instructions

Extracts uppercase contiguous Hex serial numbers (for WeChat Pay v3 serial_no and mTLS gateways), SHA-256 certificate thumbprints, and Base64 SHA-256 SPKI pins.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_cert_serial_and_spki_pins"
  }
}

Input Schema

NameRequiredDescriptionDefault
certPemNoX.509 PEM certificate or bundle from which serial numbers and SPKI pins are extracted.
certPathNoOptional local file path to the X.509 certificate when certPem is omitted.
includeChainNoWhen true, returns serial numbers and SPKI pins for every certificate in the ordered chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered elsewhere. The description adds output-format specifics (uppercase hex normalization, SHA-256, Base64 SPKI) that go beyond the annotations, but it says nothing about what happens when neither certPem nor certPath is supplied, or about failure/parse-error behavior.

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?

It is a single front-loaded sentence with no filler; the parenthetical naming WeChat Pay v3 and mTLS gateways earns its place by grounding the use case. The sentence is dense with three output formats at once, but nothing is redundant.

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?

With three simple, fully documented parameters and rich annotations, the definition is mostly sufficient, and the extraction targets are named. However, with no output schema the description should clarify the response shape (for example how results are grouped when includeChain is true and how the three value types are returned together), which it does not.

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?

Schema description coverage is 100%, including the certPem/certPath precedence rule and the includeChain behavior, so the schema already carries the parameter meaning. The description adds no parameter-level detail beyond the schema, which is the expected baseline of 3 when coverage is complete.

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 names a concrete verb ('Extracts') plus three concrete outputs: uppercase contiguous Hex serial numbers, SHA-256 certificate thumbprints, and Base64 SHA-256 SPKI pins. It even names the downstream consumers (WeChat Pay v3 serial_no, mTLS gateways), and the extraction framing makes it clearly distinct from the verify/audit/check siblings.

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

Usage Guidelines3/5

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

Usage context is implied through the mention of WeChat Pay v3 and mTLS gateways, which hints at when the tool is relevant, but there is no explicit when-to-use or when-not-to-use statement. It never routes the agent to or away from verify_spki_key_and_csr_match, audit_x509_pem_chain, or check_hostname_rfc6125_san, leaving the choice to inference.

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