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

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

Annotations already mark this as read-only, idempotent, and safe, but the description adds critical behavior: it refuses private keys, the hash is computed server-side, it warns about DNSSEC conditions, explains what happens with imperfect records, and lists return content. It provides substantial non-obvious context beyond 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but purposeful and front-loaded with the core purpose. Every major statement contributes essential operational or security information. The prose is one substantial paragraph, which is acceptable, though it could be tightened slightly without losing important details.

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 description covers input (PEM, host, port, profile), validation criteria, rejection behavior, DNSSEC prerequisites, DNS propagation issues, and the output format. Since there is no output schema, it adequately explains what to expect in return. For a technical generation utility, this is a complete and self-sufficient definition.

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?

Even though the schema covers 100% of the parameter descriptions, the description enhances meaning considerably: it explains the hash computation, the meaning of usage/selector/matching values, recommends the 3-1-1 profile specifically for SMTP lifecycle, and clarifies why private keys are not accepted. This goes far beyond the schema fields.

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 begins with the specific verb 'Build' and names the exact resource ('a DANE TLSA record from a certificate or public key'). It clarifies the security purpose. It also gives enough specificity to distinguish it from sibling tools like generate_dns_fix or generate_dmarc.

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 operational guidance: paste a PEM, never send a private key, use 3 1 1 for SMTP, and set host to the MX record hostname. It does indicate when to use the tool (when the generation of TLSA record is needed). It does not explicitly name alternatives or say when not to use it, so it falls short of a perfect 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RoscoNL/intodns-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server