Skip to main content
Glama
plans.ts902 B
import { LiaraClient } from '../api/client.js'; import { Plan, PaginationOptions, paginationToParams } from '../api/types.js'; import { unwrapApiResponse } from '../utils/errors.js'; /** * List available plans * @param planType - Optional filter by plan type ('app', 'database', 'vm') */ export async function listPlans( client: LiaraClient, planType?: 'app' | 'database' | 'vm', pagination?: PaginationOptions ): Promise<Plan[]> { const params: any = planType ? { type: planType } : {}; Object.assign(params, paginationToParams(pagination)); const response = await client.get<any>('/v1/plans', params); return unwrapApiResponse<Plan[]>(response, ['plans', 'data', 'items']); } /** * Get a specific plan by ID */ export async function getPlan( client: LiaraClient, planId: string ): Promise<Plan> { return await client.get<Plan>(`/v1/plans/${planId}`); }

Implementation Reference

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