get_price_target
Retrieve analyst price target summaries for stocks to evaluate investment potential and market sentiment.
Instructions
Get analyst price target summary for a stock
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol |
Implementation Reference
- src/tools/analysis.ts:66-73 (handler)The handler function for 'get_price_target' tool that fetches price target summary data from the FMP API.
async (args: z.infer<typeof SymbolOnlySchema>) => { try { const data = await fetchFMP<PriceTarget[]>(`/price-target-summary?symbol=${args.symbol.toUpperCase()}`); return jsonResponse(data); } catch (error) { return errorResponse(error); } } - src/tools/analysis.ts:60-74 (registration)The registration of 'get_price_target' tool.
server.registerTool( 'get_price_target', { description: 'Get analyst price target summary for a stock', inputSchema: SymbolOnlySchema, }, async (args: z.infer<typeof SymbolOnlySchema>) => { try { const data = await fetchFMP<PriceTarget[]>(`/price-target-summary?symbol=${args.symbol.toUpperCase()}`); return jsonResponse(data); } catch (error) { return errorResponse(error); } } ); - src/tools/analysis.ts:20-22 (schema)The Zod schema definition for the 'get_price_target' tool inputs.
const SymbolOnlySchema = z.object({ symbol: SymbolSchema.describe('Stock ticker symbol'), });