get_sentiment
Analyze prediction market sentiment with AI-powered scoring, recommendations, and confidence levels to inform trading decisions and augment prediction models.
Instructions
Get AI-powered sentiment analysis, recommendation, and confidence score for any prediction market.
Returns sentiment score (-1 to 1), actionable recommendation (bullish/bearish/neutral), and AI confidence level. Goes beyond raw probability — analyzes market psychology, crowd wisdom, and directional bias. Use for trade signals, contrarian analysis, or augmenting your own prediction models with market sentiment data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | Yes | The market UUID or external_id (ticker) |
Implementation Reference
- worker/src/tools.ts:495-515 (handler)The handler function that implements the logic for get_sentiment, querying the database for sentiment data associated with a market_id.
async function getSentiment( supabase: SupabaseClient, args: { market_id: string }, ): Promise<ToolResult> { const market = await findMarket(supabase, args.market_id); if (!market) return err("Market not found"); // Check stored sentiment const { data: sentiment } = await supabase .from("telekash_market_sentiment") .select("*") .eq("market_id", market.id) .order("created_at", { ascending: false }) .limit(1) .single(); if (sentiment) { return json({ market_id: market.id, title: market.title, sentiment: { - worker/src/tools.ts:177-178 (registration)Registration/dispatch logic for the get_sentiment tool within the tool execution switch-case.
case "get_sentiment": return getSentiment(supabase, args as { market_id: string }); - worker/src/schema.ts:214-225 (schema)Schema definition for the get_sentiment tool, providing description and input validation requirements.
{ name: "get_sentiment", description: `Get AI-powered sentiment analysis (-1 to 1), recommendation, and confidence for a market.`, inputSchema: { type: "object", properties: { market_id: { type: "string", description: "Market UUID or external_id", }, }, required: ["market_id"],