Skip to main content
Glama

SPF record generator

generate_spf_record
Read-onlyIdempotent

Build a valid SPF TXT record for a domain from the email services it sends with. Returns the DNS host and the TXT value to publish, plus warnings such as nearing the 10-lookup limit. It does not change DNS.

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": "generate_spf_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNotrue if the server at the domain's A record sends mail (adds the a mechanism).
mxNotrue if the domain's own mail servers send mail (adds the mx mechanism).
ip4NoIPv4 addresses or ranges that send for the domain, e.g. 203.0.113.7 or 203.0.113.0/24.
ip6NoIPv6 addresses or CIDR ranges of your own mail servers, e.g. 2001:db8::1 or 2001:db8::/32. Find them in your server or hosting settings. Leave out if you only send through a provider.
strictNotrue = -all (hard fail), false = ~all (soft fail, the safer default).
includesNoOther include: domains, e.g. sendgrid.net, mailgun.org.
providersNoThe mailbox providers the domain sends from; each adds that provider's include. google = Google Workspace, microsoft = Microsoft 365, zoho = Zoho Mail, zoho-eu = Zoho Mail (EU data center).

Output Schema

NameRequiredDescriptionDefault
hostYesWhere to publish it: the DNS name (host) of the TXT record.
typeYes
valueYesThe record value to paste into DNS.
toolUrlYesThe same check as a free web tool on pipefire.ai.
warningsYesThings to check before publishing, such as nearing the SPF 10-lookup limit. Empty when there are none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / ip6 / description
      Previous value: -"IPv6 addresses or ranges that send for the domain."New value: +"IPv6 addresses or CIDR ranges of your own mail servers, e.g. 2001:db8::1 or 2001:db8::/32. Find them in your server or hosting settings. Leave out if you only send through a provider."
    • changedInput schema / properties / providers / description
      Previous value: -"Mailbox providers: google (Google Workspace), microsoft (Microsoft 365), zoho (Zoho Mail), zoho-eu (Zoho Mail (EU data center))."New value: +"The mailbox providers the domain sends from; each adds that provider's include. google = Google Workspace, microsoft = Microsoft 365, zoho = Zoho Mail, zoho-eu = Zoho Mail (EU data center)."
    • addedOutput schema / properties / warnings / description
      Added value: +"Things to check before publishing, such as nearing the SPF 10-lookup limit. Empty when there are none."
  2. Changed5 schema fields changed
    • addedInput schema / properties / a / description
      Added value: +"true if the server at the domain's A record sends mail (adds the a mechanism)."
    • addedInput schema / properties / ip4 / description
      Added value: +"IPv4 addresses or ranges that send for the domain, e.g. 203.0.113.7 or 203.0.113.0/24."
    • addedInput schema / properties / ip6 / description
      Added value: +"IPv6 addresses or ranges that send for the domain."
    • addedInput schema / properties / mx / description
      Added value: +"true if the domain's own mail servers send mail (adds the mx mechanism)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "host": {
      +      "description": "Where to publish it: the DNS name (host) of the TXT record.",
      +      "type": "string"
      +    },
      +    "toolUrl": {
      +      "description": "The same check as a free web tool on pipefire.ai.",
      +      "type": "string"
      +    },
      +    "type": {
      +      "const": "TXT",
      +      "type": "string"
      +    },
      +    "value": {
      +      "description": "The record value to paste into DNS.",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "host",
      +    "type",
      +    "value",
      +    "warnings",
      +    "toolUrl"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/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 covered. The description still adds real value by naming the returned artifacts (DNS host plus TXT value) and disclosing that warnings such as the 10-lookup limit are emitted, which is behavioral information absent from 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 short sentences, front-loaded with the output-producing action, then the return shape, then the non-mutating caveat. Every clause carries distinct information and nothing is repeated from the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a fully optional-parameter, read-only generator with an output schema and strong annotations, the description covers purpose, output, warning behavior, and the no-DNS-mutation guarantee. It is nearly complete; only the lack of routing guidance toward check_spf or the sibling generators keeps it from the top.

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 across all seven optional parameters, the schema already explains a, mx, ip4, ip6, strict, includes, and providers in detail. The description contributes only the general framing that inputs represent 'the email services it sends with,' adding no mechanism-level or format detail beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Build a valid SPF TXT record for a domain from the email services it sends with,' which an agent can clearly separate from the check_* diagnostic siblings by the generate-vs-verify verb. It never explicitly contrasts itself with generate_dkim_record / generate_dmarc_record or check_spf, so the differentiation comes from the verb rather than a stated comparison.

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 is only implied: the phrase 'from the email services it sends with' hints at when the tool applies, and 'It does not change DNS' signals a pre-publication planning step. There is no explicit when-to-use, when-not-to-use, or pointer to check_spf for verifying an existing record, leaving the agent to infer the workflow.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.