Skip to main content
Glama

generate_tlsa

Read-onlyIdempotent

Generate a DANE TLSA record from a certificate or public key to pin a mail server's certificate, preventing STARTTLS stripping and certificate substitution. Includes the DNS record and hash.

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.

Input Schema

TableJSON 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.8/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive. The description adds critical behavior beyond that: private keys are refused, the hash is computed locally because a language model cannot hash, and it explains the consequences of DNSSEC absence and fail-closed semantics. No contradiction with annotations; these additions materially improve safety and outcome understanding.

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?

The description is a single well-structured paragraph that front-loads purpose, then skillfully explains security, parameters, and edge cases. Every sentence delivers value—no filler or redundancy. It is detailed yet scannable, with a logical flow from 'what' to 'how to use' to 'caveats'.

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 complex DANE generation tool with no output schema, the description fully covers inputs, expected return (record, hash, meanings, DNS entry), and critical operational pitfalls (DNSSEC, fail-closed, renewal). It also justifies the recommended settings, making it complete for an agent to invoke correctly and interpret results appropriately.

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 100%, but the description adds rich meaning: for pem it specifies accepted block types and explicitly forbids private keys; for host it clarifies MX-derived hostname; for usage/selector/matching it recommends and explains the semantic impact of each numeric value (3 1 1 profile, renewal survival). This far exceeds the schema's basic descriptions.

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 opens with a specific verb+resource: 'Build a DANE TLSA record from a certificate or public key', and clearly explains the purpose (pins which certificate a mail server may present). It differentiates from siblings like check_tlsa_dane (verification vs. generation) and generate_dns_fix (generic DNS fix), making its unique role explicit.

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?

The description gives clear usage context: paste the PEM, recommended 3 1 1 profile for SMTP, host must be from MX record, and warns about DNSSEC and fail-closed behavior. It does not explicitly name alternative tools for verification (e.g., check_tlsa_dane), but the context is sufficient for an agent to know when to use this tool. No explicit when-not-to-use statement, but the guidance is strong.

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