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
| Name | Required | Description | Default |
|---|---|---|---|
| choice | Yes | ||
| tweet_id | Yes |
Implementation Reference
- src/x_twitter_mcp/server.py:262-262 (registration)Tool registration decorator for the vote_on_poll tool.@server.tool(name="vote_on_poll", description="Vote on a poll (mocked)")
- src/x_twitter_mcp/server.py:263-273 (handler)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"}