Skip to main content
Glama

flatten_spf

Read-onlyIdempotent

Resolve a domain's SPF include graph into one flattened record with literal IPs, staying under the RFC-7208 10-lookup limit; includes lookup counts, IP count, record length, and maintenance warnings.

Instructions

Read-only SPF flattening for a domain. Resolves the full include/a/mx/redirect graph to literal ip4/ip6 addresses and returns a single flattened SPF record that fits under the RFC-7208 10-lookup limit, plus lookup counts before/after, IP count, record length, whether it must be split across multiple records, and a maintenance warning. Use when a domain hits 'too many DNS lookups' (PermError) and removing unused includes is not enough; run check_spf first to see the lookup graph and whether flattening is actually needed. Flattened records are high-maintenance — they break when a provider rotates IPs — so treat the output as a last resort to re-verify periodically. No auth, no side effects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name only, e.g. example.com (no URL, path, or port)
Behavior5/5

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

Annotations indicate read-only, open-world, idempotent, non-destructive. Description reinforces with 'Read-only' and 'No side effects', and adds 'No auth', providing clarity that no modifications occur. It also explains the output includes a maintenance warning, indicating potential future changes.

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 structured in three sentences, clearly conveying purpose, usage, and output. It is somewhat dense with output details but remains informative without unnecessary fluff.

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?

Given no output schema, the description comprehensively lists what the tool returns: flattened SPF record, lookup counts, IP count, record length, split flag, and maintenance warning. Together with usage and behavioral notes, it provides a complete understanding of the tool's functionality.

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 already provides full description for the only parameter 'domain' (e.g., example.com, no URL/path). Description does not add further details, but given 100% schema coverage, it is sufficient.

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 clearly states it performs read-only SPF flattening, resolving include/a/mx/redirect graphs to literal IPs, and returns a flattened record with additional metrics. It distinguishes from siblings by specifying the use case of exceeding DNS lookup limits.

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

Usage Guidelines5/5

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

Explicitly instructs when to use: when a domain hits 'too many DNS lookups' (PermError) and removing unused includes isn't enough. Also directs to run check_spf first, positioning flatten_spf as a last resort.

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