Skip to main content
Glama

Generate TLSA record

generate_tlsa
Read-onlyIdempotent

Build a DANE TLSA record from a PEM certificate or public key to pin the mail server TLS certificate and prevent STARTTLS stripping or unauthorized certificate substitution.

Instructions

Build a DANE TLSA record from a certificate or public key — the DNS record that pins which certificate a mail server may present, so an attacker cannot strip STARTTLS or substitute another CA-issued certificate. Paste the PEM (a CERTIFICATE or PUBLIC KEY block) as pem; the hash is computed here because a language model cannot hash. Never send a private key: none is needed and the request is refused if one is present. The three numbers: usage 3 (DANE-EE) pins the end-entity key and needs no CA, selector 1 hashes the SubjectPublicKeyInfo, matching 1 is SHA-256 — the 3 1 1 profile recommended for SMTP, because it survives certificate renewal as long as the key is reused. host must be the mail server hostname from the MX record, not the domain. Two things break DANE and both are reported: a TLSA record in a zone without DNSSEC proves nothing and is ignored, and DANE fails closed, so installing a new certificate before the matching record has propagated stops mail from every sender that validates. Returns the record, the hash, what each number means, and the DNS entry.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pem": "<pem>"
    },
    "name": "generate_tlsa"
  }
}

Input Schema

NameRequiredDescriptionDefault
pemYesPEM block: -----BEGIN CERTIFICATE----- or -----BEGIN PUBLIC KEY-----. Never a private key.
hostNoMail server hostname from the MX record, e.g. mail.example.com — not the domain itself.
portNoPort the record covers. Defaults to 25 for SMTP.
usageNo0 PKIX-TA, 1 PKIX-EE, 2 DANE-TA, 3 DANE-EE. Use 3 for SMTP. Defaults to 3.
matchingNo0 exact, 1 SHA-256, 2 SHA-512. Use 1. Defaults to 1.
selectorNo0 full certificate, 1 SubjectPublicKeyInfo. Use 1. Defaults to 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: the hash is computed server-side, private keys are refused by design, and it flags the two DANE failure modes (records in non-DNSSEC zones prove nothing; DANE fails closed so a new cert before propagation breaks mail). Annotations already declare readOnly/idempotent/non-destructive, and nothing here conflicts with that — the tool computes rather than publishes.

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?

Purpose is front-loaded in the first clause and every subsequent sentence carries real information (PEM handling, the three parameters, pitfalls). It is a single dense paragraph with no paragraphing or bullets, which makes it slightly harder to scan, but there is no filler to cut.

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 6-parameter generation tool with no output schema, the description covers the input contract, safety constraints, default profile rationale, failure modes, and even what the response contains (record, hash, per-number meaning, DNS entry). Nothing an agent needs to call it correctly 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, but the description adds rationale the schema lacks — why usage=3 needs no CA, why selector=1 hashes SubjectPublicKeyInfo, and why matching=1/SHA-256 survives renewal when the key is reused. It also reinforces the private-key exclusion and the host-is-not-the-domain constraint beyond the schema wording.

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 and resource — 'Build a DANE TLSA record from a certificate or public key' — and immediately frames the artifact as the DNS record that pins which certificate a mail server presents. This cleanly separates it from the sibling check_tlsa_dane (which validates existing records) without the agent needing to open either schema.

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?

Gives strong context for when this applies: SMTP use, the 3 1 1 profile recommended because it survives renewal, and that `host` must be the MX target rather than the domain. It stops short of explicitly naming the alternative sibling (check_tlsa_dane) as the path for verifying an already-published record, so routing is implied rather than stated.

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