Skip to main content
Glama

Schwab Model Context Protocol Server

by jkoelker
quotes.py1.46 kB
# from typing import Annotated import schwab.client from schwab_mcp.tools.registry import register from schwab_mcp.tools.utils import call @register async def get_quotes( client: schwab.client.AsyncClient, symbols: Annotated[ list[str] | str, "List of symbols to get quotes for (comma-separated if string)" ], fields: Annotated[ list[str] | str | None, "Data fields to include (QUOTE, FUNDAMENTAL, EXTENDED, REFERENCE, REGULAR)", ] = None, indicative: Annotated[ bool | None, "Include indicative quotes for extended hours or futures" ] = None, ) -> str: """ Returns current market quotes for specified symbols. Retrieves real-time or delayed quote data for stocks, ETFs, indices, and options. Symbols can be provided as a list or comma-separated string. Fields options: QUOTE - Basic price data (bid, ask, last) FUNDAMENTAL - Company fundamentals (PE ratio, dividend) EXTENDED - Extended quote data REFERENCE - Reference data REGULAR - Regular session quotes Set indicative=True for extended hours or futures quotes. """ if isinstance(symbols, str): symbols = [s.strip() for s in symbols.split(",")] return await call( client.get_quotes, symbols, fields=[client.Quote.Fields[f] for f in fields] if fields else None, indicative=indicative if indicative is not None else None, )

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/jkoelker/schwab-mcp'

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