Skip to main content
Glama

expense_summary_report

Generate categorized expense reports from Excel data by date range to analyze spending patterns and support financial decision-making.

Instructions

Generate expense summary report

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateYes
groupByNocategory
startDateYes

Implementation Reference

  • The async handler function for the 'expense_summary_report' tool. It calls the Python ExpenseTracker.get_expense_summary function via pythonBridge with the provided date range and grouping.
    handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'expense_tracking', function: 'ExpenseTracker.get_expense_summary', args: [args.startDate, args.endDate, args.groupBy || 'category'] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
  • Input schema defining required startDate and endDate parameters, with optional groupBy (category, vendor, cost_center, or month).
    inputSchema: { type: "object", properties: { startDate: { type: "string", format: "date" }, endDate: { type: "string", format: "date" }, groupBy: { type: "string", enum: ["category", "vendor", "cost_center", "month"], default: "category" } }, required: ["startDate", "endDate"] },
  • The complete Tool object definition for 'expense_summary_report' within the exported expenseTools array.
    { name: "expense_summary_report", description: "Generate expense summary report", inputSchema: { type: "object", properties: { startDate: { type: "string", format: "date" }, endDate: { type: "string", format: "date" }, groupBy: { type: "string", enum: ["category", "vendor", "cost_center", "month"], default: "category" } }, required: ["startDate", "endDate"] }, handler: async (args: any): Promise<ToolResult> => { try { const result = await pythonBridge.callPythonFunction({ module: 'expense_tracking', function: 'ExpenseTracker.get_expense_summary', args: [args.startDate, args.endDate, args.groupBy || 'category'] }); return result; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • src/index.ts:32-44 (registration)
    Main allTools array registration, spreading expenseTools (line 36) which includes the expense_summary_report tool, used by MCP server handlers for listTools and callTool.
    const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];

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