Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

search_behaviors

Find behavior-based targeting categories for Meta Ads campaigns to reach specific audience segments based on their online activities and interests.

Instructions

Search behavior-based targeting categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meta_access_tokenNo
page_sizeNo
page_cursorNo

Implementation Reference

  • The 'search_behaviors' function is defined in 'src/armavita_meta_ads_mcp/core/targeting_tools.py'. It constructs the parameters for an API request to search for behavior-based targeting categories and returns the JSON result. Note: It is missing the @mcp_server.tool() decorator in this block, which is likely added dynamically or through some other mechanism not immediately visible in this file, or it may have been omitted in the snippet provided. Wait, I should check the file again carefully. Actually, line 405 shows @mcp_server.tool() for search_demographics. Let me re-read lines 385-388.
    async def search_behaviors(
        meta_access_token: Optional[str] = None,
        page_size: int = 50,
        page_cursor: str = "",
    ) -> str:
        """Search behavior-based targeting categories."""
        params: Dict[str, Any] = {
            "type": "adTargetingCategory",
            "class": "behaviors",
            "page_size": int(page_size),
        }
        if page_cursor:
            params["page_cursor"] = page_cursor
        payload = await make_api_request("search", meta_access_token, params)
        return _as_json(payload)

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/EfrainTorres/armavita-meta-ads-mcp'

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