Skip to main content
Glama

liara_get_zone

Retrieve DNS zone details including configuration and records from the Liara cloud platform using the zone ID.

Instructions

Get details of a DNS zone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zoneIdYesThe zone ID

Implementation Reference

  • Handler function that implements the core logic for retrieving a specific DNS zone by ID using the Liara API client. This is the exact implementation of the liara_get_zone tool.
    export async function getZone(
        client: LiaraClient,
        zoneId: string
    ): Promise<Zone> {
        validateRequired(zoneId, 'Zone ID');
        return await client.get<Zone>(`/v1/zones/${zoneId}`);
    }
  • TypeScript interface defining the Zone object structure, used as input/output schema for the getZone handler.
    export interface Zone {
        _id: string;
        name: string;
        status: 'ACTIVE' | 'PENDING';
        createdAt: string;
        nameservers?: string[];
    }
  • Helper function used in getZone to validate the required zoneId parameter.
    export function validateRequired(value: any, fieldName: string): void {
        if (value === undefined || value === null || value === '') {
            throw new LiaraMcpError(`${fieldName} is required`);
        }
    }
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