Skip to main content
Glama

Excel Workbook Files

xl_workbook
Destructive

Create, copy, back up, protect, lay out, and export whole Excel workbooks to CSV/TSV/JSON while preserving document properties and avoiding overwrites of the workbook or backups.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
opYesThe operation to run: an op listed in this tool's description, or one of these, in the same format: - export_range(opt location sheet fmt header values records out_file overwrite bom): Export a range, table or sheet to CSV, TSV or JSON, inline or to a file; values='displayed' writes what the cells show. - export_file(opt fmt sheets out_dir out_file header values records overwrite bom): Export whole sheets to CSV or TSV files, one per sheet, or to one JSON bundle.
argsNoThe op's arguments as an object. Include path (the workbook file) unless the op's line names other paths or the op reads no workbook; unknown keys are refused. xl_help lists every argument.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructive annotation, it discloses concrete operational behavior: exports never overwrite the workbook or backups, copy replaces an existing destination only with overwrite=true after a backup, backup purge is dry-run unless disabled, and protection is advisory rather than encryption. These are precisely the side-effect and safety details an agent needs.

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

Conciseness5/5

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

The summary is front-loaded and the per-operation list is compact and scannable. The meta line about omitted common arguments is useful rather than wasteful for a multi-op tool.

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 complex nine-operation tool, the description covers scope, operation set, per-op arguments, and safety behavior, and points to xl_help for full argument details. It does not describe return values for most operations, which is a minor gap given there is no output schema.

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

Parameters4/5

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

The schema exposes only a generic args object, so the description does significant work by listing required and optional arguments per operation and noting shared path/backup/verify_com arguments. It does not define value formats for every argument, but it adds substantial meaning beyond the schema.

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?

The opening sentence names the domain as whole workbook files and enumerates create, copy, backups, document properties, protection, page layout, headers/footers, and export. It explicitly assigns in-sheet edits to the other tools, giving a clear sibling boundary.

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?

It gives a clear scope rule ('Edits inside a sheet belong to the other tools') and routes backup management and argument help to the appropriate places. It does not explicitly name which sibling to use for each sheet-level task, so it is clear but not exhaustive.

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