Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

bookmark_tweet

Save tweets to your bookmarks for easy access. Organize them in folders to streamline your X (Twitter) experience.

Instructions

Adds the tweet to bookmarks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folder_idNo
tweet_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the "bookmark_tweet" tool using the @server.tool decorator from FastMCP.
    @server.tool(name="bookmark_tweet", description="Adds the tweet to bookmarks")
  • The main handler function for the "bookmark_tweet" tool. It performs rate limit check, initializes Twitter clients, calls the bookmark API, and returns success status.
    async def bookmark_tweet(tweet_id: str, folder_id: Optional[str] = None) -> Dict:
        """Bookmarks a tweet.
    
        Args:
            tweet_id (str): The ID of the tweet to bookmark.
            folder_id (Optional[str]): The ID of the bookmark folder to add the tweet to. (Currently not supported by Tweepy v2 client, will be ignored).
        """
        if not check_rate_limit("tweet_actions"):
            raise Exception("Tweet action rate limit exceeded")
        client, _ = initialize_twitter_clients()
        result = client.bookmark(tweet_id=tweet_id)
        return {"tweet_id": tweet_id, "bookmarked": result.data["bookmarked"]}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits such as permissions needed, rate limits, whether it's idempotent, or what happens if the tweet is already bookmarked. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words, making it easy to parse and front-loaded with the core action. Every word earns its place, though it could benefit from more detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a mutation with 2 parameters), no annotations, and an output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks behavioral context and parameter guidance, making it just viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds no parameter information beyond what's implied by the tool name. It doesn't explain 'tweet_id' or 'folder_id' semantics, though with only 2 parameters and an output schema, the baseline is 3 as the schema handles structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Adds') and target resource ('the tweet to bookmarks'), making the tool's purpose immediately understandable. However, it doesn't differentiate this from sibling tools like 'delete_bookmark' or 'favorite_tweet' beyond the basic verb, missing explicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'favorite_tweet' or 'delete_bookmark', nor does it mention prerequisites or context for bookmarking tweets. It lacks any usage instructions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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