Skip to main content
Glama

Mailrun Agent Identity

Add domain

add_domain
Idempotent

Claim a domain you own (mode byod) and start onboarding (202 pending, follow meta.poll). On the Free plan, you can claim one free Mailrun subdomain and one root domain the user already owns. Use check_free_subdomain to find a free subdomain, then claim it without redirect_to or an active parent on the account. For the root domain, ask the user to point its nameservers at Mailrun. A second domain of their own returns domain_limit_reached (details.kind custom). A subdomain of their own domain needs its parent active on the account, so it would use a second domain slot and is refused on Free. Add no more than 3 domains the user owns in any 30 days. Further claims return domain_limit_reached (details.kind custom_claims). Retry after details.available_at or upgrade. Before calling, ask the user where visitors to the bare domain should be redirected (redirect_to); if omitted a placeholder is used. Supply sender_first_name, sender_last_name and email_address together or not at all; omit all three to onboard with no mailbox and create the first address later with create_identity or attach_identity_email. A subdomain (e.g. agent.example.com) requires its parent domain to be active on this account first (otherwise parent_domain_required) and never needs a nameserver change: never tell the user to update nameservers or add NS records for it. Replays: the same idempotency_key with the exact same field set replays; unknown fields are rejected, not dropped. Domain purchase is not available.

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": {
      "idempotency_key": "<idempotency_key>",
      "domain": "<domain>"
    },
    "name": "add_domain"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNobyod is supported (null also means byod); purchase answers domain_purchase_unavailable.byod
domainYes
redirect_toNoWhere visitors to the bare domain are redirected: an https URL (a bare host like example.com means https), with no empty, . or .. path segments. Every visitor lands on exactly this URL. Ask the user for it; when omitted a placeholder is set.
email_addressNoEnrollment sender address on this domain.
idempotency_keyYesStable key you choose (max 64 chars); reuse it on retry. A different payload under the same key is refused with idempotency_conflict.
sender_last_nameNo
sender_first_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses async 202 handling, plan-slot accounting, nameserver prerequisites for root domains, the placeholder redirect fallback, and exact error kinds (parent_domain_required, domain_limit_reached with details.kind, idempotency_conflict). The replay/idempotency explanation partly restates idempotentHint=true rather than extending it, which keeps it from a 5.

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?

Well front-loaded: the claim, the async contract, and the alternative tool come first, with constraints and error codes after. It is dense but long, and the subdomain/nameserver rule is effectively stated twice ('point its nameservers at Mailrun' and 'never tell the user to update nameservers or add NS records').

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 mutation tool with no output schema and a moderately covered parameter schema, it covers preconditions, per-plan limits, retry timing, and idempotency behaviour. An agent has enough to call it correctly and to interpret the documented failures.

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 57%, and the description fills the biggest gap by stating that sender_first_name, sender_last_name and email_address must be supplied together or omitted entirely, plus the user-facing meaning of redirect_to. Some of its mode and redirect_to text repeats what the schema already documents, so it is additive but not fully compensating.

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?

Opens with a specific verb and resource ('Claim a domain you own') and immediately describes the async outcome ('start onboarding (202 pending, follow meta.poll)'). It also distinguishes itself from the sibling check_free_subdomain, so an agent can tell the two apart without opening 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 Guidelines5/5

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

Explicitly routes usage: use check_free_subdomain first for free subdomains, use create_identity or attach_identity_email for later mailbox creation, and states that domain purchase is not available. It also names the exact limits (one free subdomain plus one root domain on Free, 3 custom claims per 30 days) and the conditions that trigger each refusal.

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.

Resources