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
| Name | Required | Description | Default |
|---|---|---|---|
| zoneId | Yes | The zone ID |
Implementation Reference
- src/services/dns.ts:27-34 (handler)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}`); }
- src/api/types.ts:213-219 (schema)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[]; }
- src/utils/errors.ts:54-58 (helper)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`); } }