liara_get_network
Retrieve network configuration details including ID, settings, and infrastructure information from the Liara cloud platform for deployment management.
Instructions
Get details of a network
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| networkId | Yes | The network ID |
Implementation Reference
- src/services/network.ts:23-29 (handler)The core handler function that executes the liara_get_network tool logic: validates the network ID and fetches network details from the Liara API endpoint /v1/networks/{networkId}.
export async function getNetwork( client: LiaraClient, networkId: string ): Promise<Network> { validateRequired(networkId, 'Network ID'); return await client.get<Network>(`/v1/networks/${networkId}`); } - src/api/types.ts:304-309 (schema)TypeScript interface defining the structure of a Network object, used as input/output type for the getNetwork function.
export interface Network { _id: string; name: string; cidr: string; createdAt: string; } - src/utils/errors.ts:54-58 (helper)Utility function used in the handler to validate that the required networkId parameter is provided.
export function validateRequired(value: any, fieldName: string): void { if (value === undefined || value === null || value === '') { throw new LiaraMcpError(`${fieldName} is required`); } }