Skip to main content
Glama
EfrainTorres

ArmaVita Meta Ads MCP

search_demographics

Find demographic targeting classes for Meta Ads campaigns to refine audience selection and improve ad relevance.

Instructions

Search demographic targeting classes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meta_access_tokenNo
demographic_classNodemographics
page_sizeNo
page_cursorNo

Implementation Reference

  • The search_demographics tool function that performs the API request to search for demographic categories.
    async def search_demographics(
        meta_access_token: Optional[str] = None,
        demographic_class: str = "demographics",
        page_size: int = 50,
        page_cursor: str = "",
    ) -> str:
        """Search demographic targeting classes."""
        params: Dict[str, Any] = {
            "type": "adTargetingCategory",
            "class": demographic_class,
            "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)
  • The decorator @mcp_server.tool() registering the search_demographics function as an MCP tool.
    @mcp_server.tool()
    @meta_api_tool

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