vybsly_stocks
Fetch live stock prices for one or more ticker symbols. Automatically saves data to a historical almanac for trend lookups.
Instructions
Live stock prices for one or more ticker symbols. Auto-saves to historical almanac for trend lookups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | Comma-separated tickers, e.g. AAPL,TSLA,NVDA |
Implementation Reference
- index.js:93-103 (registration)Tool registration entry in the TOOLS array, defining the tool name, description, and input schema (required 'symbols' string).
{ name: 'vybsly_stocks', description: 'Live stock prices for one or more ticker symbols. Auto-saves to historical almanac for trend lookups.', inputSchema: { type: 'object', properties: { symbols: { type: 'string', description: 'Comma-separated tickers, e.g. AAPL,TSLA,NVDA' } }, required: ['symbols'] } }, - index.js:96-103 (schema)Input schema for vybsly_stocks: expects an object with a required 'symbols' string (comma-separated tickers).
inputSchema: { type: 'object', properties: { symbols: { type: 'string', description: 'Comma-separated tickers, e.g. AAPL,TSLA,NVDA' } }, required: ['symbols'] } }, - index.js:467-469 (handler)Handler implementation: calls the Vybsly API at /stocks endpoint with the provided symbols parameter.
case 'vybsly_stocks': result = await vybslyCall('/stocks', { symbols: args.symbols }); break; - index.js:21-32 (helper)Generic helper function used by vybsly_stocks to make HTTP GET requests to the Vybsly API with query params, API key authentication, and error handling.
async function vybslyCall(path, params = {}) { const qs = new URLSearchParams(params).toString(); const url = `${VYBSLY_BASE}${path}${qs ? '?' + qs : ''}`; const headers = { 'Accept': 'application/json' }; if (API_KEY) headers['X-API-Key'] = API_KEY; const res = await fetch(url, { headers }); if (!res.ok) { const text = await res.text(); throw new Error(`Vybsly API ${res.status}: ${text.slice(0, 300)}`); } return res.json(); } - index.js:292-301 (handler)The 'market-snapshot' prompt template that uses vybsly_stocks as part of its orchestration steps.
case 'market-snapshot': return { description: `Market snapshot: ${args.symbols}`, messages: [{ role: 'user', content: { type: 'text', text: `Build a market snapshot for: ${args.symbols}\n\nSteps:\n1. vybsly_stocks symbols="${args.symbols}".\n2. For each ticker, vybsly_news query="<ticker> stock", hours=24, limit=3.\n\nProduce, for each ticker:\n- **TICKER**: $price (▲/▼ X.XX%)\n- One-line headline summary of today's top story.\n- 2-3 bullets of key drivers.\n\nEnd with a ~2 sentence "What to watch" section covering the portfolio as a whole.` } }]