Skip to main content
Glama

liara_list_domains

Retrieve all domains associated with applications on the Liara cloud platform to manage DNS configurations and application routing.

Instructions

List all domains attached to apps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
perPageNoNumber of items per page
limitNoAlternative to perPage: maximum number of items to return
offsetNoAlternative to page: number of items to skip

Implementation Reference

  • Core handler function that implements the liara_list_domains tool logic. Calls Liara API /v1/domains endpoint with optional pagination and unwraps the response into Domain[] array.
    export async function listDomains( client: LiaraClient, pagination?: PaginationOptions ): Promise<Domain[]> { const params = paginationToParams(pagination); const response = await client.get<any>('/v1/domains', params); return unwrapApiResponse<Domain[]>(response, ['domains', 'data', 'items']); }
  • Input schema for pagination parameters accepted by liara_list_domains tool.
    export interface PaginationOptions { page?: number; perPage?: number; limit?: number; // Alternative to perPage offset?: number; // Alternative to page }
  • Output schema: Domain type returned by liara_list_domains tool, including DomainStatus enum.
    export interface Domain { _id: string; name: string; projectID: string; status: DomainStatus; createdAt: string; }
  • Helper function used by the handler to convert PaginationOptions to API query parameters.
    export function paginationToParams(options?: PaginationOptions): Record<string, any> { if (!options) return {}; const params: Record<string, any> = {}; if (options.page !== undefined) { params.page = options.page; } else if (options.offset !== undefined) { params.offset = options.offset; } if (options.perPage !== undefined) { params.perPage = options.perPage; } else if (options.limit !== undefined) { params.limit = options.limit; } return params; }
  • Imports the necessary types and helpers for the domains service, including Domain schema and pagination support.
    import { Domain, DomainCheck, PaginationOptions, paginationToParams, } from '../api/types.js';

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