Skip to main content
Glama

remove_from_watchlist

Remove a stock symbol from your watchlist to manage tracked investments and maintain an organized portfolio view.

Instructions

Removes a symbol from the watchlist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes

Implementation Reference

  • Core handler function that removes the specified symbol (uppercased) from the watchlist.json file if present, and returns a confirmation message.
    def remove_from_watchlist(symbol: str) -> str: """ Removes a symbol from the watchlist. """ symbol = symbol.upper() watchlist = _load_watchlist() if symbol in watchlist: watchlist.remove(symbol) _save_watchlist(watchlist) logger.info(f"Removed {symbol} from watchlist") return f"Removed {symbol} from watchlist." return f"{symbol} was not in the watchlist."
  • server.py:410-412 (registration)
    Registers the remove_from_watchlist function as an MCP tool in the 'Watchlist' category alongside add_to_watchlist.
    register_tools( [add_to_watchlist, remove_from_watchlist], "Watchlist"
  • Helper function to persist the watchlist to JSON file, used by remove_from_watchlist after modification.
    def _save_watchlist(watchlist: List[str]): with open(WATCHLIST_FILE, "w") as f: json.dump(watchlist, f, indent=4)
  • Helper function to load the watchlist from JSON file, used by remove_from_watchlist to get current list.
    def _load_watchlist() -> List[str]: if not WATCHLIST_FILE.exists(): return [] try: with open(WATCHLIST_FILE, "r") as f: return json.load(f) except Exception: return []

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/N-lia/MonteWalk'

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