Skip to main content
Glama
jjsteffen23

CME Prediction Markets MCP Server

by jjsteffen23
blocks.py2.32 kB
from typing import Dict, Any, List def format_verification_blocks(verification_result: Dict[str, Any]) -> List[Dict[str, Any]]: """Format verification result as Slack blocks.""" verdict = verification_result.get('verdict', 'UNKNOWN') confidence = verification_result.get('confidence', 0) summary = verification_result.get('summary', 'No summary available') # Color based on verdict color_map = { 'TRUE': '#36a64f', # Green 'FALSE': '#ff0000', # Red 'PARTIALLY_TRUE': '#ff9900', # Orange 'INCONCLUSIVE': '#808080' # Gray } color = color_map.get(verdict, '#808080') # Emoji based on verdict emoji_map = { 'TRUE': '✅', 'FALSE': '❌', 'PARTIALLY_TRUE': '⚠️', 'INCONCLUSIVE': '❓' } emoji = emoji_map.get(verdict, '❓') blocks = [ { "type": "header", "text": { "type": "plain_text", "text": f"{emoji} Verification Result: {verdict}" } }, { "type": "section", "fields": [ { "type": "mrkdwn", "text": f"*Confidence:*\n{confidence:.1f}%" }, { "type": "mrkdwn", "text": f"*Verdict:*\n{verdict}" } ] }, { "type": "section", "text": { "type": "mrkdwn", "text": f"*Summary:*\n{summary}" } } ] # Add evidence if available evidence = verification_result.get('evidence', []) if evidence: evidence_text = "\n".join([ f"• {e.get('message', 'No details')}" for e in evidence[:5] # Limit to 5 items ]) blocks.append({ "type": "section", "text": { "type": "mrkdwn", "text": f"*Evidence:*\n{evidence_text}" } }) # Add context blocks.append({ "type": "context", "elements": [ { "type": "mrkdwn", "text": f"Verification ID: `{verification_result.get('verification_id', 'N/A')}`" } ] }) return blocks

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjsteffen23/dk_mcp_2'

If you have feedback or need assistance with the MCP directory API, please join our Discord server