Skip to main content
Glama
rafaljanicki

X (Twitter) MCP server

by rafaljanicki

vote_on_poll

Submit votes on Twitter polls using tweet ID and choice. Enables participation in polls within the X (Twitter) MCP server.

Instructions

Vote on a poll (mocked)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
choiceYes
tweet_idYes

Implementation Reference

  • Tool registration decorator for the vote_on_poll tool.
    @server.tool(name="vote_on_poll", description="Vote on a poll (mocked)")
  • Handler function that implements the vote_on_poll tool logic. It performs a rate limit check and returns a mock response indicating the vote was cast, as Twitter API v2 does not support programmatic poll voting.
    async def vote_on_poll(tweet_id: str, choice: str) -> Dict: """Votes on a poll. (Note: Twitter API v2 does not support programmatically voting on polls. This is a mock response.) Args: tweet_id (str): The ID of the tweet containing the poll. choice (str): The choice to vote for (must exactly match one of the poll options). """ if not check_rate_limit("tweet_actions"): raise Exception("Tweet action rate limit exceeded") # Twitter API v2 doesn't support poll voting; return mock response return {"tweet_id": tweet_id, "choice": choice, "status": "voted"}

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