Skip to main content
Glama

cash_flow_forecast

Forecast future cash flows with scenario analysis to model financial outcomes under different conditions for better decision-making.

Instructions

Forecast future cash flows with scenario analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
monthsAheadNo
scenariosNo

Implementation Reference

  • The handler function that executes the cash_flow_forecast tool by calling the Python module 'cash_flow_tools' function 'forecast_cash_flow' via PythonBridge.
    handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'cash_flow_tools', function: 'forecast_cash_flow', args: [args.monthsAhead || 12, args.scenarios] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • Input schema for validating arguments to the cash_flow_forecast tool: monthsAhead (default 12) and scenarios object with base, conservative, optimistic multipliers.
    inputSchema: { type: "object", properties: { monthsAhead: { type: "number", default: 12 }, scenarios: { type: "object", properties: { base: { type: "number", default: 1.0 }, conservative: { type: "number", default: 0.9 }, optimistic: { type: "number", default: 1.1 } } } } },
  • src/index.ts:32-44 (registration)
    Server-wide registration: cashFlowTools (including cash_flow_forecast) is spread into the allTools array used for ListTools and CallTool handlers.
    const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];
  • Supporting Python function implementing the core forecasting logic, invoked by the TS handler via bridge. Delegates to CashFlowAnalyzer.
    def forecast_cash_flow(months_ahead: int = 12, scenarios: Optional[Dict[str, float]] = None) -> List[Dict]: """Forecast cash flows with scenario analysis""" from cash_flow_analysis import CashFlowAnalyzer analyzer = CashFlowAnalyzer() result = analyzer.forecast_cash_flow(months_ahead, scenarios) return result.to_dict('records') if hasattr(result, 'to_dict') else []

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeremycharlesgillespie/excel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server