unfavorite_tweet
Remove a tweet from your favorites list on X (Twitter) by specifying its tweet ID. Simplify cleanup and manage your saved tweets with ease.
Instructions
Unfavorites a tweet
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tweet_id | Yes |
Implementation Reference
- src/x_twitter_mcp/server.py:289-300 (handler)Handler function that executes the unfavorite_tweet tool logic: performs rate limiting check, initializes Twitter API client, calls unlike method, and returns confirmation.async def unfavorite_tweet(tweet_id: str) -> Dict: """Unfavorites a tweet. Args: tweet_id (str): The ID of the tweet to unfavorite (unlike). """ if not check_rate_limit("like_actions"): raise Exception("Like action rate limit exceeded") client, _ = initialize_twitter_clients() result = client.unlike(tweet_id=tweet_id) return {"tweet_id": tweet_id, "liked": not result.data["liked"]}
- src/x_twitter_mcp/server.py:288-288 (registration)Registers the unfavorite_tweet tool with the FastMCP server using the @server.tool decorator, specifying the name and description.@server.tool(name="unfavorite_tweet", description="Unfavorites a tweet")