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'],
        },
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the requirement of a 'Starter plan or higher,' which is useful behavioral context for permissions or access needs. However, it does not cover other traits like rate limits, error handling, or response format, leaving gaps in behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by usage context and prerequisites. Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description provides basic purpose and usage but lacks details on return values, error cases, or performance implications. It is adequate for a simple read operation but incomplete for full contextual understanding, especially without behavioral or output information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (campaign_id and date_preset) with their types and descriptions. The description does not add any parameter-specific information beyond what the schema provides, such as format details or examples, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get performance metrics') and resource ('for a Meta campaign'), listing exact metrics like impressions, clicks, spend, CTR, CPM, and conversions. It distinguishes from siblings by focusing on Meta campaign statistics rather than TikTok campaigns or other operations like creation, deletion, or listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('Use to evaluate performance before budget decisions'), but it does not explicitly state when not to use it or name specific alternatives. It implies usage for Meta campaigns only, which helps differentiate from TikTok-related siblings, but lacks explicit exclusions or comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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