Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

find_top_zones

Identify high-performing advertising zones for campaign optimization by analyzing conversion data, ROI metrics, and performance thresholds to build effective whitelists.

Instructions

Find best performing zones. Useful for whitelist candidates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesCampaign ID
min_conversionsNoMinimum conversions (default: 1)
min_roiNoMinimum ROI percentage (default: 0)
limitNoMax results (default: 20)
date_fromNoStart date
date_toNoEnd date

Implementation Reference

  • The logic for the 'find_top_zones' tool handler, which fetches zone statistics, calculates metrics, filters by conversion and ROI thresholds, and formats the output.
    elif name == "find_top_zones":
        zones = client.get_zone_statistics(
            campaign_id=args["campaign_id"],
            date_from=args.get("date_from"),
            date_to=args.get("date_to"),
        )
    
        min_conv = args.get("min_conversions", 1)
        min_roi = args.get("min_roi", 0)
        limit = args.get("limit", 20)
    
        enriched = [calculate_metrics(z) for z in zones]
        top_zones = [
            z for z in enriched
            if (z.get("conversions", 0) or 0) >= min_conv and (z.get("roi", 0) or 0) >= min_roi
        ]
        top_zones.sort(key=lambda x: x.get("roi", 0), reverse=True)
    
        if not top_zones:
            return f"No zones found matching criteria (min conversions: {min_conv}, min ROI: {min_roi}%)."
    
        lines = [f"# Top Performing Zones (Campaign {args['campaign_id']})\n\n"]
        lines.append("| Zone ID | Conversions | Spend | Revenue | ROI |\n")
        lines.append("|---------|-------------|-------|---------|-----|\n")
    
        for z in top_zones[:limit]:
            lines.append(
                f"| {z.get('zone_id')} | "
                f"{z.get('conversions', 0)} | "
                f"{format_currency(z.get('spend', z.get('cost', 0)))} | "
                f"{format_currency(z.get('revenue', 0))} | "
                f"{format_percentage(z.get('roi'))} |\n"
            )
    
        zone_ids = [z.get("zone_id") for z in top_zones[:limit] if z.get("zone_id")]
        lines.append(f"\nZone IDs for whitelist: `{zone_ids}`")
    
        return "".join(lines)
  • The definition and registration of the 'find_top_zones' tool, including its input schema.
    Tool(
        name="find_top_zones",
        description="Find best performing zones. Useful for whitelist candidates.",
        inputSchema={
            "type": "object",
            "properties": {
                "campaign_id": {"type": "integer", "description": "Campaign ID"},
                "min_conversions": {
                    "type": "integer",
                    "description": "Minimum conversions (default: 1)",
                },
                "min_roi": {
                    "type": "number",
                    "description": "Minimum ROI percentage (default: 0)",
                },
                "limit": {"type": "integer", "description": "Max results (default: 20)"},
                "date_from": {"type": "string", "description": "Start date"},
                "date_to": {"type": "string", "description": "End date"},
            },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool finds 'best performing zones' and hints at a use case for whitelisting, but does not describe what the tool returns (e.g., list of zones with metrics), whether it's read-only or has side effects, or any performance characteristics like rate limits. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness4/5

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

The description is very concise with two short sentences, making it easy to read and front-loaded with the main purpose. However, it could be more structured by explicitly linking parameters to the 'best performing' criteria, but it avoids unnecessary verbosity.

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

Completeness2/5

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

Given the complexity of a tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It does not explain what the tool returns (e.g., a list of zones with performance metrics), how results are ordered, or any behavioral nuances. This leaves the agent with insufficient context to use the tool effectively beyond basic parameter input.

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?

The input schema has 100% description coverage, so parameters are well-documented in the schema. The description does not add any meaning beyond the schema, such as explaining how 'best performing' is determined from the parameters (e.g., using min_conversions and min_roi). Baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

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

Purpose3/5

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

The description states the tool finds 'best performing zones' and mentions 'useful for whitelist candidates,' which gives a general purpose but lacks specificity about what constitutes 'best performing' (e.g., based on conversions, ROI, etc.). It distinguishes from some siblings like 'find_underperforming_zones' but not clearly from others like 'get_zone_performance' or 'find_scaling_opportunities.'

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

Usage Guidelines2/5

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

The description provides minimal guidance by noting it's 'useful for whitelist candidates,' implying a context for use, but does not specify when to use this tool versus alternatives like 'find_underperforming_zones' or 'get_zone_performance,' nor does it mention prerequisites or exclusions. No explicit when/when-not instructions are given.

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