xlsx-for-ai 2.2.0 → 2.4.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 +75 -0
  2. package/package.json +1 -1
package/mcp.js CHANGED
@@ -469,6 +469,81 @@ const TOOLS = [
469
469
  required: ['file_path'],
470
470
  },
471
471
  },
472
+
473
+ {
474
+ name: 'xlsx_data_validations',
475
+ description:
476
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
477
+ 'This tool: list every cell-level data validation rule (dropdowns, numeric/date bounds, text-length caps, custom formulas) defined in a workbook — the constraints that Excel enforces when a human types into the cell.\n' +
478
+ 'No other tool can do this: pandas drops validations entirely on read; openpyxl exposes them but only on a per-cell loop; this surfaces them in one shot with target cells, formulae, error messages, and prompt text.\n\n' +
479
+ 'USE WHEN: auditing a form / data-entry workbook to know what inputs are legal. Or extracting a dropdown list for use elsewhere. Or generating fixtures that match the validation contract. ' +
480
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
481
+ 'DO NOT USE WHEN: just trying to read values (use xlsx_read). Or trying to enforce validations on write (xlsx_write does not write validations).',
482
+ inputSchema: {
483
+ type: 'object',
484
+ properties: {
485
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
486
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
487
+ },
488
+ required: ['file_path'],
489
+ },
490
+ },
491
+
492
+ {
493
+ name: 'xlsx_hyperlinks',
494
+ description:
495
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
496
+ 'This tool: list every hyperlink in a workbook with its anchor cell, target URL/anchor, display text, tooltip, and a kind classifier (external / internal / mailto / unknown).\n' +
497
+ 'No other tool can do this: pandas drops hyperlinks on read entirely; openpyxl gives raw access but does not classify or aggregate; this surfaces all links plus a per-kind tally for instant audit.\n\n' +
498
+ 'USE WHEN: security-auditing a workbook before opening it (what URLs does it point at?). Or extracting a reference list of URLs from a financial model / dashboard. Or finding mailto links for a contact-list workbook. ' +
499
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
500
+ 'DO NOT USE WHEN: trying to follow / fetch the targets (this tool does not fetch — by design, for safety). Or just reading cell text (use xlsx_read).',
501
+ inputSchema: {
502
+ type: 'object',
503
+ properties: {
504
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
505
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
506
+ },
507
+ required: ['file_path'],
508
+ },
509
+ },
510
+
511
+ {
512
+ name: 'xlsx_topology',
513
+ description:
514
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
515
+ 'This tool: one-call workbook orientation. Returns sheets × dimensions × formulas × named ranges × tables × validations × hyperlinks × merges in one shot, plus feature flags (macros / external refs / pivots / LAMBDA / dynamic arrays).\n' +
516
+ 'No other tool can do this: pandas gives you a frame per sheet but no structure; openpyxl makes you fan out across 6+ object trees to learn the same thing; this is the "what is in this workbook?" call you make first to decide which other tool to call next.\n\n' +
517
+ 'USE WHEN: an agent has just been handed a workbook and needs to orient before drilling in. Or surveying many workbooks for triage / index. Or auditing whether a workbook is "interesting" (formulas? macros? external refs?). ' +
518
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
519
+ 'DO NOT USE WHEN: you already know the sheet you want and just want its data (use xlsx_read or xlsx_describe).',
520
+ inputSchema: {
521
+ type: 'object',
522
+ properties: {
523
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
524
+ },
525
+ required: ['file_path'],
526
+ },
527
+ },
528
+
529
+ {
530
+ name: 'xlsx_conditional_formats',
531
+ description:
532
+ 'xlsx-for-ai — read, write, diff, redact, supervise .xlsx files locally.\n' +
533
+ 'This tool: list every conditional formatting rule in a workbook — color scales, data bars, icon sets, formula-based highlights, top-N, duplicate / unique values, contains-text, time-period, above-average. Per rule: range, type, operator, formulae, priority, stopIfTrue.\n' +
534
+ 'No other tool can do this: pandas drops conditional formatting on read entirely; openpyxl exposes the raw CF objects but offers no rollup or classification. This surfaces every rule plus a per-type tally so an agent can answer "does this workbook use color scales?" without scanning every row.\n\n' +
535
+ 'USE WHEN: auditing a dashboard / financial model to know what visual cues a human would see. Or extracting business rules embedded as CF (e.g. "row turns red when col C > 1000" — the rule IS the spec). Or generating fixtures that match a workbook\'s CF semantics. ' +
536
+ 'Free tier — counts against the 10k/mo cap.\n\n' +
537
+ 'DO NOT USE WHEN: you only care about cell values (use xlsx_read). Or you want to re-apply CF rules to a NEW workbook (xlsx_write does not write CF rules).',
538
+ inputSchema: {
539
+ type: 'object',
540
+ properties: {
541
+ file_path: { type: 'string', description: 'Absolute path to the .xlsx file.' },
542
+ sheet: { type: 'string', description: 'Optional: restrict to a specific sheet.' },
543
+ },
544
+ required: ['file_path'],
545
+ },
546
+ },
472
547
  ];
473
548
 
474
549
  // ---------------------------------------------------------------------------
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.2.0",
4
+ "version": "2.4.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": {