Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

get_campaign_performance

Retrieve performance summary and calculated metrics for a specific PropellerAds campaign to analyze results and optimize advertising strategies.

Instructions

Get performance summary for a specific campaign with calculated metrics and insights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID
date_fromNoStart date (YYYY-MM-DD)
date_toNoEnd date (YYYY-MM-DD)

Implementation Reference

  • The handler logic for the 'get_campaign_performance' tool which fetches statistics using the client, calculates metrics, and formats the output string.
    elif name == "get_campaign_performance":
        stats = client.get_campaign_statistics(
            args["campaign_id"],
            date_from=args.get("date_from"),
            date_to=args.get("date_to"),
        )
        if not stats:
            return f"No statistics found for campaign {args['campaign_id']}."
    
        metrics = calculate_metrics(stats)
        campaign = client.get_campaign(args["campaign_id"])
    
        return (
            f"# Campaign Performance: {campaign.get('name', 'N/A')}\n\n"
            f"**Status:** {campaign.get('status', 'N/A')}\n"
            f"**Ad Format:** {campaign.get('ad_format', 'N/A')}\n\n"
            f"## Metrics\n"
            f"- Impressions: {metrics.get('impressions', 0):,}\n"
            f"- Clicks: {metrics.get('clicks', 0):,}\n"
            f"- CTR: {format_percentage(metrics.get('ctr'))}\n"
            f"- Conversions: {metrics.get('conversions', 0):,}\n"
            f"- CVR: {format_percentage(metrics.get('cvr'))}\n"
            f"- Spend: {format_currency(metrics.get('spend', metrics.get('cost', 0)))}\n"
            f"- CPA: {format_currency(metrics.get('cpa'))}\n"
            f"- Revenue: {format_currency(metrics.get('revenue', 0))}\n"
            f"- ROI: {format_percentage(metrics.get('roi'))}\n"
        )
  • The tool definition and input schema for 'get_campaign_performance'.
    Tool(
        name="get_campaign_performance",
        description="Get performance summary for a specific campaign with calculated metrics and insights.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {"type": "integer", "description": "Campaign ID"},
                "date_from": {"type": "string", "description": "Start date (YYYY-MM-DD)"},
                "date_to": {"type": "string", "description": "End date (YYYY-MM-DD)"},
            },
            "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/JanNafta/propellerads-mcp'

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