Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

get_tweet_details

Retrieve comprehensive details of a specific tweet by providing its unique ID, enabling insights into content, engagement, and metadata on the X (Twitter) MCP server.

Instructions

Get detailed information about a specific tweet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tweet_idYes

Implementation Reference

  • The main handler function that executes the get_tweet_details tool. It initializes the Twitter client and fetches the tweet details using client.get_tweet with specified fields.
    async def get_tweet_details(tweet_id: str) -> Dict: """Fetches tweet details. Args: tweet_id (str): The ID of the tweet to fetch. """ client, _ = initialize_twitter_clients() tweet = client.get_tweet(id=tweet_id, tweet_fields=["id", "text", "created_at", "author_id"]) return tweet.data
  • The FastMCP decorator that registers the get_tweet_details tool, defining its name and description.
    @server.tool(name="get_tweet_details", description="Get detailed information about a specific tweet")

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