Skip to main content
Glama

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
NameRequiredDescriptionDefault
appNameYesThe name of the app
domainYesDomain name to add

Implementation Reference

  • 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,
        });
    }
  • 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;
    }
  • Imports validation helpers used in the handler.
    import { validateRequired, unwrapApiResponse } from '../utils/errors.js';
  • 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',
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/razavioo/liara-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server