get_quote
Retrieve real-time stock price data for any ticker symbol to monitor current market values and support investment decisions.
Instructions
Get real-time stock quote for a symbol (e.g., AAPL, TSLA, MSFT)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol (e.g., AAPL) |
Implementation Reference
- src/tools/market.ts:26-41 (registration)The 'get_quote' tool is registered within registerMarketTools, defining its schema, description, and handler function.
// Get Quote server.registerTool( 'get_quote', { description: 'Get real-time stock quote for a symbol (e.g., AAPL, TSLA, MSFT)', inputSchema: QuoteSchema, }, async (args: z.infer<typeof QuoteSchema>) => { try { const data = await fetchFMP<StockQuote[]>(`/quote?symbol=${args.symbol.toUpperCase()}`); return jsonResponse(data); } catch (error) { return errorResponse(error); } } ); - src/tools/market.ts:33-40 (handler)The handler function that executes the 'get_quote' tool logic by fetching data from FMP API.
async (args: z.infer<typeof QuoteSchema>) => { try { const data = await fetchFMP<StockQuote[]>(`/quote?symbol=${args.symbol.toUpperCase()}`); return jsonResponse(data); } catch (error) { return errorResponse(error); } } - src/tools/market.ts:10-12 (schema)The input schema validation for the 'get_quote' tool.
const QuoteSchema = z.object({ symbol: z.string().describe('Stock ticker symbol (e.g., AAPL)'), });