xlsx-for-ai 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/mcp.js +38 -0
  2. package/package.json +1 -1
package/mcp.js CHANGED
@@ -564,6 +564,44 @@ const TOOLS = [
564
564
  },
565
565
  },
566
566
 
567
+ {
568
+ name: 'xlsx_pivot_tables',
569
+ description:
570
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
571
+ 'This tool: list every PRE-EXISTING pivot table definition in a workbook (the ones an Excel user already built). Per pivot: sheet, name, location range, source range (or named-range / table reference), row / column / page fields, and data fields with their agg function (sum / count / average / max / min / product / stdDev / etc.).\n' +
572
+ 'No other tool can do this: ExcelJS doesn\'t expose pivot tables; pandas drops them entirely; openpyxl reads them but in a deeply-nested object model unsuitable for LLM consumption. Distinct from `xlsx_pivot` which COMPUTES a fresh pivot from raw data — this tool surfaces the existing pivot CONTRACT so an agent can answer "what does PivotTable3 on the Summary sheet actually compute?".\n\n' +
573
+ 'USE WHEN: documenting a financial model that uses pivot tables. Or auditing whether a pivot still points at the right source range after a data-table refactor. Or answering "which sheet aggregates Sales by Region?" without re-deriving it. ' +
574
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
575
+ 'DO NOT USE WHEN: you want to COMPUTE a fresh pivot from raw data (use xlsx_pivot). Or you only need cell values (use xlsx_read).',
576
+ inputSchema: {
577
+ type: 'object',
578
+ properties: {
579
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
580
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
581
+ },
582
+ required: ['file_path'],
583
+ },
584
+ },
585
+
586
+ {
587
+ name: 'xlsx_images',
588
+ description:
589
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
590
+ 'This tool: list every embedded image in a workbook with format (png / jpg / gif / svg / bmp / tiff / emf / wmf), size in bytes, sheet attribution, and anchor cell range (the cells the image floats over). Reads xl/media/* + xl/drawings/* directly.\n' +
591
+ 'No other tool can do this in one call: pandas drops images entirely; openpyxl reads images but doesn\'t roll them up by sheet/format/size or surface anchor cell refs in human-readable form. xlsx_images surfaces "Sheet1 has a 4 KB PNG anchored at B2:D6" — the exact thing an LLM needs to know whether the workbook ships with branding / charts-as-images / signatures.\n\n' +
592
+ 'USE WHEN: cataloging the visual assets in a financial / operational workbook. Or auditing a workbook for embedded images that need to be replaced (logos changed, signatures rotated). Or fingerprinting a template by its image inventory. ' +
593
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
594
+ 'DO NOT USE WHEN: you want the image PIXELS (this surfaces metadata, not bytes — fetching the bytes would inflate the response well beyond LLM context budgets). Or you only need cell values (use xlsx_read).',
595
+ inputSchema: {
596
+ type: 'object',
597
+ properties: {
598
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
599
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
600
+ },
601
+ required: ['file_path'],
602
+ },
603
+ },
604
+
567
605
  {
568
606
  name: 'xlsx_charts',
569
607
  description:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xlsx-for-ai",
3
3
  "mcpName": "io.github.senoff/xlsx-for-ai",
4
- "version": "2.8.0",
4
+ "version": "2.10.0",
5
5
  "description": "The MCP server that makes LLMs reliable on real-world Excel spreadsheets. Thin npm client over a hosted API — read, write, diff, redact, and supervise .xlsx files from any MCP-aware agent.",
6
6
  "main": "index.js",
7
7
  "bin": {