suggest_interests
Generate related interests from a base list to expand targeting options for Meta Ads campaigns.
Instructions
Fetch related interests from a base list of interests.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| interest_list | Yes | ||
| meta_access_token | No | ||
| page_size | No | ||
| page_cursor | No |
Implementation Reference
- The main function handling the 'suggest_interests' tool, which constructs the API request to fetch interest suggestions.
async def suggest_interests( interest_list: List[str], meta_access_token: Optional[str] = None, page_size: int = 25, page_cursor: str = "", ) -> str: """Fetch related interests from a base list of interests.""" if not interest_list: return _as_json({"error": "No interest list provided"}) params: Dict[str, Any] = { "type": "adinterestsuggestion", "interest_list": json.dumps(list(interest_list)), "page_size": int(page_size), } if page_cursor: params["page_cursor"] = page_cursor payload = await make_api_request("search", meta_access_token, params) - src/armavita_meta_ads_mcp/core/targeting_tools.py:215-216 (registration)Registration of the 'suggest_interests' tool using the @mcp_server.tool() decorator.
@mcp_server.tool() @meta_api_tool