get_social_sentiment_endpoints
Retrieve endpoints for social media analytics, sentiment analysis, influencer tracking, and trend detection across crypto, stocks, and NFTs. Analyze engagement metrics, track virality, and monitor real-time social sentiment with comprehensive indicators.
Instructions
Get all endpoints in the "Social Media & Sentiment Analytics" category. Endpoints for social media analytics, sentiment analysis, influencer tracking, social engagement metrics, trending topics analysis, news aggregation, creator analytics, post engagement tracking, social dominance metrics, Galaxy Score™, AltRank™, and comprehensive social sentiment indicators across crypto assets, stocks, and NFTs. Includes real-time social monitoring, influencer identification, content virality analysis, and social trend detection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/dynamic-tools.ts:165-179 (handler)The core handler logic for the 'get_social_sentiment_endpoints' tool (and other category tools). It fetches the list of tools in the 'Social Media & Sentiment Analytics' category using getAllToolsInCategory and formats them into a response using asTextContentResult.handler: async ( args: Record<string, unknown> | undefined, ): Promise<any> => { const toolsInCategory = getAllToolsInCategory(category.category); return asTextContentResult({ category: category.category, description: category.description, tools: toolsInCategory.map((tool ) => ({ name: tool.name, description: tool.description })), }); }, };
- src/dynamic-tools.ts:148-182 (registration)Registration code that dynamically creates the 'get_social_sentiment_endpoints' tool object from the ToolRegistry, including name, description, schema, and handler.// Create category-specific endpoints that act as list functionality const categoryTools = ToolRegistry.map(category => { const categorySchema = z.object({}); const categoryEndpointName = category.name; return { metadata: { resource: 'dynamic_tools', operation: 'read' as const, tags: ['category'], }, tool: { name: categoryEndpointName, description: `Get all endpoints in the "${category.category}" category. ${category.description}`, inputSchema: zodToInputSchema(categorySchema), }, handler: async ( args: Record<string, unknown> | undefined, ): Promise<any> => { const toolsInCategory = getAllToolsInCategory(category.category); return asTextContentResult({ category: category.category, description: category.description, tools: toolsInCategory.map((tool ) => ({ name: tool.name, description: tool.description })), }); }, }; }); return [getEndpointTool, callEndpointTool, ...categoryTools];
- src/toolRegistry.ts:270-293 (registration)ToolRegistry entry that defines the category name 'get_social_sentiment_endpoints', its description, and the list of underlying tools it exposes.{ "category": "Social Media & Sentiment Analytics", "name": "get_social_sentiment_endpoints", "description": "Endpoints for social media analytics, sentiment analysis, influencer tracking, social engagement metrics, trending topics analysis, news aggregation, creator analytics, post engagement tracking, social dominance metrics, Galaxy Score™, AltRank™, and comprehensive social sentiment indicators across crypto assets, stocks, and NFTs. Includes real-time social monitoring, influencer identification, content virality analysis, and social trend detection.", "tools": [ "discover_topic_influencers", "fetch_topic_news_articles", "analyze_topic_social_posts", "retrieve_topic_metrics", "list_trending_topics", "analyze_category_overview", "discover_category_topics", "fetch_category_social_content", "retrieve_category_news_feed", "list_category_influencers", "browse_trending_categories", "rank_social_influencers", "fetch_creator_profile", "track_creator_performance", "analyze_creator_content", "retrieve_post_analytics", "monitor_post_engagement" ] }
- src/toolRegistry.ts:298-314 (helper)Helper function called by the handler to resolve the list of supported tools matching the names in the category's 'tools' array from supportedTools.export function getAllToolsInCategory(category: string){ let categoryUsed = ToolRegistry.find(tool => tool.category === category); if(!categoryUsed){ return [] } const allWrappedTools = supportedTools // return all the tools from wrapped tools that are in the category (name match) let toolsInCategory = []; for (const tool of categoryUsed.tools){ const wrappedTool = allWrappedTools.find(wrappedTool => wrappedTool.name === tool); if(wrappedTool){ toolsInCategory.push(wrappedTool); } else console.log(`Tool ${tool} not found in wrapped tools`); } return toolsInCategory; }
- src/dynamic-tools.ts:6-82 (helper)Helper function used by the handler to format the result as MCP-compatible text content, with truncation for large responses.export function asTextContentResult(result: Object): any { // return {data: result} // Estimate token count (roughly 4 chars per token) const MAX_TOKENS = 25000; const CHARS_PER_TOKEN = 4; const maxChar = MAX_TOKENS * CHARS_PER_TOKEN; // ~100,000 chars for 25k tokens const jsonString = JSON.stringify(result, null, 2); if (jsonString.length > maxChar) { // Try to intelligently truncate if it's an array if (Array.isArray(result)) { const truncatedArray = result.slice(0, Math.floor(result.length * maxChar / jsonString.length)); const truncatedJson = JSON.stringify({ results: truncatedArray, truncated: true, originalLength: result.length, returnedLength: truncatedArray.length, message: "Response truncated due to size limits. Consider using pagination." }, null, 2); return { content: [ { type: 'text', text: truncatedJson, }, ], }; } // For objects with results array if (typeof result === 'object' && result !== null && 'results' in result && Array.isArray((result as any).results)) { const originalResults = (result as any).results; const estimatedItemSize = jsonString.length / originalResults.length; const maxItems = Math.floor(maxChar / estimatedItemSize); const truncatedResult = { ...result, results: originalResults.slice(0, maxItems), truncated: true, originalCount: originalResults.length, returnedCount: maxItems, message: "Response truncated due to size limits. Use pagination parameters (limit/offset) for more results." }; return { content: [ { type: 'text', text: JSON.stringify(truncatedResult, null, 2), }, ], }; } // Fallback to simple truncation const truncated = jsonString.substring(0, maxChar) + '\n... [TRUNCATED DUE TO SIZE LIMITS]'; return { content: [ { type: 'text', text: truncated, }, ], }; } return { content: [ { type: 'text', text: jsonString, }, ], }; }