Skip to main content
Glama

Attach a custom domain

set_custom_domain
DestructiveIdempotent

Attach a custom hostname (e.g. example.com, www.example.com, app.example.com) to a Sitelas site. Registers the domain with the CDN, stores it against the site, and returns the EXACT DNS records the user needs to add at their registrar — apex domains get an A record (76.76.21.21) plus a www CNAME, subdomains get a single CNAME. Records are returned both structured (dns_records) and as a copy-pasteable human-readable list (dns_instructions). Relay dns_instructions and next_step verbatim. After DNS propagates (5–30 min typical), call check_custom_domain (with domain) to flip the verified flag. Custom domains are a Pro feature: on a Free site (list_sites and get_site give each site's plan) it returns billing_gate — say so once, before offering to connect one.

Input Schema

NameRequiredDescriptionDefault
domainYesApex or subdomain hostname like `example.com` or `www.example.com`. Do NOT include a protocol (`https://`) or trailing slash.
site_idYesThe site UUID to attach the custom domain to.

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?

Without the annotations an agent would be guessing, but the description still adds far more than they do: what gets stored, the paid-plan gate, propagation timing, and the instruction to relay dns_instructions and next_step verbatim. It does not address the destructiveHint=true annotation, so an agent cannot tell whether attaching replaces or conflicts with an already-attached domain; that is the remaining gap.

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?

Front-loaded with the action and its effect, then the follow-up and the plan gate in decreasing order of importance. It is a single dense paragraph running long, but nearly every clause carries actionable information; the example hostname list is the only mildly redundant part.

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?

There is no output schema, and the description compensates by naming the returned fields (dns_records, dns_instructions, next_step) and how to use them. Combined with the verification follow-up and the billing gate, an agent can complete the whole task flow from this description alone.

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 100%, so baseline is 3, but the description adds real semantics: apex versus subdomain hostnames produce different DNS record sets (A record plus www CNAME vs a single CNAME). That is behavior the schema's regex cannot convey, though per-parameter prose is otherwise left to the schema.

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?

States a specific verb and resource ('Attach a custom hostname ... to a Sitelas site') and then spells out the mechanics: registers with the CDN, stores it against the site, returns DNS records. It is clearly distinguishable from check_custom_domain (verification) and remove_custom_domain (teardown) in the sibling list.

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?

Explicit routing: after DNS propagates (5-30 min) call check_custom_domain with the domain, and on a Free-plan site the tool returns billing_gate, which the agent should mention once before offering to connect. Both the follow-up step and the when-not case (Free plan) are stated, along with where plan info comes from (list_sites/get_site).

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