Skip to main content
Glama

get_interest_suggestions

Generate targeted interest suggestions for Meta Ads campaigns based on existing interests to expand audience reach and refine targeting strategies.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
interest_listYes
access_tokenNo
limitNo

Implementation Reference

  • The primary handler function for the 'get_interest_suggestions' tool. It is decorated with @mcp_server.tool() for MCP registration and @meta_api_tool. The function accepts a list of interests, queries Meta's API search endpoint with type='adinterestsuggestion', and returns formatted JSON suggestions.
    @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)
  • Re-export of get_interest_suggestions from targeting.py into the core package namespace via __all__, making it available for MCP server registration.
    from .targeting import search_interests, get_interest_suggestions, estimate_audience_size, search_behaviors, search_demographics, search_geo_locations from . import reports # Import module to register conditional tools from . import duplication # Import module to register conditional duplication tools from .openai_deep_research import search, fetch # OpenAI MCP Deep Research tools __all__ = [ 'mcp_server', 'get_ad_accounts', 'get_account_info', 'get_campaigns', 'get_campaign_details', 'create_campaign', 'get_adsets', 'get_adset_details', 'update_adset', 'get_ads', 'get_ad_details', 'get_ad_creatives', 'get_ad_image', 'update_ad', 'get_insights', # Note: 'get_login_link' is registered conditionally by the authentication module 'login_cli', 'login', 'main', 'create_budget_schedule', 'search_interests', 'get_interest_suggestions', 'estimate_audience_size', 'search_behaviors', 'search_demographics', 'search_geo_locations',
  • Package-level export and import of get_interest_suggestions in the main __init__.py, exposing the tool at the root package level.
    'get_interest_suggestions', 'estimate_audience_size', 'search_behaviors', 'search_demographics', 'search_geo_locations' ] # Import key functions to make them available at package level from .core import ( get_ad_accounts, get_account_info, get_campaigns, get_campaign_details, create_campaign, get_adsets, get_adset_details, update_adset, get_ads, get_ad_details, get_ad_creatives, get_ad_image, update_ad, get_insights, login_cli, main, search_interests, get_interest_suggestions, estimate_audience_size, search_behaviors, search_demographics, search_geo_locations )

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