get_cash_flow
Retrieve cash flow statements for companies to analyze financial health and liquidity. Specify stock symbol and period (annual/quarterly) to access operating, investing, and financing activities data.
Instructions
Get company cash flow statement (annual or quarterly)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol | |
| period | No | Period type (annual or quarter) | |
| limit | No | Number of periods to return (default: 5) |
Implementation Reference
- src/tools/financials.ts:92-111 (handler)The tool 'get_cash_flow' is registered and implemented within 'registerFinancialsTools' in 'src/tools/financials.ts'. The handler directly calls the FMP API to retrieve cash flow statements.
// Cash Flow server.registerTool( 'get_cash_flow', { description: 'Get company cash flow statement (annual or quarterly)', inputSchema: FinancialStatementSchema, }, async (args: z.infer<typeof FinancialStatementSchema>) => { try { const period = args.period || 'annual'; const limit = args.limit || 5; const data = await fetchFMP<CashFlow[]>( `/cash-flow-statement?symbol=${args.symbol.toUpperCase()}&period=${period}&limit=${limit}` ); return jsonResponse(data); } catch (error) { return errorResponse(error); } } );