Skip to main content
Glama

liara_create_disk

Add storage capacity to applications by creating and mounting disks with specified size and path.

Instructions

Create a new disk for an app

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNameYesThe name of the app
nameYesDisk name
sizeYesDisk size in GB
mountPathYesMount path for the disk

Implementation Reference

  • The main handler function that implements the logic for creating a disk on Liara for a given app/project. It validates inputs and makes a POST request to the Liara API.
    export async function createDisk( client: LiaraClient, appName: string, request: CreateDiskRequest ): Promise<Disk> { validateAppName(appName); validateRequired(request.name, 'Disk name'); validateRequired(request.size, 'Disk size'); validateRequired(request.mountPath, 'Mount path'); if (request.size <= 0) { throw new Error('Disk size must be greater than 0'); } return await client.post<Disk>( `/v1/projects/${appName}/disks`, request ); }
  • TypeScript interface defining the input parameters for the createDisk tool: disk name, size in GB, and mount path.
    export interface CreateDiskRequest { name: string; size: number; mountPath: string; }
  • TypeScript interface defining the output/response structure for disk objects returned by the API.
    export interface Disk { _id: string; name: string; projectID: string; size: number; // in GB mountPath: string; createdAt: string; }
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