Skip to main content
Glama

Set the primary custom domain

websiteDomains_setPrimaryDomain
Destructive

Makes this domain the canonical hostname for the published website: requests reaching the platform subdomain or any other custom domain are permanently redirected (HTTP 308) to it, preserving path and query. Only active custom domains can be made primary — the request fails with 409 otherwise. Any previous primary is cleared in the same transaction.

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": {
      "websiteId": "<websiteId>",
      "domainId": "<domainId>"
    },
    "name": "websiteDomains_setPrimaryDomain"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainIdYes
websiteIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: permanent 308 redirects preserving path and query, transactional clearing of the previous primary, and a 409 on ineligible domains. This is exactly the side-effect disclosure needed for a destructive, non-idempotent mutation. (A note that 308s are browser-cached and survive later changes would be a further plus.)

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?

Three tight sentences ordered effect → precondition → side effect, with zero filler. The most decision-relevant fact (what becomes the canonical hostname) leads.

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?

Covers the mutation's effect, eligibility, and error path for a tool with no output schema. It never states what a successful call returns, and the two required IDs are left semantically undefined, which keeps it just short of complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and neither parameter is named or explained in the description; 'this domain' and 'this website' are used only deictically. It does not say that domainId must reference an existing custom domain belonging to websiteId, nor how platform-subdomain ids are rejected — the main ambiguity an agent would hit.

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+resource: 'Makes this domain the canonical hostname for the published website', then defines the concrete effect (308 redirect of platform subdomain and other custom domains). This clearly distinguishes it from siblings such as websiteDomains_renamePlatformDomain or websiteDomains_verifyCustomDomain.

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 a hard precondition ('Only active custom domains can be made primary') and the exact failure mode (409). It stops short of naming alternatives or saying when an agent should prefer list/verify first, but the eligibility gate is the key guidance an agent needs.

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