Skip to main content
Glama

create_rental_property_analysis

Generate Excel templates for rental property investment analysis, calculating cash flow, expenses, and cap rates to evaluate property profitability.

Instructions

Create rental property analysis Excel template

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYes
propertyDataYes

Implementation Reference

  • The handler function in the ReportTemplates class that creates a pandas DataFrame representing an Excel-compatible rental property analysis template, populating it with provided property data and including calculated fields with Excel formulas.
    @staticmethod def create_rental_property_analysis(property_data: Dict) -> pd.DataFrame: """Create rental property analysis template""" template_data = [ ['RENTAL PROPERTY ANALYSIS', '', '', ''], ['Property:', property_data.get('name', 'N/A'), '', ''], ['Address:', property_data.get('address', 'N/A'), '', ''], ['', '', '', ''], ['INCOME ANALYSIS', '', '', ''], ['Gross Rental Income', '', '', property_data.get('gross_rental_income', 0)], ['Vacancy Loss', '', '', property_data.get('vacancy_loss', 0)], ['Effective Rental Income', '', '', property_data.get('effective_rental_income', 0)], ['Other Income', '', '', property_data.get('other_income', 0)], ['Total Income', '', '', '=C6+C7+C8'], ['', '', '', ''], ['OPERATING EXPENSES', '', '', ''], ['Property Management', '', '', property_data.get('property_management', 0)], ['Maintenance & Repairs', '', '', property_data.get('maintenance', 0)], ['Insurance', '', '', property_data.get('insurance', 0)], ['Property Taxes', '', '', property_data.get('property_taxes', 0)], ['Utilities', '', '', property_data.get('utilities', 0)], ['Total Operating Expenses', '', '', '=SUM(D13:D17)'], ['', '', '', ''], ['NET OPERATING INCOME', '', '', '=D10-D18'], ['', '', '', ''], ['FINANCIAL ANALYSIS', '', '', ''], ['NOI Margin %', '', '', '=D20/D10*100'], ['Operating Expense Ratio %', '', '', '=D18/D10*100'], ['Cap Rate % (if known)', '', '', property_data.get('cap_rate', 0)], ] return pd.DataFrame(template_data, columns=['Item', 'Description', 'Notes', 'Amount'])
  • Registers the 'create_rental_property_analysis' tool in the reportingTools array, including input schema validation, description, and a handler that invokes the Python implementation via PythonBridge and optionally saves the result to an Excel file.
    { name: "create_rental_property_analysis", description: "Create rental property analysis Excel template", inputSchema: { type: "object", properties: { propertyData: { type: "object", properties: { name: { type: "string" }, address: { type: "string" }, grossRentalIncome: { type: "number" }, vacancyLoss: { type: "number" }, effectiveRentalIncome: { type: "number" }, otherIncome: { type: "number" }, propertyManagement: { type: "number" }, maintenance: { type: "number" }, insurance: { type: "number" }, propertyTaxes: { type: "number" }, utilities: { type: "number" }, capRate: { type: "number" } } }, filePath: { type: "string" } }, required: ["propertyData", "filePath"] }, handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'financial_reporting', function: 'ReportTemplates.create_rental_property_analysis', args: [args.propertyData] }); if (result.success && args.filePath) { const templateData = result.data; const worksheetData: WorksheetData = { name: 'Property Analysis', data: templateData }; await excelManager.createWorkbook([worksheetData]); await excelManager.saveWorkbook(args.filePath); } return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • Defines the input schema for the tool, specifying the structure of propertyData object with financial fields and required filePath for Excel output.
    inputSchema: { type: "object", properties: { propertyData: { type: "object", properties: { name: { type: "string" }, address: { type: "string" }, grossRentalIncome: { type: "number" }, vacancyLoss: { type: "number" }, effectiveRentalIncome: { type: "number" }, otherIncome: { type: "number" }, propertyManagement: { type: "number" }, maintenance: { type: "number" }, insurance: { type: "number" }, propertyTaxes: { type: "number" }, utilities: { type: "number" }, capRate: { type: "number" } } }, filePath: { type: "string" } }, required: ["propertyData", "filePath"] },

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