twitterSearchHelp
Extract and analyze Twitter data related to Ethereum blockchain topics for insights into trends, discussions, and community sentiment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | general |
Implementation Reference
- tools/twitter.js:135-182 (handler)The handler function for the 'twitterSearchHelp' tool. It returns predefined Twitter search syntax guides based on the 'topic' parameter (general, user, date), formatted as markdown text in an MCP content response.async ({ topic }) => { // Simplified guide content from our resource const helpContent = { general: `# Twitter Search Syntax Guide Basic operators: - Simple keyword: \`ethereum\` - Finds tweets containing this word - Exact phrase: \`"ethereum scaling"\` - Finds the exact phrase - OR operator: \`ethereum OR solana\` - Finds tweets with either term - Exclusion: \`ethereum -solana\` - Finds tweets with ethereum but not solana Account filters: - From user: \`(from:username)\` - Tweets sent by a specific account - To user: \`(to:username)\` - Replies to a specific account - Mentioning: \`(@username)\` - Tweets that mention this account Other filters: - Date range: \`since:2024-01-01 until:2024-01-31\` - Media: \`has:links\`, \`has:images\`, \`has:videos\` - Engagement: \`min_faves:100\`, \`min_retweets:50\`, \`min_replies:10\``, user: `# User-Related Twitter Search Syntax - From specific user: \`(from:username)\` - Tweets sent by a specific account - To specific user: \`(to:username)\` - Replies to a specific account - Mentioning user: \`(@username)\` - Tweets that mention this account Examples: - \`(from:vitalikbuterin) ethereum\` - Tweets from Vitalik about Ethereum - \`(to:ethereum) help\` - Help requests sent to the Ethereum account`, date: `# Date-Related Twitter Search Syntax - Since date: \`since:YYYY-MM-DD\` - Tweets after this date - Until date: \`until:YYYY-MM-DD\` - Tweets before this date Example: - \`ethereum since:2024-01-01 until:2024-01-31\` - Ethereum tweets from January 2024` }; // Return the requested help topic or general help return { content: [{ type: "text", text: helpContent[topic] || helpContent.general }] }; }
- tools/twitter.js:132-134 (schema)Zod input schema for the 'twitterSearchHelp' tool, defining an optional 'topic' parameter defaulting to 'general'.{ topic: z.string().optional().default("general") },
- tools/twitter.js:131-183 (registration)Registration of the 'twitterSearchHelp' tool using server.tool(), including schema and handler, within the registerTwitterTools function.server.tool("twitterSearchHelp", { topic: z.string().optional().default("general") }, async ({ topic }) => { // Simplified guide content from our resource const helpContent = { general: `# Twitter Search Syntax Guide Basic operators: - Simple keyword: \`ethereum\` - Finds tweets containing this word - Exact phrase: \`"ethereum scaling"\` - Finds the exact phrase - OR operator: \`ethereum OR solana\` - Finds tweets with either term - Exclusion: \`ethereum -solana\` - Finds tweets with ethereum but not solana Account filters: - From user: \`(from:username)\` - Tweets sent by a specific account - To user: \`(to:username)\` - Replies to a specific account - Mentioning: \`(@username)\` - Tweets that mention this account Other filters: - Date range: \`since:2024-01-01 until:2024-01-31\` - Media: \`has:links\`, \`has:images\`, \`has:videos\` - Engagement: \`min_faves:100\`, \`min_retweets:50\`, \`min_replies:10\``, user: `# User-Related Twitter Search Syntax - From specific user: \`(from:username)\` - Tweets sent by a specific account - To specific user: \`(to:username)\` - Replies to a specific account - Mentioning user: \`(@username)\` - Tweets that mention this account Examples: - \`(from:vitalikbuterin) ethereum\` - Tweets from Vitalik about Ethereum - \`(to:ethereum) help\` - Help requests sent to the Ethereum account`, date: `# Date-Related Twitter Search Syntax - Since date: \`since:YYYY-MM-DD\` - Tweets after this date - Until date: \`until:YYYY-MM-DD\` - Tweets before this date Example: - \`ethereum since:2024-01-01 until:2024-01-31\` - Ethereum tweets from January 2024` }; // Return the requested help topic or general help return { content: [{ type: "text", text: helpContent[topic] || helpContent.general }] }; } );