add_to_watchlist
Add a financial symbol to your monitoring watchlist for tracking market data and analysis within the MonteWalk quantitative finance platform.
Instructions
Adds a symbol to the monitoring watchlist.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Implementation Reference
- tools/watchlist.py:25-36 (handler)The core handler function for the 'add_to_watchlist' tool. It uppercases the symbol, loads the current watchlist from JSON, adds it if missing, saves back, and returns a confirmation message.def add_to_watchlist(symbol: str) -> str: """ Adds a symbol to the monitoring watchlist. """ symbol = symbol.upper() watchlist = _load_watchlist() if symbol not in watchlist: watchlist.append(symbol) _save_watchlist(watchlist) logger.info(f"Added {symbol} to watchlist") return f"Added {symbol} to watchlist." return f"{symbol} is already in the watchlist."
- server.py:410-413 (registration)MCP tool registration block where add_to_watchlist is passed to register_tools, which applies @mcp.tool() decorator to make it available via Model Context Protocol.register_tools( [add_to_watchlist, remove_from_watchlist], "Watchlist" )