Skip to main content
Glama

future_value

Calculate future value of present amount using interest rate and time periods for financial planning and investment analysis.

Instructions

Calculate future value of present amount

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodsYes
presentValueYes
rateYes

Implementation Reference

  • Tool registration object defining name, description, inputSchema, and handler for the 'future_value' tool within the financialTools array.
    { name: "future_value", description: "Calculate future value of present amount", inputSchema: { type: "object", properties: { presentValue: { type: "number" }, rate: { type: "number" }, periods: { type: "number" } }, required: ["presentValue", "rate", "periods"] }, handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'financial_calculations', function: 'FinancialCalculator.future_value', args: [args.presentValue, args.rate, args.periods] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • The handler function that bridges to the Python implementation for executing the future_value calculation.
    handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'financial_calculations', function: 'FinancialCalculator.future_value', args: [args.presentValue, args.rate, args.periods] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
  • Input schema specifying the required parameters: presentValue, rate, and periods.
    inputSchema: { type: "object", properties: { presentValue: { type: "number" }, rate: { type: "number" }, periods: { type: "number" } }, required: ["presentValue", "rate", "periods"] },
  • The core Python helper function implementing the future value formula: FV = PV * (1 + r)^n.
    def future_value(present_value: float, rate: float, periods: int) -> float: """Calculate future value""" return present_value * ((1 + rate) ** periods)

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