Skip to main content
Glama

Pick the canonical URL for a custom domain

set_primary_subdomain
Idempotent

Mark a hostname as the primary (canonical) URL for its site. Sibling hostnames (apex + www both pointed at the same site) start 301-redirecting to it, preserving path + query. The host-side fix for the duplicate-content SEO problem. The first subdomain you add for a site is primary by default; call this only when you need to switch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesregistered custom domain, e.g. example.com
hostnameYesfull hostname to make primary, e.g. www.example.com

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / domain / description
      Added value: +"registered custom domain, e.g. example.com"
    • addedInput schema / properties / hostname / description
      Added value: +"full hostname to make primary, e.g. www.example.com"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "result": {}
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description fully discloses behavioral effects beyond the idempotentHint annotation: it marks a hostname as primary and triggers 301 redirects from sibling hostnames, preserving path and query. It also mentions that the first subdomain is primary by default, adding context. No contradictions with annotations.

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?

The description is concise with three sentences: first sentence states the action, second explains the result, third gives usage context. Every sentence adds value, no redundancy, and it is front-loaded with the main purpose.

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 simple tool with good schema and annotations, the description provides all necessary context: what it does, when to use, side effects, and default behavior. It is complete enough for an agent to select and invoke correctly, even without seeing the output schema.

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 coverage is 100% with clear descriptions for both parameters (domain and hostname). The description does not add significant extra meaning beyond the schema, merely using the terms 'hostname' and 'domain' in context. Baseline score of 3 is appropriate as the schema already does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Mark a hostname as the primary (canonical) URL for its site.' It uses a specific verb-resource combination and explains the effect (sibling hostnames start 301-redirecting). It also distinguishes from sibling tools by contextualizing the SEO duplicate-content problem, setting it apart from add/check domain tools.

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?

The description provides explicit usage guidance: 'call this only when you need to switch.' It also explains when not to use it (the first subdomain is primary by default), and gives context about the problem it solves (SEO duplicate content). This helps the agent decide when to invoke this tool over others.

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