Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
KS4XL_FORBIDNoComma-separated tool or operation names to remove
KS4XL_READ_ONLYNoSet to 1 to list only the operations that read, so nothing can change a file
KS4XL_ALLOWED_ROOTSNoRestricts every path the server reads or writes to these folders

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
xl_readA

Read-only: look at a workbook before changing it (grid view, cells, queries, find, tables, audits, checks). Never changes a file, and works while it is open in Excel. To change anything use xl_edit, xl_format, xl_structure, xl_workbook or xl_app. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • get_workbook_metadata(): Read sheets, true used ranges, names, tables and a hazard summary; the call to orient before editing.

  • get_grid_view(opt location sheet max_rows max_cols values): Show a sheet or range as a compact A1 table with formula and merge markers, plus an anchor token for later edits.

  • read_range(location; opt values sheet): Read a cell or range by location; values='displayed' gives the text Excel shows, 'both' labels each value.

  • get_cells(cells; opt values sheet): Read many individually addressed cells in one call, the scatter complement to the rectangular read_range.

  • query_range(opt location sheet header columns where match order_by aggregate group_by limit offset distinct records values): Filter, sort, page and aggregate a range on the server, so only the rows and columns needed come back.

  • find_cells(query; opt look_in match match_case sheet location limit offset): Find every cell whose value or formula matches (exact, contains or regex), with its address; pages with limit and offset.

  • get_table(name; opt columns values records): Read a table's data by its name (case-insensitive).

  • diagnose_workbook(): Scan for fragile parts (pivots, slicers, shapes, macros, queries) a file save would drop, and recommend the route.

  • validate(opt checks): Run read-only checks (default structure, references, calc_staleness) and return one report.

  • audit_formulas(opt location sheet): Audit formulas in a range, sheet or workbook: external references, volatile functions, missing cached values, errors. More ops follow, in the same format, in the op parameter's description.

xl_editA

Values and formulas: set one or many cells, write, clear, copy or move ranges, the batch editor (apply_edits), find and replace, and CSV, TSV or JSON import. A string starting with '=' is always stored as a formula. Formatting is xl_format; sheets, rows and tables are xl_structure. Every change backs the file up first, saves atomically and verifies after writing. Refuses a workbook open in Excel, and a workbook whose fragile parts a save would drop unless allow_loss is true. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • set_cell(location, value; opt sheet allow_loss): Write one cell by location; a string starting with '=' is always stored as a formula.

  • set_cells(cells; opt sheet echo_cells allow_loss): Write many individually addressed cells as ONE atomic batch, the scatter complement to write_range.

  • write_range(location, data; opt sheet parse_dates echo_cells allow_loss): Write a rectangular 2D block of values and formulas from the location's top-left cell; ragged rows are refused.

  • clear_range(location; opt what sheet allow_loss): Clear a cell or range: what='contents' removes values and formulas, 'formats' resets styles to default, 'all' does both.

  • copy_range(source, dest; opt what adjust_formulas sheet allow_loss): Copy a source rectangle to a destination anchor (location objects, may name different sheets).

  • move_range(source, dest; opt sheet allow_loss): Move a rectangle on the same sheet, rewriting every reference into it so references follow the cells.

  • apply_edits(edits; opt echo_cells allow_loss): Apply many addressed edits as ONE atomic batch.

  • replace_cells(find, replace; opt look_in match match_case sheet location dry_run formulas allow_loss): Find and replace across a workbook, sheet or range (exact, contains or regex); dry_run=true changes nothing. More ops follow, in the same format, in the op parameter's description.

xl_formatA

