Get Account Profile
virtualsms_get_profileRetrieve your full VirtualSMS account profile: email, balance, lifetime spend, total orders, active API keys, Telegram link status, and creation date.
Instructions
Full account profile: email, Telegram link status, current balance, lifetime spend, total orders, active API keys, and account creation date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:1478-1488 (handler)Handler function that executes the virtualsms_get_profile tool logic. Calls client.getProfile() and returns the profile as JSON.
export async function handleGetProfile(client: VirtualSMSClient) { const profile = await client.getProfile(); return { content: [ { type: 'text' as const, text: JSON.stringify(profile, null, 2), }, ], }; } - src/tools.ts:70-70 (schema)Input schema (Zod) for get profile - empty object, no parameters required.
export const GetProfileInput = z.object({}); - src/tools.ts:512-530 (registration)Tool definition registration in TOOL_DEFINITIONS array - name, title, description, inputSchema, and annotations.
{ name: 'virtualsms_get_profile', title: 'Get Account Profile', description: 'Full account profile: email, Telegram link status, current balance, lifetime spend, total orders, ' + 'active API keys, and account creation date.', inputSchema: { type: 'object' as const, properties: {}, required: [], }, annotations: { title: 'Get Account Profile', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, }, - src/client.ts:196-212 (helper)Client-side HTTP method getProfile() that calls /api/v1/customer/profile and maps the raw API response to the Profile interface.
async getProfile(): Promise<Profile> { this.requireApiKey(); const res = await this.http.get('/api/v1/customer/profile'); const raw = res.data as Record<string, unknown>; return { id: String(raw.id ?? ''), email: String(raw.email ?? ''), telegram_linked: Boolean(raw.telegram_linked), telegram_username: raw.telegram_username ? String(raw.telegram_username) : undefined, balance_usd: Number(raw.balance_usd ?? 0), total_spent_usd: Number(raw.total_spent_usd ?? 0), total_credits_usd: Number(raw.total_credits_usd ?? 0), total_orders: Number(raw.total_orders ?? 0), active_api_keys: Number(raw.active_api_keys ?? 0), created_at: String(raw.created_at ?? ''), }; } - src/client.ts:25-36 (helper)Profile interface definition with fields: id, email, telegram_linked, telegram_username, balance_usd, total_spent_usd, total_credits_usd, total_orders, active_api_keys, created_at.
export interface Profile { id: string; email: string; telegram_linked: boolean; telegram_username?: string; balance_usd: number; total_spent_usd: number; total_credits_usd: number; total_orders: number; active_api_keys: number; created_at: string; }