Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

get_zone_performance

Retrieve zone-level performance statistics to identify top-performing placements and optimize whitelist/blacklist decisions for ad campaigns.

Instructions

Get performance statistics grouped by zone/placement. Useful for whitelist/blacklist optimization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idNoFilter by campaign ID
date_fromNoStart date (YYYY-MM-DD)
date_toNoEnd date (YYYY-MM-DD)
limitNoMax number of zones to return (default: 100)
sort_byNoSort by: spend, conversions, roi, ctr

Implementation Reference

  • The `get_zone_performance` tool handler, which retrieves zone statistics from the client, calculates performance metrics, and formats the output as a Markdown table.
    elif name == "get_zone_performance":
        zones = client.get_zone_statistics(
            campaign_id=args.get("campaign_id"),
            date_from=args.get("date_from"),
            date_to=args.get("date_to"),
            limit=args.get("limit", 100),
        )
    
        if not zones:
            return "No zone statistics found."
    
        enriched = [calculate_metrics(z) for z in zones]
    
        # Sort if requested
        sort_by = args.get("sort_by", "spend")
        enriched.sort(key=lambda x: x.get(sort_by, 0), reverse=True)
    
        lines = ["# Zone Performance\n\n"]
        lines.append("| Zone ID | Impressions | Clicks | CTR | Conv | Spend | ROI |\n")
        lines.append("|---------|-------------|--------|-----|------|-------|-----|\n")
    
        for z in enriched[:args.get("limit", 100)]:
            lines.append(
                f"| {z.get('zone_id', 'N/A')} | "
                f"{z.get('impressions', 0):,} | "
                f"{z.get('clicks', 0):,} | "
                f"{format_percentage(z.get('ctr'))} | "
                f"{z.get('conversions', 0)} | "
                f"{format_currency(z.get('spend', z.get('cost', 0)))} | "
                f"{format_percentage(z.get('roi'))} |\n"
            )
    
        return "".join(lines)
  • The `Tool` registration for `get_zone_performance`, defining the tool name, description, and input schema.
        name="get_zone_performance",
        description="Get performance statistics grouped by zone/placement. Useful for whitelist/blacklist optimization.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {
                    "type": "integer",
                    "description": "Filter by campaign ID",
                },
                "date_from": {"type": "string", "description": "Start date (YYYY-MM-DD)"},
                "date_to": {"type": "string", "description": "End date (YYYY-MM-DD)"},
                "limit": {
                    "type": "integer",
                    "description": "Max number of zones to return (default: 100)",
                },
                "sort_by": {
                    "type": "string",
                    "description": "Sort by: spend, conversions, roi, ctr",
                    "enum": ["spend", "conversions", "roi", "ctr"],
                },
            },
        },
    ),
Behavior2/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 of behavioral disclosure. It mentions the tool is 'useful for whitelist/blacklist optimization,' which hints at read-only analysis, but doesn't explicitly state whether this is a read operation, what permissions are needed, or how results are returned (e.g., pagination, format). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 extremely concise with just two short sentences that are front-loaded with the core purpose. Every word earns its place, and there's no redundant or unnecessary information, making it efficient and easy to parse.

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 the tool's complexity (5 parameters, no output schema, no annotations), the description is minimally adequate. It states the purpose and a use case but lacks details on behavioral traits, output format, or error handling. Without annotations or an output schema, the description should do more to compensate, but it only provides basic context, leaving gaps for an agent to infer behavior.

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%, meaning all parameters are documented in the input schema. The description doesn't add any additional meaning beyond what's in the schema (e.g., it doesn't explain how 'zone/placement' relates to parameters or provide usage examples). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get performance statistics grouped by zone/placement.' It specifies the verb ('Get') and resource ('performance statistics') with grouping criteria. However, it doesn't explicitly differentiate from sibling tools like 'get_campaign_performance' or 'get_performance_report' which might overlap in functionality.

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

Usage Guidelines3/5

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

The description provides implied usage context with 'Useful for whitelist/blacklist optimization,' which suggests when this tool might be valuable. However, it doesn't explicitly state when to use this tool versus alternatives like 'find_top_zones' or 'find_underperforming_zones,' nor does it mention any prerequisites or exclusions for usage.

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/JanNafta/propellerads-mcp'

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