Skip to main content
Glama

Add a custom domain

add_domain

Connect a custom domain the user owns to a project, so the app also answers at that address over HTTPS. Returns the two DNS records the user adds at their DNS provider: a CNAME that points the domain at the project's address, and a TXT record that proves they own it. Nothing is served on the domain until check_domain finds both. Custom domains are on paid plans; the allowance is counted across the account. The project still has to be public (deploy) for the domain to serve.

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

Input Schema

NameRequiredDescriptionDefault
domainYesThe custom domain, e.g. "app.yourcompany.com". A pasted URL is trimmed to its hostname.
project_idYesThe project's id, as returned by create_project or list_projects.

Output Schema

NameRequiredDescriptionDefault
urlNohttps://<domain> once active and the project is public, otherwise null.
domainYesThe hostname.
statusYespending = waiting for the DNS records. verified = records found, certificate being issued. active = serving over HTTPS (while the project is public). cert_failed = the certificate could not be issued; see problem.
problemNoWhat is still wrong, in words. null when nothing is.
recordsYesThe DNS records to add at the domain's DNS provider.
checked_atNoWhen DNS was last checked, ISO 8601.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: it discloses the return payload (CNAME + TXT records), that nothing serves until check_domain passes, and plan/visibility prerequisites. With readOnly=false and idempotent=false already declared, the remaining gap is minor — it doesn't say what happens if the domain is already attached or what error surfaces.

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?

Four sentences, each carrying distinct information: purpose, return value, completion condition, and prerequisites. Front-loaded with the action and zero redundant restatement of the title 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?

An output schema exists, so the description doesn't need to explain return structure, yet it helpfully summarizes the two DNS records returned. The only missing piece is failure behavior on duplicate or invalid domains, which matters given idempotentHint=false.

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 description coverage is 100%, so both parameters are already documented, including the hostname-trimming behavior for domain. The description adds no further parameter-level meaning beyond the schema, which is the expected baseline here.

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 ("Connect a custom domain ... to a project") and immediately names the outcome (app answers at that address over HTTPS). It is clearly distinguishable from check_domain, which it explicitly references as the verification step.

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?

Gives concrete preconditions — paid plan required, allowance counted across the account, project must be public via deploy — and names check_domain as the follow-up needed before the domain serves. It stops short of stating when not to use it (e.g., re-adding an existing domain, or using remove_domain to detach).

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.