Skip to main content
Glama

domain_attach

Binds a domain to a web service and issues a certificate. Returns the DNS record to create; the certificate is issued once that record resolves, usually within a minute. Until then the domain is listed as pending, which is not an error. A name under a domain (app.example.com, www.example.com) takes a CNAME. A bare domain (example.com) takes an A record to a fixed address and, by default, redirects to www.example.com, which is attached with it if it is not already; this works at any DNS provider. Pass serve: true to answer on the bare domain itself instead of redirecting, for a site whose address people know without the www, or a webhook or API that calls it (a redirect drops the body of a POST for clients that do not follow it).

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": {
      "productId": "<productId>",
      "hostname": "<hostname>"
    },
    "name": "domain_attach"
  }
}

Input Schema

NameRequiredDescriptionDefault
serveNoBare domains only. Answer on the bare domain itself instead of redirecting to www. www is still attached with it.
confirmNoRequired for destructive operations. Without it a destructive call returns its plan and refuses, exactly as dry_run would.
dry_runNoReturn the plan without applying it: the resources it would create, change or destroy, and an estimated monthly cost. Free, and has no side effects. Call this before any change you have not made before.
hostnameYesFully qualified, e.g. app.example.com or example.com.
productIdYesProduct identifier, e.g. prd_7k2m9x4qw1nv8bz3ct6d.
service_idNoA web service id, or the id of the auth service (aut_...) to give auth its own domain. Defaults to the environment's only web service when there is exactly one.
environmentNoEnvironment within a Product. Every Product has production; preview and development are optional. pr-<number> is the preview of an open pull request, made and removed by the GitHub integration on Pro.
idempotency_keyNoReplaying the same key returns the original result instead of acting twice. Strongly recommended for anything that creates a resource or spends money.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say this is a non-read, non-destructive, non-idempotent mutation. The description adds substantial behavior the agent cannot get elsewhere: certificate issuance is deferred until DNS resolves, the pending state is normal rather than an error, the redirect drops POST bodies for clients that do not follow it, and the www variant is auto-attached if absent.

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 purpose and return value, then behavior, then the conditional rules. It is a dense single paragraph and somewhat long, but nearly every clause carries information an agent needs; only the parenthetical example duplication is mildly redundant.

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 an 8-parameter mutation with no output schema, the description covers what is returned (the DNS record), the asynchronous follow-up, and the alternate-record-path cases. The remaining operational parameters (dry_run, confirm, idempotency_key) are fully documented in the schema, so nothing essential is missing.

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 3 is the floor, but the description genuinely extends meaning for two parameters: the bare-domain vs. subdomain rule that governs hostname, and the operational rationale for serve: true (bare-domain answering, webhook/API POST-body safety) beyond the schema's one-line note.

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 — "Binds a domain to a web service and issues a certificate" — and immediately names the artifact produced ("Returns the DNS record to create"). This clearly separates it from domain_list and domain_remove, which by name alone do not bind anything.

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 conditional guidance: subdomain names take a CNAME, bare domains take an A record with a default redirect, and serve: true is recommended for bare-domain sites and webhooks/APIs. It does not state when to prefer this tool over a sibling operation (e.g., re-attaching vs. removing and re-adding), so it falls short of full when/when-not coverage.

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