Skip to main content
Glama
Kookerella-Ltd

Excel MCP Server (FsOpenXmlDsl)

Official

generate_csharp_script

Turn any existing .xlsx into a runnable C# script that rebuilds the same workbook, making file structure and formatting easy to inspect and modify.

Instructions

Reads an existing Excel workbook and returns a self-contained C# file (using Kookerella.CsOpenXmlDsl) that rebuilds an equivalent file when run via dotnet run <file>.cs (.NET 10's file-based apps feature - no .csproj needed). The C# equivalent of generate_fsharp_script, for a caller who wants pasteable/runnable C# rather than F# - useful for explaining how a file is structured, or as a starting point for the wrapper's fluent API (styling, tables, charts, pivot tables, sparklines, conditional formatting, data validation, hyperlinks, comments, print settings, defined names, protection, etc. - Kookerella.CsOpenXmlDsl now covers the same worksheet/workbook-level feature set as generate_fsharp_script's own Kookerella.FsOpenXmlDsl) beyond what create_workbook exposes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to an existing .xlsx/.xlsm file to reverse-engineer into C# source.
outputFileNameYesThe output filename the generated script should save its rebuilt file to, e.g. "output.xlsx".
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and discloses the key behavioral traits: it reads an existing workbook (non-mutating on input), produces a pasteable/runnable artifact, requires .NET 10 file-based apps (no .csproj needed), and scopes generated feature coverage explicitly (styling, tables, charts, pivot tables, conditional formatting, etc.). Does not address edge behavior — overwrite semantics for outputFileName or failure on invalid files — but the agent gets a realistic model of what happens.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in sentence one, with the runtime requirement attached. Sentence two is overloaded — a large parenthetical enumerating every supported feature (styling, tables, charts, pivot tables, sparklines, conditional formatting, data validation, hyperlinks, comments, print settings, defined names, protection) — which is informative but makes the definition read as a run-on. A trimmed version keeping the feature-scope summary would earn a 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter tool with no output schema and no annotations, the description covers purpose, output artifact, execution model, and fidelity scope — the agent knows what the call produces and how it behaves. Remaining gaps (error handling, whether an existing output file is overwritten) are edge cases and not blocking for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both path and outputFileName are already documented; the description does not add format or syntax details. It does supply the causal connection (path feeds the read, outputFileName receives the rebuilt file) that ties the two parameters into the tool's pipeline. Baseline 3 is correct since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb-resource pair ('Reads an existing Excel workbook and returns a self-contained C# file') and states the generated artifact's runtime behavior. Explicitly contrasts with the sibling generate_fsharp_script ('The C# equivalent of'), so an agent can distinguish them by output language alone. The reverse-engineering intent is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the primary alternative directly — generate_fsharp_script — and gives the selection criterion ('for a caller who wants pasteable/runnable C# rather than F#'). Also positions the tool against create_workbook ('beyond what create_workbook exposes'). Stops short of a formal when-not-to-use statement for the remaining siblings, so 4 rather than 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/Kookerella-Ltd/Kookerella.FsOpenXmlDsl'

If you have feedback or need assistance with the MCP directory API, please join our Discord server