Skip to main content
Glama

get_interest_suggestions

Generate targeted interest suggestions for Meta Ads campaigns by analyzing existing interests, providing relevant options with audience size and descriptions for optimization.

Instructions

Get interest suggestions based on existing interests. Args: access_token: Meta API access token (optional - will use cached token if not provided) interest_list: List of interest names to get suggestions for (e.g., ["Basketball", "Soccer"]) limit: Maximum number of suggestions to return (default: 25) Returns: JSON string containing suggested interests with id, name, audience_size, and description fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenNo
interest_listNo
limitNo

Implementation Reference

  • The primary handler function for the 'get_interest_suggestions' MCP tool. Decorated with @mcp_server.tool() for registration and @meta_api_tool for API handling. Implements logic to fetch interest suggestions via Meta Ads API 'search' endpoint with type 'adinterestsuggestion'.
    @mcp_server.tool() @meta_api_tool async def get_interest_suggestions(interest_list: List[str], access_token: Optional[str] = None, limit: int = 25) -> str: """ Get interest suggestions based on existing interests. Args: interest_list: List of interest names to get suggestions for (e.g., ["Basketball", "Soccer"]) access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of suggestions to return (default: 25) Returns: JSON string containing suggested interests with id, name, audience_size, and description fields """ if not interest_list: return json.dumps({"error": "No interest list provided"}, indent=2) endpoint = "search" params = { "type": "adinterestsuggestion", "interest_list": json.dumps(interest_list), "limit": limit } data = await make_api_request(endpoint, access_token, params) return json.dumps(data, indent=2)

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/pipeboard-co/meta-ads-mcp'

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