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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/propellerads_mcp/client.py:321-324 (handler)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 - src/propellerads_mcp/server.py:454-458 (registration)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": {}}, ), - src/propellerads_mcp/server.py:887-889 (handler)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```"