liara_list_databases
Retrieve a list of all databases in your Liara cloud account to manage and monitor your data storage resources.
Instructions
List all databases in your Liara account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based) | |
| perPage | No | Number of items per page | |
| limit | No | Alternative to perPage: maximum number of items to return | |
| offset | No | Alternative to page: number of items to skip |
Implementation Reference
- src/services/databases.ts:10-16 (handler)The `listDatabases` function serves as the core handler for the liara_list_databases tool. It makes an API call to Liara's /v1/databases endpoint and unwraps the response to return an array of Database objects./** * List all databases */ export async function listDatabases(client: LiaraClient): Promise<Database[]> { const response = await client.get<any>('/v1/databases'); return unwrapApiResponse<Database[]>(response, ['databases', 'data', 'items']); }
- src/api/types.ts:134-143 (schema)Type definition for Database objects returned by the liara_list_databases tool.export interface Database { _id: string; name: string; type: DatabaseType; planID: string; status: DatabaseStatus; version?: string; createdAt: string; updatedAt: string; }
- src/api/types.ts:145-154 (schema)DatabaseType enum used in Database objects from liara_list_databases.export type DatabaseType = | 'mariadb' | 'mysql' | 'postgres' | 'mssql' | 'mongodb' | 'redis' | 'elasticsearch' | 'rabbitmq';
- src/api/types.ts:155-156 (schema)DatabaseStatus enum used in Database objects from liara_list_databases.export type DatabaseStatus = 'RUNNING' | 'STOPPED' | 'CREATING' | 'FAILED';
- src/services/databases.ts:8-8 (helper)Imports helper functions used by the handler, including unwrapApiResponse which processes the API response.import { validateRequired, unwrapApiResponse } from '../utils/errors.js';