Skip to main content
Glama

Buy a domain

buy_domain

Buy a domain for a site and connect it (and www) as the site's live URL. THIS CHARGES THE WORKSPACE'S SAVED CARD for one year of registration, renewing yearly; only call it after the person has seen the domain and price from check_domain and said yes. Pass that price as expectedPriceCents; if the live price differs, nothing is charged and the call is refused. Returns status active (bought and connected), pending (paid, registration finishing; poll get_domain_registration, and if still pending after a minute call buy_domain again with the same domain and makePrimary, which resumes without charging twice), or checkout_required (a workspace with no plan; nothing charged, share checkout_url). Needs the workspace's domain owner contact saved first (set_domain_owner); a refusal says so. Before buying a domain, read the building-sites skill (call skills with name "building-sites").

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": {
      "siteId": "<siteId>",
      "domain": "<domain>",
      "expectedPriceCents": "<expectedPriceCents>"
    },
    "name": "buy_domain"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesThe exact domain to buy, lowercase with no scheme, such as 'acmecoffee.com'. Buy the apex; www is connected automatically.
siteIdYesThe site the domain is for, from list_sites.
makePrimaryNoMake the domain the site's primary URL (canonical links and sitemap). Defaults to true, as in the dashboard.
checkoutPlanNoOnly for a workspace with no paid plan: the plan the person chose to buy with the domain. Then nothing is charged here; the result carries a Stripe Checkout link for the plan plus the domain. Ignored when the workspace already has a plan.
expectedPriceCentsYesThe first-year price in cents that the person agreed to, from check_domain's priceCents. The purchase is refused, and nothing is charged, if the live price differs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover mutability and openness but nothing about money, so the description carries that burden and does: it charges the workspace's saved card for one year with yearly renewal, refuses and charges nothing on price mismatch, and enumerates the three possible outcomes with follow-up actions for each. The retry-resume behavior ('resumes without charging twice') is important nuance alongside idempotentHint=false and does not contradict it, since the resumed call still changes state.

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?

The financial warning and the confirmation gate are front-loaded in capitals and the outcome branches follow in a logical ordered sequence. It is dense with nested parentheticals, which costs some scannability, but no sentence is filler.

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 money-spending tool with no output schema, the description supplies everything needed to call it safely: prerequisites, price guard, all three return statuses, and the correct follow-up for pending and checkout_required. Nothing material is left for the agent to guess.

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 the baseline is 3, but the description adds meaning the schema does not: it ties expectedPriceCents to the specific value shown in check_domain, and explains that re-passing the same domain plus makePrimary is a resume rather than a duplicate purchase. checkoutPlan and domain are only repeated from 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?

The first sentence states a specific verb and resource ('Buy a domain for a site') plus the side effect of connecting apex and www as the live URL. It is clearly distinguished from check_domain (price preview) and connect_custom_domain (connection without purchase), so an agent can route without opening a schema.

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?

Usage is explicitly gated: call only after the person has seen the domain and price from check_domain and said yes. It also gives the alternative path for pending state (re-call with the same domain and makePrimary), the checkout_required path (share checkout_url), the precondition (set_domain_owner), and a mandatory skill read before buying.

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