Skip to main content
Glama

excel_add_worksheet

Add a new worksheet to organize financial data, calculations, or reports within your Excel workbook for better analysis and tracking.

Instructions

Add a new worksheet to the current workbook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • MCP tool handler function that calls ExcelManager.addWorksheet(args.name) and returns success/error response.
    handler: async (args: any): Promise<ToolResult> => { try { await excelManager.addWorksheet(args.name); return { success: true, message: `Added worksheet: ${args.name}` }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : String(error) }; } }
  • Input schema defining the required 'name' parameter as a string.
    inputSchema: { type: "object", properties: { name: { type: "string" } }, required: ["name"] },
  • src/index.ts:8-44 (registration)
    Import of excelTools and inclusion in allTools array, which is used by MCP server for listing and calling tools.
    import { excelTools } from "./tools/excel-tools.js"; import { financialTools } from "./tools/financial-tools.js"; import { rentalTools } from "./tools/rental-tools.js"; import { expenseTools } from "./tools/expense-tools.js"; import { reportingTools } from "./tools/reporting-tools.js"; import { cashFlowTools } from "./tools/cash-flow-tools.js"; import { taxTools } from "./tools/tax-tools.js"; import { analyticsTools } from "./tools/analytics-tools.js"; import { chartTools } from "./tools/chart-tools.js"; import { complianceTools } from "./tools/compliance-tools.js"; import { propertyTools } from "./tools/property-tools-simple.js"; const server = new Server( { name: "excel-finance-mcp", version: "1.0.0", }, { capabilities: { tools: {}, }, } ); const allTools = [ ...excelTools, ...financialTools, ...rentalTools, ...expenseTools, ...reportingTools, ...cashFlowTools, ...taxTools, ...analyticsTools, ...chartTools, ...complianceTools, ...propertyTools, ];
  • ExcelManager.addWorksheet method implementation using underlying ExcelJS Workbook.addWorksheet.
    async addWorksheet(name: string): Promise<void> { if (!this.workbook) { throw new Error('No workbook is currently open'); } this.workbook.addWorksheet(name); }

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