Skip to main content
Glama

excel_delete_worksheet

Remove unwanted worksheets from Excel workbooks to maintain organized financial data and streamline accounting workflows.

Instructions

Delete a worksheet from the current workbook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The tool handler: defines the tool, its input schema, and the execution logic that delegates to ExcelManager.deleteWorksheet
    { name: "excel_delete_worksheet", description: "Delete a worksheet from the current workbook", inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] }, handler: async (args: any): Promise<ToolResult> => { try { await excelManager.deleteWorksheet(args.name); return { success: true, message: `Deleted worksheet: ${args.name}` }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } } },
  • Input schema requiring the worksheet 'name' string
    inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] },
  • Core implementation: retrieves worksheet by name and calls ExcelJS workbook.removeWorksheet
    async deleteWorksheet(name: string): Promise<void> { if (!this.workbook) { throw new Error('No workbook is currently open'); } const worksheet = this.workbook.getWorksheet(name); if (!worksheet) { throw new Error(`Worksheet "${name}" not found`); } this.workbook.removeWorksheet(worksheet.id); }
  • src/index.ts:32-44 (registration)
    Registration: excelTools (containing excel_delete_worksheet) spread into allTools array used by MCP server for tool listing and execution
    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