get_ad_account_info
Retrieve ad account details including balance, spend, currency, and status to verify account activity and funding before launching campaigns.
Instructions
Get current balance, total spend, currency, and account status for all connected ad accounts (Meta and/or TikTok). Call before creating campaigns to confirm account is active and has sufficient funds. Requires valid license.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:394-410 (handler)The handler logic for the 'get_ad_account_info' tool, which fetches Meta and TikTok ad account information based on configuration and license tier.
case 'get_ad_account_info': { const denied = licenseCheck(); if (denied) return fail(denied); const tier = getLicenseTier(); const results: Record<string, unknown> = {}; if (cfg.hasMeta()) { results.meta = await metaGet(`/${cfg.metaAccount()}`, { fields: 'name,account_status,currency,balance,amount_spent,spend_cap,timezone_name', }); } if (cfg.hasTikTok() && tier !== 'starter') { results.tiktok = await tikTokGet('/advertiser/info/', { advertiser_id: cfg.tikTokAdvId(), fields: '["name","status","currency","balance","timezone"]', }); } else if (tier === 'starter') { results.tiktok = { message: 'TikTok requires Pro plan or higher. Upgrade at https://agent1st.io/ads/' }; - src/index.ts:209-216 (registration)Registration of the 'get_ad_account_info' tool definition.
name: 'get_ad_account_info', description: 'Get current balance, total spend, currency, and account status for all connected ad accounts (Meta and/or TikTok). Call before creating campaigns to confirm account is active and has sufficient funds. Requires valid license.', inputSchema: { type: 'object', properties: {}, required: [] }, }, { name: 'list_meta_campaigns', description: 'List all campaigns in the Meta (Facebook/Instagram) ad account with campaign ID, name, status (ACTIVE/PAUSED/ARCHIVED), objective, and daily budget. Use campaign IDs to get stats, adjust budgets, or pause/enable. Requires Starter plan or higher.', inputSchema: {