delete_all_bookmarks
Remove all bookmarks from the X (Twitter) MCP server with a single action. This tool simulates the deletion process for efficient management of saved content.
Instructions
Deletes all bookmarks (simulated)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/x_twitter_mcp/server.py:328-328 (registration)Registers the 'delete_all_bookmarks' tool with the FastMCP server using the @server.tool decorator.@server.tool(name="delete_all_bookmarks", description="Deletes all bookmarks (simulated)")
- src/x_twitter_mcp/server.py:329-338 (handler)The handler function that simulates deleting all bookmarks by fetching the list of bookmarks using client.get_bookmarks() and then removing each one using client.remove_bookmark().async def delete_all_bookmarks() -> Dict: """Deletes all bookmarks. (Simulated as Twitter API v2 doesn't have a direct endpoint for this. Fetches all bookmarks and deletes them one by one.)""" if not check_rate_limit("tweet_actions"): raise Exception("Tweet action rate limit exceeded") client, _ = initialize_twitter_clients() # Twitter API v2 doesn't have a direct endpoint; simulate by fetching and removing bookmarks = client.get_bookmarks() for bookmark in bookmarks.data: client.remove_bookmark(tweet_id=bookmark["id"]) return {"status": "all bookmarks deleted"}