Skip to main content
Glama

business_tax_summary

Generate business tax summaries from financial data to calculate tax obligations and prepare for filing requirements.

Instructions

Generate comprehensive business tax summary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityIdYes
financialDataYes
taxYearYes

Implementation Reference

  • The core handler function implementing business_tax_summary. Computes comprehensive tax summary including depreciation, net income, and entity-type specific taxes (Sole Prop, C-Corp, S-Corp). Called by the TypeScript bridge.
    def business_tax_summary(self, entity_id: str, tax_year: int, financial_data: Dict) -> Dict: """Generate comprehensive business tax summary""" entity = self.entities.get(entity_id) if not entity: return {'error': 'Entity not found'} revenue = financial_data.get('revenue', 0) expenses = financial_data.get('expenses', 0) # Calculate depreciation total_depreciation = 0 asset_depreciation = [] for asset_id, asset in self.assets.items(): if asset.placed_in_service_date.year <= tax_year: dep_info = self.calculate_depreciation_deduction(asset_id, tax_year) if 'annual_deduction' in dep_info: total_depreciation += dep_info['annual_deduction'] asset_depreciation.append(dep_info) # Net income calculation net_income = revenue - expenses - total_depreciation # Tax calculations based on entity type tax_calculation = {} if entity.entity_type == TaxEntityType.SOLE_PROPRIETORSHIP: # Schedule C income se_tax_info = self.calculate_self_employment_tax(net_income) adjusted_income = net_income - se_tax_info['deductible_portion'] income_tax_info = self.calculate_federal_income_tax(adjusted_income) tax_calculation = { 'schedule_c_income': round(net_income, 2), 'se_tax': se_tax_info, 'income_tax': income_tax_info, 'total_federal_tax': round(se_tax_info['total_se_tax'] + income_tax_info['total_tax'], 2) } elif entity.entity_type == TaxEntityType.C_CORP: # Corporate tax rate (21% flat rate for 2024) corporate_tax = net_income * 0.21 tax_calculation = { 'taxable_income': round(net_income, 2), 'corporate_tax_rate': '21%', 'corporate_tax': round(corporate_tax, 2), 'after_tax_income': round(net_income - corporate_tax, 2) } elif entity.entity_type == TaxEntityType.S_CORP: # Pass-through entity tax_calculation = { 'pass_through_income': round(net_income, 2), 'note': 'Income passes through to owners - no entity-level tax' } return { 'entity': entity.name, 'entity_type': entity.entity_type.value, 'tax_year': tax_year, 'financial_summary': { 'revenue': revenue, 'expenses': expenses, 'depreciation': round(total_depreciation, 2), 'net_income': round(net_income, 2) }, 'depreciation_detail': asset_depreciation, 'tax_calculation': tax_calculation }
  • Registers the business_tax_summary tool in the MCP tools array, including description, input schema validation, and handler that invokes the Python implementation via pythonBridge.
    { name: "business_tax_summary", description: "Generate comprehensive business tax summary", inputSchema: { type: "object", properties: { entityId: { type: "string" }, taxYear: { type: "number" }, financialData: { type: "object", properties: { revenue: { type: "number" }, expenses: { type: "number" } }, required: ["revenue", "expenses"] } }, required: ["entityId", "taxYear", "financialData"] }, handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'tax_calculations', function: 'TaxCalculator.business_tax_summary', args: [args.entityId, args.taxYear, args.financialData] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • Input schema defining parameters for business_tax_summary: entityId (string), taxYear (number), financialData object with required revenue and expenses (numbers). Ensures validation before calling Python.
    inputSchema: { type: "object", properties: { entityId: { type: "string" }, taxYear: { type: "number" }, financialData: { type: "object", properties: { revenue: { type: "number" }, expenses: { type: "number" } }, required: ["revenue", "expenses"] } }, required: ["entityId", "taxYear", "financialData"]

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