Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

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
NameRequiredDescriptionDefault
tweet_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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"]}
  • 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")
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Unfavorites a tweet' implies a mutation (removing a favorite), but it doesn't disclose any behavioral traits: no mention of permissions needed, whether it's reversible, rate limits, or what the output contains. This is inadequate for a mutation tool with zero annotation coverage.

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 ('Unfavorites a tweet') that directly states the purpose without any fluff. It's appropriately sized for a simple tool and front-loaded with the core action, making it easy to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (a mutation with no annotations) and the presence of an output schema (which helps), the description is incomplete. It lacks behavioral details (e.g., permissions, effects), usage guidelines, and doesn't leverage the output schema to explain return values. For a mutation tool in a set with many siblings, this is insufficient.

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

Parameters4/5

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

The description has 0% schema description coverage (parameter 'tweet_id' is undocumented in schema), but it compensates well. 'Unfavorites a tweet' implies the 'tweet_id' parameter identifies the tweet to unfavorite, adding clear semantic meaning beyond the bare schema. With only 1 parameter, this is sufficient for a baseline of 4.

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 'Unfavorites a tweet' clearly states the action (unfavorite) and target resource (a tweet) with a specific verb. It distinguishes from sibling tools like 'favorite_tweet' (opposite action) and 'delete_tweet' (different operation). However, it doesn't specify what 'unfavorite' means in Twitter's context (removing from likes/favorites), keeping it at 4 rather than 5.

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. It doesn't mention prerequisites (e.g., the tweet must already be favorited), contrast with 'favorite_tweet', or explain use cases. With sibling tools like 'favorite_tweet' and 'delete_tweet' present, this lack of context is a clear gap.

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