xlsx-for-ai 2.9.0 → 2.11.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 +37 -0
  2. package/package.json +1 -1
package/mcp.js CHANGED
@@ -564,6 +564,43 @@ const TOOLS = [
564
564
  },
565
565
  },
566
566
 
567
+ {
568
+ name: 'xlsx_slicers_timelines',
569
+ description:
570
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
571
+ 'This tool: list every slicer (interactive filter button) and timeline (date-range filter visual) in a workbook with their captions, source bindings (table column or pivot table), and timeline granularity (years / quarters / months / days) plus the currently-selected date range.\n' +
572
+ 'No other tool can do this: ExcelJS has NO API for slicers or timelines and silently drops both on every round-trip; pandas drops them entirely; openpyxl support is partial. xlsx_slicers_timelines reads the OOXML zip (xl/slicers/*, xl/slicerCaches/*, xl/timelines/*, xl/timelineCaches/*) directly.\n\n' +
573
+ 'USE WHEN: documenting a dashboard so an LLM knows what filter UI a human sees. Or auditing whether a slicer\'s table-column binding still matches the underlying data after a refactor. Or extracting the date range a timeline currently filters on without screenshotting Excel. ' +
574
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
575
+ 'DO NOT USE WHEN: just reading values (use xlsx_read). Or trying to APPLY a filter (use xlsx_filter — slicers/timelines are UI metadata, not data filters).',
576
+ inputSchema: {
577
+ type: 'object',
578
+ properties: {
579
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
580
+ },
581
+ required: ['file_path'],
582
+ },
583
+ },
584
+
585
+ {
586
+ name: 'xlsx_pivot_tables',
587
+ description:
588
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
589
+ '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' +
590
+ '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' +
591
+ '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. ' +
592
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
593
+ '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).',
594
+ inputSchema: {
595
+ type: 'object',
596
+ properties: {
597
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
598
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
599
+ },
600
+ required: ['file_path'],
601
+ },
602
+ },
603
+
567
604
  {
568
605
  name: 'xlsx_images',
569
606
  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.9.0",
4
+ "version": "2.11.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": {