Skip to main content
Glama

liara_create_network

Create a new network with a specified name and optional CIDR block to organize and isolate resources in your cloud infrastructure.

Instructions

Create a new network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNetwork name
cidrNoCIDR block (optional)

Implementation Reference

  • The core handler function that implements the logic for creating a new Liara network by making a POST request to the /v1/networks API endpoint with name and optional CIDR.
    export async function createNetwork( client: LiaraClient, name: string, cidr?: string ): Promise<Network> { validateRequired(name, 'Network name'); const request: any = { name }; if (cidr) { request.cidr = cidr; } return await client.post<Network>('/v1/networks', request); }
  • Type definition for the Network object returned by the createNetwork API call.
    export interface Network { _id: string; name: string; cidr: string; createdAt: string; }
  • Imports validation helper used in createNetwork.
    import { validateRequired } from '../utils/errors.js';
  • Uses validation helper to ensure network name is provided.
    validateRequired(name, 'Network name');

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