Skip to main content
Glama

get_meta_campaign_stats

Retrieve Meta campaign performance metrics including impressions, clicks, spend, CTR, CPM, and conversions to evaluate effectiveness before adjusting budgets.

Instructions

Get performance metrics for a Meta campaign: impressions, clicks, spend (USD), CTR, CPM, and conversions. Use to evaluate performance before budget decisions. Requires Starter plan or higher.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesMeta campaign ID.
date_presetNoTime range: today, yesterday, last_7d, last_14d, last_30d, this_month. Default: last_7d.

Implementation Reference

  • Handler implementation for the get_meta_campaign_stats tool.
    case 'get_meta_campaign_stats': {
        const denied = licenseCheck('meta');
        if (denied) return fail(denied);
        if (!args.campaign_id) return fail('campaign_id required.');
        return ok(await metaGet(`/${args.campaign_id}/insights`, {
            fields: 'campaign_name,impressions,clicks,spend,ctr,cpm,actions',
            date_preset: (args.date_preset as string) || 'last_7d',
        }));
    }
  • Registration and schema definition for the get_meta_campaign_stats tool.
    {
        name: 'get_meta_campaign_stats',
        description: 'Get performance metrics for a Meta campaign: impressions, clicks, spend (USD), CTR, CPM, and conversions. Use to evaluate performance before budget decisions. Requires Starter plan or higher.',
        inputSchema: {
            type: 'object',
            properties: {
                campaign_id: { type: 'string', description: 'Meta campaign ID.' },
                date_preset: { type: 'string', description: 'Time range: today, yesterday, last_7d, last_14d, last_30d, this_month. Default: last_7d.' },
            },
            required: ['campaign_id'],
        },
    },

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/Nolas-Shadow/agent1st-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server