mcp_tools.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. """MCP tool definitions."""
  2. MCP_TOOLS = [
  3. {
  4. "name": "get_price",
  5. "description": "Return the latest USD spot price for a symbol (e.g., BTC, ETH). Uses Binance primary with CoinGecko fallback; response includes symbol, price, timestamp.",
  6. "inputSchema": {"type": "object", "properties": {"symbol": {"type": "string"}}, "required": ["symbol"]},
  7. },
  8. {
  9. "name": "get_ohlcv",
  10. "description": "Fetch OHLCV candles for a symbol/timeframe (1m, 5m, 15m, 1h, 4h, 1d). Limit 1-500 candles; returned order is oldest→newest with [ts, open, high, low, close, volume] arrays.",
  11. "inputSchema": {"type": "object", "properties": {"symbol": {"type": "string"}, "timeframe": {"type": "string", "default": "1h"}, "limit": {"type": "integer", "default": 100}}, "required": ["symbol"]},
  12. },
  13. {
  14. "name": "get_indicator",
  15. "description": "Compute a technical indicator for a symbol/timeframe. Supported names: rsi, ema, sma, macd, atr, bollinger, vwap. Provide params like period, fast/slow/signal periods (MACD) or multiplier (Bollinger).",
  16. "inputSchema": {
  17. "type": "object",
  18. "properties": {
  19. "symbol": {"type": "string"},
  20. "indicator": {"type": "string"},
  21. "timeframe": {"type": "string", "default": "1h"},
  22. "params": {"type": "object", "default": {}},
  23. },
  24. "required": ["symbol", "indicator"],
  25. },
  26. },
  27. {
  28. "name": "get_market_snapshot",
  29. "description": "Lightweight 1h snapshot with price, RSI14, EMA20/50/200, MACD histogram, ATR (absolute & %), Bollinger(20,2) bands, VWAP(48), and a derived trend_bias flag.",
  30. "inputSchema": {"type": "object", "properties": {"symbol": {"type": "string"}}, "required": ["symbol"]},
  31. },
  32. {
  33. "name": "get_top_movers",
  34. "description": "List top 24h gainers/losers (limit 1-50). Each entry includes symbol and % change for quick leaderboards.",
  35. "inputSchema": {"type": "object", "properties": {"limit": {"type": "integer", "default": 10}}, "required": []},
  36. },
  37. {
  38. "name": "get_capabilities",
  39. "description": "Describe the server surface: indicator catalog (with params/defaults) plus allowed OHLCV/indicator/regime timeframes.",
  40. "inputSchema": {"type": "object", "properties": {}, "required": []},
  41. },
  42. {
  43. "name": "get_regime",
  44. "description": "Return a composite regime snapshot for a symbol/timeframe with trend (EMA20/50 + SMA200), momentum (RSI, MACD hist), volatility (ATR + %), Bollinger bands, VWAP, and bull/bear/range states.",
  45. "inputSchema": {
  46. "type": "object",
  47. "properties": {
  48. "symbol": {"type": "string"},
  49. "timeframe": {"type": "string", "default": "1h"},
  50. },
  51. "required": ["symbol"],
  52. },
  53. },
  54. ]