twitterSearchHelp
Search Twitter for Ethereum-related discussions to find community insights, technical support, and project updates for blockchain analysis.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "twitterSearchHelp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | No | general |
Implementation Reference
- tools/twitter.js:135-182 (handler)The handler function for the 'twitterSearchHelp' tool. It takes an optional 'topic' parameter and returns formatted Markdown text explaining Twitter search syntax for general, user-related, or date-related queries.
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 schema defining the input parameters for the tool: an optional 'topic' string defaulting to 'general'.
{ topic: z.string().optional().default("general") }, - tools/twitter.js:130-183 (registration)The complete registration of the 'twitterSearchHelp' tool using server.tool(), including schema and inline handler function.
// Add a Twitter syntax help tool 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 }] }; } ); - main.js:65-65 (registration)Top-level registration call to registerTwitterTools(server), which internally registers the 'twitterSearchHelp' tool among others.
registerTwitterTools(server);