Skip to main content
Glama

Use a domain for previews

add_preview_domain

Asks to put the person's own domain on a project's previews. With git_branch, the domain always shows that one preview's latest version (staging.acme.com shows staging); without it, every preview gets its own address under the domain (fix-header.preview.acme.com), which needs a subdomain, not the bare domain. Owners and admins of the project only. It needs the workspace's preview domains add-on: when the answer says so, start_add_on gives its price and where the person turns it on. Nothing happens until you approve it in CodeGene: the answer gives a link to the request, which waits there for 15 minutes. Send the person that link; you cannot approve it. Then call get_approval with the requestId to learn how it ended. Once approved, the answer of get_approval lists the two records to add where the domain is managed, in that provider's own field names; CodeGene then checks for them, issues certificates and adds preview addresses by itself.

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>",
      "reason": "<reason>"
    },
    "name": "add_preview_domain"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesThe domain for previews, such as preview.acme.com or staging.acme.com.
reasonYesWhy, in a sentence: kept in the workspace's activity.
git_branchNoThe one preview the domain always shows, by its git branch name (such as staging). Leave it out to give every preview its own address.
project_idYesThe project (list_projects gives ids).
component_idNoWhich part of the project, when it has more than one that can take an address.
workspace_idNoWorkspace id from whoami; omit when there is one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the approval workflow, the 15-minute waiting link, the fact that the agent cannot approve the request, and the post-approval DNS record and certificate automation. These details are essential for a mutation tool that does not take effect immediately.

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 description is dense and front-loads the core behavior before routing to start_add_on and get_approval. It is longer than most definitions but most sentences carry operational information, with only mild repetition around the approval step.

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?

Given a six-parameter mutation with no output schema and explicit approval semantics, the description covers what happens before and after invocation, including the link to send, the requestId follow-up, and the DNS records returned by get_approval. Nothing critical is missing for correct use.

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 already 100%, but the description adds real meaning for the most consequential parameter: git_branch pins the domain to one branch's latest preview, while omitting it creates per-preview subdomains and requires a subdomain rather than a bare domain. It does not add much beyond the schema for reason, component_id, or workspace_id.

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 states a specific action and resource: it asks to put the person's own domain on a project's previews, and it explains the two modes selected by git_branch. An agent can distinguish this from sibling tools such as check_preview_domain or connect_domain without opening the 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?

It gives explicit conditions and exclusions: owners and admins only, the workspace preview domains add-on is required, start_add_on is named for pricing and enablement, and get_approval is named for learning the outcome. It also explains when to supply git_branch versus omitting it.

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