Skip to main content
Glama

excel_close_workbook

Close the current Excel workbook to save memory and prepare for opening or creating new financial spreadsheets.

Instructions

Close the current workbook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full tool definition for 'excel_close_workbook', including schema (empty input), handler that calls ExcelManager.closeWorkbook(), and error handling. This is the primary MCP tool implementation.
    { name: "excel_close_workbook", description: "Close the current workbook", inputSchema: { type: "object", properties: {} }, handler: async (): Promise<ToolResult> => { try { excelManager.closeWorkbook(); return { success: true, message: "Workbook closed" }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • ExcelManager.closeWorkbook() method implementation that resets the workbook instance and current file path, effectively closing the workbook session.
    closeWorkbook(): void { this.workbook = null; this.currentFile = null; }
  • src/index.ts:32-44 (registration)
    Includes excelTools in the allTools array used for MCP server tool listing and execution handling.
    const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];
  • Global ExcelManager instance used by all Excel tools, including the close_workbook handler.
    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