get_stock_list
Retrieve a formatted table of crypto-related stock tickers and names, enabling AI agents to analyze blockchain investment opportunities effectively.
Instructions
Return a list of available crypto-related stocks in a table format.
Returns:
str: An ASCII table string containing the ticker and name of crypto-related stocks.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:31-47 (handler)The main handler function for the 'get_stock_list' tool. It uses the CRYPTO_STOCKS dictionary to generate a tabulated list of stock tickers and names. Decorated with @mcp.tool() for registration.@mcp.tool() def get_stock_list() -> str: """Return a list of available crypto-related stocks in a table format. Returns: str: An ASCII table string containing the ticker and name of crypto-related stocks. """ table_data = [ [ticker, name] for ticker, name in CRYPTO_STOCKS.items() ] return tabulate( table_data, headers=["Ticker", "Name"], tablefmt="grid", stralign="left" )
- main.py:10-27 (helper)Dictionary of crypto-related stocks used by the get_stock_list tool to provide the list of available tickers.CRYPTO_STOCKS = { "BMNR": "BitMine Immersion Technologies, Inc.", "CRCL": "Circle Internet Group Inc.", "SBET": "SharpLink Gaming Inc.", "SRM": "Tron Inc.", "DFDV": "DeFi Development Corp.", "MSTR": "MicroStrategy Incorporated", "COIN": "Coinbase Global Inc.", "MARA": "Marathon Digital Holdings", "RIOT": "Riot Platforms Inc.", "HIVE": "HIVE Digital Technologies", "CORZ": "Core Scientific Inc.", "IREN": "Iris Energy Limited", "CLSK": "CleanSpark Inc.", "HUT": "Hut 8 Corp", "CIFR": "Cipher Mining Inc.", "BITF": "Bitfarms Ltd" }
- main.py:32-37 (schema)Type signature and docstring defining the tool's schema: no inputs, returns a formatted string table.def get_stock_list() -> str: """Return a list of available crypto-related stocks in a table format. Returns: str: An ASCII table string containing the ticker and name of crypto-related stocks. """