Skip to main content
Glama

excel_save_file

Save Excel workbooks containing financial calculations, investment analysis, and automated reports to specified file paths for secure storage and sharing.

Instructions

Save the current workbook to a file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathNo

Implementation Reference

  • The handler implementation for the 'excel_save_file' tool. It takes a filePath argument and calls ExcelManager.saveWorkbook to save the current workbook, returning success or error status.
    { name: "excel_save_file", description: "Save the current workbook to a file", inputSchema: { type: "object", properties: { filePath: { type: "string" } } }, handler: async (args: any): Promise<ToolResult> => { try { await excelManager.saveWorkbook(args.filePath); return { success: true, message: `Saved workbook to ${args.filePath || 'current file'}` }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
  • The input schema for 'excel_save_file' tool requiring a filePath string.
    inputSchema: { type: "object", properties: { filePath: { type: "string" } } },
  • src/index.ts:32-44 (registration)
    Registration of all tools including excelTools (which contains excel_save_file) into the allTools array used by the MCP server for listing and calling tools.
    const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];
  • The ExcelManager.saveWorkbook helper method that performs the actual file saving using ExcelJS, ensuring formulas calculate on load.
    async saveWorkbook(filePath?: string): Promise<void> { if (!this.workbook) { throw new Error('No workbook is currently open'); } const savePath = filePath || this.currentFile; if (!savePath) { throw new Error('No file path specified'); } // Ensure formulas are calculated when the file is opened this.workbook.calcProperties = { fullCalcOnLoad: true }; await this.workbook.xlsx.writeFile(savePath); if (!this.currentFile || this.currentFile !== savePath) { this.currentFile = savePath; } }
  • Instantiation of the ExcelManager instance used by all excel tools including excel_save_file.
    const excelManager = new ExcelManager();

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