Skip to main content
Glama
JanNafta

PropellerAds MCP Server

by JanNafta

get_ad_formats

Retrieve available advertising format options to select appropriate layouts for campaign setup and optimization.

Instructions

Get list of available ad formats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of the get_ad_formats logic, which makes a GET request to the PropellerAds API.
    def get_ad_formats(self) -> list[dict[str, Any]]:
        """Get available ad formats."""
        result = self._request("GET", "/adv/ad-formats")
        return result.get("data", result) if isinstance(result, dict) else result
  • Registration of the get_ad_formats tool in the MCP server.
    Tool(
        name="get_ad_formats",
        description="Get list of available ad formats.",
        inputSchema={"type": "object", "properties": {}},
    ),
  • The handler logic in the MCP server that calls the client method when the tool is invoked.
    elif name == "get_ad_formats":
        formats = client.get_ad_formats()
        return f"# Available Ad Formats\n\n```json\n{json.dumps(formats, indent=2)}\n```"

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