How cells look and what sits on the sheet: number formats, fonts, fills, borders, named styles, the format painter, column widths and row heights, merges, conditional formats, comments, hyperlinks, images, charts and sheet view. Values are xl_edit. Every change backs the file up first; refuses a workbook open in Excel. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • format_cells(location; opt number_format font fill border alignment sheet allow_loss): Apply formatting to a range, merging onto the existing style so unspecified attributes are preserved.

  • apply_style(style; opt location define sheet allow_loss): Apply a NAMED cell style to a range, optionally defining it first.

  • copy_format(source, dest; opt sheet allow_loss): Copy one cell's complete format onto every cell of a destination range, leaving values untouched.

  • set_dimensions(opt sheet column_widths row_heights autofit_columns hide_columns hide_rows group_rows group_columns ungroup_rows ungroup_columns outline_summary allow_loss): Set column widths and row heights, hide or group rows and columns; autofit here is an estimate (xl_app com_autofit is exact).

  • set_merge(action; opt location sheet confirm_data_loss allow_loss): Merge or unmerge cell ranges, or list every merge.

  • manage_conditional_format(action; opt location cf_type params sheet index allow_loss): Add, list or delete conditional-formatting rules (cell_is, formula, color scales, data bars, icon sets and more).

  • manage_comment(action; opt location text author sheet allow_loss): Add, edit, delete or list cell notes; list also reads threaded comments. Leave author out to sign with the user's own name, or pass author="assistant" to sign as "AI Assistant via KS4XL". More ops follow, in the same format, in the op parameter's description.

xl_structureA

Workbook structure: add, rename, delete or hide sheets, insert or delete rows and columns (references are rewritten), tables, named ranges, sort, filters and data validation. Values are xl_edit. Every change backs the file up first; refuses a workbook open in Excel. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • manage_worksheet(action; opt sheet new_name index state allow_loss): Add, delete, rename, copy, reorder, hide or unhide a sheet; rename rewrites references to it and delete turns them into #REF!, as Excel does.

  • modify_grid_structure(action, at; opt count sheet allow_loss): Insert or delete rows or columns and rewrite every reference on every sheet; references inside a deleted band become #REF!.

  • create_table(location, name; opt header style row_stripes col_stripes totals_row totals sheet allow_loss): Turn a range into an Excel table (ListObject) named name.

  • manage_table(name, action; opt values index column new_name new_ref style on totals row_stripes col_stripes sheet allow_loss): Add or delete rows and columns, rename, resize, toggle totals, restyle or unlist the table named name (action).

  • manage_name(action; opt name refers_to scope new_name allow_loss): Add, delete, rename, update or list defined names; an ambiguous name refuses until scope is given.

  • sort_range(location, keys; opt has_header sheet allow_loss): Sort a range or table body by one or more keys, writing the rows back reordered.

  • set_filter(location; opt criteria sheet allow_loss): Apply an autofilter and hide the rows that do not meet all criteria; rows with uncalculated formulas stay visible.

  • clear_filter(opt location sheet allow_loss): Remove the autofilter from a sheet and unhide the rows it hid, the reverse of set_filter. More ops follow, in the same format, in the op parameter's description.

xl_workbookA

Whole files: create, copy, backups, document properties, protection, page layout, headers and footers, and export of a range or sheets to CSV, TSV or JSON. Exports never overwrite the workbook or its backups. Edits inside a sheet belong to the other tools; manage_backups lists, restores and snapshots the automatic backups. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • create_workbook(opt sheets overwrite): Create a new .xlsx workbook at path with the given sheet names (default a single 'Sheet1').

  • copy_workbook(src, dst; opt overwrite): Copy a workbook byte for byte from src to dst; an existing dst is replaced only with overwrite=true, after a backup.

  • manage_backups(action; opt path directory source scope dry_run label dest_dir): List, restore, purge or snapshot the automatic backups (prev and anchor slots, and the copies deletes and clears keep); purge is a dry run unless dry_run=false.

  • set_workbook_properties(opt title author subject keywords category comments calc_mode full_calc_on_load iterative_calc max_iterations max_change allow_loss): Set document properties and calculation settings (mode, full calc on load, iteration); with none it reports them.

  • set_protection(action; opt sheet password options unlock_ranges locked structure windows scope allow_loss): Protect or unprotect sheets and workbook structure; advisory only, not encryption (xl_app com_save_with_password encrypts).

  • set_page_layout(opt sheet orientation paper_size margins scale fit_to_width fit_to_height print_area print_title_rows print_title_cols gridlines headings allow_loss): Set print settings: orientation, paper size, margins, scale or fit, print area and repeated titles; unset values stay.

  • set_header_footer(opt sheet header footer apply_to raw allow_loss): Write the three-section page headers and footers. More ops follow, in the same format, in the op parameter's description.

