Skip to main content
Glama

liara_create_database

Create a new database on Liara cloud platform by specifying name, type, and plan for MariaDB, MySQL, PostgreSQL, MongoDB, Redis, or other supported database systems.

Instructions

Create a new database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDatabase name
typeYesDatabase type
planIDYesPlan ID for the database
versionNoDatabase version (optional)

Implementation Reference

  • The core handler function that implements the liara_create_database tool logic. It validates the required input fields (name, type, planID) and makes a POST request to the Liara API endpoint '/v1/databases' to create the database.
    export async function createDatabase( client: LiaraClient, request: CreateDatabaseRequest ): Promise<Database> { validateRequired(request.name, 'Database name'); validateRequired(request.type, 'Database type'); validateRequired(request.planID, 'Plan ID'); return await client.post<Database>('/v1/databases', request); }
  • TypeScript interface defining the input parameters for the liara_create_database tool: required name, type (from DatabaseType enum), planID, and optional version.
    export interface CreateDatabaseRequest { name: string; type: DatabaseType; planID: string; version?: string; }
  • Output type returned by the createDatabase handler, representing the created Liara database details.
    export interface Database { _id: string; name: string; type: DatabaseType; planID: string; status: DatabaseStatus; version?: string; createdAt: string; updatedAt: string; }
  • Union type for supported database types used in CreateDatabaseRequest.
    export type DatabaseType = | 'mariadb' | 'mysql' | 'postgres' | 'mssql' | 'mongodb' | 'redis' | 'elasticsearch' | 'rabbitmq';

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