Skip to main content
Glama

liara_list_buckets

Retrieve a list of storage buckets with pagination controls to manage object storage on the Liara cloud platform.

Instructions

List all storage buckets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
perPageNoNumber of items per page
limitNoAlternative to perPage: maximum number of items to return
offsetNoAlternative to page: number of items to skip

Implementation Reference

  • The handler function listBuckets that lists all Liara buckets via the API, handling pagination and response unwrapping. This is the core implementation of the liara_list_buckets tool.
    * List all buckets */ export async function listBuckets( client: LiaraClient, pagination?: PaginationOptions ): Promise<Bucket[]> { const params = paginationToParams(pagination); const response = await client.get<any>('/v1/buckets', params); return unwrapApiResponse<Bucket[]>(response, ['buckets', 'data', 'items']); }
  • Type definition for Bucket, which is the return type of listBuckets.
    export interface Bucket { _id: string; name: string; region: string; createdAt: string; }
  • Input schema for pagination options accepted by listBuckets.
    export interface PaginationOptions { page?: number; perPage?: number; limit?: number; // Alternative to perPage offset?: number; // Alternative to page }
  • Uses paginationToParams helper and unwrapApiResponse to process the API response.
    const params = paginationToParams(pagination); const response = await client.get<any>('/v1/buckets', params); return unwrapApiResponse<Bucket[]>(response, ['buckets', 'data', 'items']);

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