xl_appA

Needs Microsoft Excel on Windows: full recalculation, real pivot tables, PDF export, sheet render to PNG, format conversion, password encryption, exact autofit, goal seek, sparklines and the opens-clean check. Reads go through xl_read, and cell, format and structure edits through xl_edit, xl_format and xl_structure. Ops that change the workbook back it up first. These ops run in a private hidden Excel that this server starts and closes. They never attach to or change the user's own Excel, and a workbook the user has open in Excel is refused, not edited. Ops, one per line, as name(required; opt optional): what it does. path, backup and verify_com are not repeated; xl_help shows them:

  • recalculate(opt engine timeout_seconds allow_network): Recalculate every formula in a hidden Excel and save the results; a circular reference is named.

  • com_manage_pivot(action; opt name source_sheet source_range dest_sheet dest_cell rows columns filters values timeout_seconds allow_network): Create, refresh, delete or list real pivot tables through Excel.

  • com_export_pdf(output; opt scope sheet range_a1 overwrite timeout_seconds allow_network): Export to PDF via Excel's real renderer.

  • com_render_sheet(output; opt sheet range_a1 overwrite timeout_seconds allow_network): Render a sheet or range to a PNG exactly as Excel shows it; the workbook is not changed.

  • com_convert_format(output; opt format overwrite timeout_seconds allow_network): Convert the workbook to xlsx, xlsm, xlsb, xls, csv or ods with Excel's own Save As; the source is never overwritten.

  • com_save_with_password(password; opt current_password timeout_seconds allow_network): Encrypt the workbook with Excel's real password encryption; the password cannot be recovered, so keep the backup.

  • com_autofit(opt sheet columns rows timeout_seconds allow_network): True column and row autofit using Excel's real text metrics (the file tier can only estimate widths). More ops follow, in the same format, in the op parameter's description.

xl_helpA

Read-only help. Call it when an op's arguments are unclear or after a BAD_PARAMS refusal. With no arguments it lists every tool and its ops; with op it returns that op's full arguments, an example call and the tool that runs it; topic='location' explains the location object. Reads no file.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.6/5.0

Scored across 7 tools

Disambiguation4/5

The seven tools split by resource domain (read, edit, format, structure, workbook, app, help), and each description explicitly cross-references where a neighboring tool owns an operation (values=edit, formatting=format, sheets/rows/tables=structure). A few boundaries are inherently fuzzy — clear_range with what='formats', apply_style vs format_cells, and the deliberate autofit duplication (set_dimensions estimate vs xl_app com_autofit exact) — but the descriptions call these out, so misselection is unlikely rather than impossible.

Naming Consistency5/5

Every tool follows the same 'xl_' + lowercase domain-noun convention (xl_read, xl_edit, xl_format, xl_structure, xl_workbook, xl_app, xl_help), with no mixing of camelCase, snake_case, or verb styles. The set is a resource taxonomy rather than verb_noun, but it is applied perfectly consistently and is easy to predict and extend.

Tool Count4/5

Seven top-level tools is well within the ideal range and each namespace earns its place as a genuine domain (read, edit, format, structure, workbook, Excel COM, help). The caveat is that each 'tool' is a mega-tool with 8-10+ listed ops plus an undisclosed tail ('more ops follow in the op parameter's description'), which makes the effective surface much larger than seven suggests.

Completeness5/5

The surface covers the full Excel lifecycle end to end: creation and copying (xl_workbook), reading and auditing (xl_read), values and formulas (xl_edit), styling and objects (xl_format), sheets/rows/tables/names/validation (xl_structure), plus real-Excel operations like pivots, PDF/PNG export, and password encryption (xl_app). Backups, validation, dry-run, and help are also present, so there are no obvious dead ends for the stated domain.

Maintenance

ActivityMaintained
ResponsivenessLimited data