Skip to main content
Glama

liara_get_user

Retrieve comprehensive user account details including subscription plans and team information from the Liara cloud platform.

Instructions

Get comprehensive user information including plans and teams

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for retrieving Liara user information. Fetches from /v1/me endpoint, transforms response to UserInfo format.
    export async function getUserInfo(client: LiaraClient): Promise<UserInfo> { const response = await client.get<UserInfoResponse>('/v1/me'); // Transform the API response to match the expected format const userInfo: UserInfo = { // Core user fields ...response.user, // Override with specific mappings createdAt: response.user.joined_at, // Add plans and database versions plans: { mail: response.plans?.mail, projects: response.plans?.projects, }, databaseVersions: response.databaseVersions, defaultDatabaseVersions: response.defaultDatabaseVersions, }; return userInfo; }
  • Output schema/type definition for the user information returned by the tool.
    export interface UserInfo { _id: string; email: string; username?: string; firstName?: string; lastName?: string; fullname?: string; phone?: string; plans?: { app?: any[]; database?: any[]; vm?: any[]; mail?: any; projects?: any; }; teams?: Array<{ _id: string; name: string; }>; createdAt?: string; joined_at?: string; databaseVersions?: any; defaultDatabaseVersions?: any; [key: string]: any; // Allow additional fields }
  • Raw API response type used internally by the handler.
    export interface UserInfoResponse { user: { _id: string; email: string; fullname?: string; username?: string; firstName?: string; lastName?: string; phone?: string; nationalCode?: string; joined_at?: string; freeCreditTime?: number; remainingFreeCredit?: number; hasPassword?: boolean; emailVerifiedAt?: string; phoneVerifiedAt?: string; isVerified?: boolean; storage?: { namespace: string; status: string; }; avatar?: string; twoFA?: boolean; isEmailChangeDeadline?: boolean; isPhoneChangeDeadline?: boolean; isTeam?: boolean; hasFreeVM?: boolean; accountType?: string; minCreditAmount?: number; isManualMinCredit?: boolean; legacyNetworkFeature?: boolean; hasSucceedPayment?: boolean; privateNetworkFeature?: boolean; legacyObjectStorageFeature?: boolean; legacyDomainsFeature?: boolean; currentSubscriptionPlan?: any; gitProviderIntegrations?: any[]; gitRepositoryIntegrations?: any[]; }; databaseVersions?: { mysql?: Array<{ label: string; value: string }>; mariadb?: Array<{ label: string; value: string }>; postgres?: Array<{ label: string; value: string; postgisValue?: string; pgvectorValue?: string }>; mssql?: Array<{ label: string; value: string }>; mongodb?: Array<{ label: string; value: string }>; redis?: Array<{ label: string; value: string }>; elasticsearch?: Array<{ label: string; value: string }>; rabbitmq?: Array<{ label: string; value: string }>; }; defaultDatabaseVersions?: { mysql?: string; mariadb?: string; postgres?: string; mssql?: string; mongodb?: string; redis?: string; elasticsearch?: string; rabbitmq?: string; }; plans?: { mail?: any; projects?: any; }; }
  • Helper function that calls getUserInfo to provide account listing (single user currently).
    export async function listAccounts(client: LiaraClient): Promise<UserInfo[]> { // This might be a different endpoint, but for now we return the current user const userInfo = await getUserInfo(client); return [userInfo]; }

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