get_stock_news
Retrieve news articles for a specific stock ticker symbol to analyze market sentiment and stay informed about company developments.
Instructions
Get latest news articles for a stock symbol
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol | |
| limit | No | Number of articles to return (default: 10) |
Implementation Reference
- src/tools/financials.ts:114-129 (handler)Implementation of the get_stock_news tool handler in src/tools/financials.ts.
server.registerTool( 'get_stock_news', { description: 'Get latest news articles for a stock symbol', inputSchema: StockNewsSchema, }, async (args: z.infer<typeof StockNewsSchema>) => { try { const limit = args.limit || 10; const data = await fetchFMP(`/news/stock?symbols=${args.symbol.toUpperCase()}&limit=${limit}`); return jsonResponse(data); } catch (error) { return errorResponse(error); } } );