liara_add_domain
Add a custom domain to your Liara cloud application to enable public access with your own domain name.
Instructions
Add a domain to an app
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appName | Yes | The name of the app | |
| domain | Yes | Domain name to add |
Implementation Reference
- src/services/domains.ts:36-48 (handler)The main handler function implementing the logic to add a domain to a Liara app. It performs input validation and calls the Liara API to add the domain.export async function addDomain( client: LiaraClient, appName: string, domain: string ): Promise<Domain> { validateRequired(appName, 'App name'); validateRequired(domain, 'Domain'); return await client.post<Domain>('/v1/domains', { project: appName, domain, }); }
- src/api/types.ts:195-201 (schema)Type definition for the Domain object returned by the addDomain API call, serving as the output schema for the tool.export interface Domain { _id: string; name: string; projectID: string; status: DomainStatus; createdAt: string; }
- src/services/domains.ts:8-8 (helper)Imports validation helpers used in the handler.import { validateRequired, unwrapApiResponse } from '../utils/errors.js';
- src/utils/errors.ts:67-70 (helper)Validation helper used to check required inputs in the handler. (Assuming approximate lines based on usage; actual may vary)if (name.length < 3) { throw new LiaraMcpError( `App name "${name}" is too short (minimum 3 characters, got ${name.length})`, 'INVALID_APP_NAME',