Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)")
  • 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"}

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/rafaljanicki/x-twitter-mcp-server'

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