apple-numbers-mcp 1.1.13 → 1.1.15
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.
- package/build/index.js +93 -63
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -14806,7 +14806,7 @@ function object(shape, params) {
|
|
|
14806
14806
|
return new ZodMiniObject(def);
|
|
14807
14807
|
}
|
|
14808
14808
|
|
|
14809
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
14809
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
14810
14810
|
function isZ4Schema(s) {
|
|
14811
14811
|
const schema = s;
|
|
14812
14812
|
return !!schema._zod;
|
|
@@ -14890,17 +14890,33 @@ function normalizeObjectSchema(schema) {
|
|
|
14890
14890
|
}
|
|
14891
14891
|
return void 0;
|
|
14892
14892
|
}
|
|
14893
|
+
function getDotPath(path) {
|
|
14894
|
+
if (path.length === 0) {
|
|
14895
|
+
return "object root";
|
|
14896
|
+
}
|
|
14897
|
+
return path.reduce((acc, seg, index) => {
|
|
14898
|
+
if (index === 0) {
|
|
14899
|
+
return String(seg);
|
|
14900
|
+
}
|
|
14901
|
+
if (typeof seg === "number") {
|
|
14902
|
+
return `${acc}[${seg}]`;
|
|
14903
|
+
}
|
|
14904
|
+
return `${acc}.${seg}`;
|
|
14905
|
+
}, "");
|
|
14906
|
+
}
|
|
14893
14907
|
function getParseErrorMessage(error2) {
|
|
14894
14908
|
if (error2 && typeof error2 === "object") {
|
|
14909
|
+
if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
|
|
14910
|
+
return error2.issues.map((i) => {
|
|
14911
|
+
if (!i.path?.length) {
|
|
14912
|
+
return i.message;
|
|
14913
|
+
}
|
|
14914
|
+
return `${i.message} at ${getDotPath(i.path)}`;
|
|
14915
|
+
}).join("\n");
|
|
14916
|
+
}
|
|
14895
14917
|
if ("message" in error2 && typeof error2.message === "string") {
|
|
14896
14918
|
return error2.message;
|
|
14897
14919
|
}
|
|
14898
|
-
if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
|
|
14899
|
-
const firstIssue = error2.issues[0];
|
|
14900
|
-
if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
|
|
14901
|
-
return String(firstIssue.message);
|
|
14902
|
-
}
|
|
14903
|
-
}
|
|
14904
14920
|
try {
|
|
14905
14921
|
return JSON.stringify(error2);
|
|
14906
14922
|
} catch {
|
|
@@ -15645,7 +15661,7 @@ function preprocess(fn, schema) {
|
|
|
15645
15661
|
// node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
|
|
15646
15662
|
config(en_default2());
|
|
15647
15663
|
|
|
15648
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
15664
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
15649
15665
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
15650
15666
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
15651
15667
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -17176,7 +17192,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
17176
17192
|
}
|
|
17177
17193
|
};
|
|
17178
17194
|
|
|
17179
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
17195
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
17180
17196
|
function isTerminal(status) {
|
|
17181
17197
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
17182
17198
|
}
|
|
@@ -18465,7 +18481,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
18465
18481
|
return combined;
|
|
18466
18482
|
};
|
|
18467
18483
|
|
|
18468
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
18484
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
18469
18485
|
function mapMiniTarget(t) {
|
|
18470
18486
|
if (!t)
|
|
18471
18487
|
return "draft-7";
|
|
@@ -18507,7 +18523,7 @@ function parseWithCompat(schema, data) {
|
|
|
18507
18523
|
return result.data;
|
|
18508
18524
|
}
|
|
18509
18525
|
|
|
18510
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
18526
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
18511
18527
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
18512
18528
|
var Protocol = class {
|
|
18513
18529
|
constructor(_options) {
|
|
@@ -19461,7 +19477,7 @@ function mergeCapabilities(base, additional) {
|
|
|
19461
19477
|
return result;
|
|
19462
19478
|
}
|
|
19463
19479
|
|
|
19464
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
19480
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
19465
19481
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
19466
19482
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
19467
19483
|
function createDefaultAjvInstance() {
|
|
@@ -19529,7 +19545,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
19529
19545
|
}
|
|
19530
19546
|
};
|
|
19531
19547
|
|
|
19532
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
19548
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
19533
19549
|
var ExperimentalServerTasks = class {
|
|
19534
19550
|
constructor(_server) {
|
|
19535
19551
|
this._server = _server;
|
|
@@ -19742,7 +19758,7 @@ var ExperimentalServerTasks = class {
|
|
|
19742
19758
|
}
|
|
19743
19759
|
};
|
|
19744
19760
|
|
|
19745
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
19761
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
19746
19762
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
19747
19763
|
if (!requests) {
|
|
19748
19764
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -19777,7 +19793,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
19777
19793
|
}
|
|
19778
19794
|
}
|
|
19779
19795
|
|
|
19780
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
19796
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
19781
19797
|
var Server = class extends Protocol {
|
|
19782
19798
|
/**
|
|
19783
19799
|
* Initializes this server with the given name and version information.
|
|
@@ -19843,16 +19859,7 @@ var Server = class extends Protocol {
|
|
|
19843
19859
|
if (!methodSchema) {
|
|
19844
19860
|
throw new Error("Schema is missing a method literal");
|
|
19845
19861
|
}
|
|
19846
|
-
|
|
19847
|
-
if (isZ4Schema(methodSchema)) {
|
|
19848
|
-
const v4Schema = methodSchema;
|
|
19849
|
-
const v4Def = v4Schema._zod?.def;
|
|
19850
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
19851
|
-
} else {
|
|
19852
|
-
const v3Schema = methodSchema;
|
|
19853
|
-
const legacyDef = v3Schema._def;
|
|
19854
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
19855
|
-
}
|
|
19862
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
19856
19863
|
if (typeof methodValue !== "string") {
|
|
19857
19864
|
throw new Error("Schema method literal must be a string");
|
|
19858
19865
|
}
|
|
@@ -20157,7 +20164,7 @@ var Server = class extends Protocol {
|
|
|
20157
20164
|
}
|
|
20158
20165
|
};
|
|
20159
20166
|
|
|
20160
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
20167
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
20161
20168
|
var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
|
|
20162
20169
|
function isCompletable(schema) {
|
|
20163
20170
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -20171,7 +20178,7 @@ var McpZodTypeKind;
|
|
|
20171
20178
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
20172
20179
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
20173
20180
|
|
|
20174
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
20181
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
|
|
20175
20182
|
var MAX_TEMPLATE_LENGTH = 1e6;
|
|
20176
20183
|
var MAX_VARIABLE_LENGTH = 1e6;
|
|
20177
20184
|
var MAX_TEMPLATE_EXPRESSIONS = 1e4;
|
|
@@ -20393,7 +20400,7 @@ var UriTemplate = class _UriTemplate {
|
|
|
20393
20400
|
}
|
|
20394
20401
|
};
|
|
20395
20402
|
|
|
20396
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
20403
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
20397
20404
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
20398
20405
|
function validateToolName(name) {
|
|
20399
20406
|
const warnings = [];
|
|
@@ -20451,7 +20458,7 @@ function validateAndWarnToolName(name) {
|
|
|
20451
20458
|
return result.isValid;
|
|
20452
20459
|
}
|
|
20453
20460
|
|
|
20454
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
20461
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
20455
20462
|
var ExperimentalMcpServerTasks = class {
|
|
20456
20463
|
constructor(_mcpServer) {
|
|
20457
20464
|
this._mcpServer = _mcpServer;
|
|
@@ -20466,7 +20473,7 @@ var ExperimentalMcpServerTasks = class {
|
|
|
20466
20473
|
}
|
|
20467
20474
|
};
|
|
20468
20475
|
|
|
20469
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
20476
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
20470
20477
|
var McpServer = class {
|
|
20471
20478
|
constructor(serverInfo, options) {
|
|
20472
20479
|
this._registeredResources = {};
|
|
@@ -21282,12 +21289,21 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
21282
21289
|
}
|
|
21283
21290
|
};
|
|
21284
21291
|
|
|
21285
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
21292
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
21286
21293
|
import process2 from "node:process";
|
|
21287
21294
|
|
|
21288
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
21295
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
21296
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
21289
21297
|
var ReadBuffer = class {
|
|
21298
|
+
constructor(options) {
|
|
21299
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
21300
|
+
}
|
|
21290
21301
|
append(chunk) {
|
|
21302
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
21303
|
+
if (newSize > this._maxBufferSize) {
|
|
21304
|
+
this.clear();
|
|
21305
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
21306
|
+
}
|
|
21291
21307
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
21292
21308
|
}
|
|
21293
21309
|
readMessage() {
|
|
@@ -21313,20 +21329,26 @@ function serializeMessage(message) {
|
|
|
21313
21329
|
return JSON.stringify(message) + "\n";
|
|
21314
21330
|
}
|
|
21315
21331
|
|
|
21316
|
-
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
21332
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
21317
21333
|
var StdioServerTransport = class {
|
|
21318
|
-
constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
|
|
21334
|
+
constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
|
|
21319
21335
|
this._stdin = _stdin;
|
|
21320
21336
|
this._stdout = _stdout;
|
|
21321
|
-
this._readBuffer = new ReadBuffer();
|
|
21322
21337
|
this._started = false;
|
|
21323
21338
|
this._ondata = (chunk) => {
|
|
21324
|
-
|
|
21325
|
-
|
|
21339
|
+
try {
|
|
21340
|
+
this._readBuffer.append(chunk);
|
|
21341
|
+
this.processReadBuffer();
|
|
21342
|
+
} catch (error2) {
|
|
21343
|
+
this.onerror?.(error2);
|
|
21344
|
+
this.close().catch(() => {
|
|
21345
|
+
});
|
|
21346
|
+
}
|
|
21326
21347
|
};
|
|
21327
21348
|
this._onerror = (error2) => {
|
|
21328
21349
|
this.onerror?.(error2);
|
|
21329
21350
|
};
|
|
21351
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
21330
21352
|
}
|
|
21331
21353
|
/**
|
|
21332
21354
|
* Starts listening for messages on stdin.
|
|
@@ -22360,7 +22382,15 @@ var server = new McpServer({
|
|
|
22360
22382
|
version: version2,
|
|
22361
22383
|
description: "MCP server for reading and writing Apple Numbers (.numbers) spreadsheet files. Inspect file structure, read/search/export table data and individual cells, create spreadsheets, write cells and add/update/delete rows, manage sheets and tables, import CSV/TSV/JSON \u2014 all offline via the numbers-parser sidecar \u2014 and, via Numbers.app, write live formulas, cell styling, column/row dimensions, and merges."
|
|
22362
22384
|
});
|
|
22363
|
-
|
|
22385
|
+
function registerTool(name, config2, cb) {
|
|
22386
|
+
const { outputSchema, ...rest } = config2;
|
|
22387
|
+
return server.registerTool(
|
|
22388
|
+
name,
|
|
22389
|
+
outputSchema ? { ...rest, outputSchema: external_exports.object(outputSchema).passthrough() } : rest,
|
|
22390
|
+
cb
|
|
22391
|
+
);
|
|
22392
|
+
}
|
|
22393
|
+
registerTool(
|
|
22364
22394
|
"health-check",
|
|
22365
22395
|
{
|
|
22366
22396
|
description: "Use when: you want a quick check that the Python 3 read sidecar (numbers-parser) is installed and reports its version.\nReturns: ok/not-ok plus the numbers-parser version string.\nDo not use when: you need a full setup diagnostic including Numbers.app and Automation permission \u2014 use doctor instead.",
|
|
@@ -22377,7 +22407,7 @@ server.registerTool(
|
|
|
22377
22407
|
});
|
|
22378
22408
|
}, "health-check")
|
|
22379
22409
|
);
|
|
22380
|
-
|
|
22410
|
+
registerTool(
|
|
22381
22411
|
"doctor",
|
|
22382
22412
|
{
|
|
22383
22413
|
description: "Use when: a tool returns a permission or setup error, or you want the full setup diagnostic before writing/formatting.\nReturns: four checks \u2014 the resolved Python interpreter (path + version), numbers-parser (the read/write sidecar), Numbers.app (needed only for the formula/formatting tools), and Automation permission \u2014 each as ok/warn/fail with actionable advice.\nDo not use when: you only need the lightweight read-sidecar version check \u2014 use health-check instead.",
|
|
@@ -22398,7 +22428,7 @@ server.registerTool(
|
|
|
22398
22428
|
return successResponse(formatDoctorReport(report), { ...report });
|
|
22399
22429
|
}, "doctor")
|
|
22400
22430
|
);
|
|
22401
|
-
|
|
22431
|
+
registerTool(
|
|
22402
22432
|
"get-file-info",
|
|
22403
22433
|
{
|
|
22404
22434
|
description: "Use when: you need to discover the structure of a .numbers file before reading or writing \u2014 the exact sheet and table names, their dimensions, and header rows. Call this first when sheet/table names are unknown.\nReturns: each sheet with its tables, per-table row\xD7col counts, and the header row (row 0) cells.\nDo not use when: you want the actual cell data \u2014 use read-table; or a single cell \u2014 use get-cell.",
|
|
@@ -22442,7 +22472,7 @@ ${summary}`,
|
|
|
22442
22472
|
);
|
|
22443
22473
|
}, "get-file-info")
|
|
22444
22474
|
);
|
|
22445
|
-
|
|
22475
|
+
registerTool(
|
|
22446
22476
|
"read-table",
|
|
22447
22477
|
{
|
|
22448
22478
|
description: "Use when: you want the data from a table \u2014 headers plus rows, optionally limited to a row range (0-based inclusive indices; header is row 0, so data starts at row 1) and/or a subset of columns. Defaults to the first sheet and first table if sheet/table are omitted.\nReturns: sheet name, table name, the headers and rows selected, and numRows/numCols describing the SELECTION \u2014 not the table. Use get-file-info for the table's full dimensions.\nDo not use when: you only need one cell \u2014 use get-cell; you need the file's structure/names \u2014 use get-file-info; or you want to find a value's location \u2014 use search.",
|
|
@@ -22478,7 +22508,7 @@ ${dataRows}`,
|
|
|
22478
22508
|
);
|
|
22479
22509
|
}, "read-table")
|
|
22480
22510
|
);
|
|
22481
|
-
|
|
22511
|
+
registerTool(
|
|
22482
22512
|
"search",
|
|
22483
22513
|
{
|
|
22484
22514
|
description: "Use when: you need to locate where a text value appears across every cell in a .numbers file (case-insensitive partial match), optionally limited to one sheet.\nReturns: a match count and each match's sheet, table, row, column header, and value.\nDo not use when: you already know the cell's coordinates \u2014 use get-cell; or you want a whole table's contents \u2014 use read-table.",
|
|
@@ -22517,7 +22547,7 @@ ${lines.join("\n")}`, {
|
|
|
22517
22547
|
});
|
|
22518
22548
|
}, "search")
|
|
22519
22549
|
);
|
|
22520
|
-
|
|
22550
|
+
registerTool(
|
|
22521
22551
|
"export-table",
|
|
22522
22552
|
{
|
|
22523
22553
|
description: "Use when: you want to write a table's data out to a CSV, TSV, or JSON file on disk. Defaults to the first sheet and first table if sheet/table are omitted.\nReturns: the exported row count, format, and output path.\nDo not use when: you want the data inline in the response rather than a file \u2014 use read-table; or you want to build a new .numbers file from a CSV/TSV/JSON source \u2014 use import-csv.\nSafety: writes a file to disk at outputPath. The path is written unconditionally \u2014 any existing file there is OVERWRITTEN \u2014 so confirm the destination before calling.",
|
|
@@ -22544,7 +22574,7 @@ server.registerTool(
|
|
|
22544
22574
|
);
|
|
22545
22575
|
}, "export-table")
|
|
22546
22576
|
);
|
|
22547
|
-
|
|
22577
|
+
registerTool(
|
|
22548
22578
|
"get-cell",
|
|
22549
22579
|
{
|
|
22550
22580
|
description: "Use when: you need a single cell's value by 0-based row and column index (header is row 0). Set verbose=true to also get the formula, formatted value, and merge info.\nReturns: the cell's value and type, plus formula/formatted-value/merge details when verbose.\nDo not use when: you want many cells or whole rows \u2014 use read-table; or you don't know the coordinates \u2014 use search.",
|
|
@@ -22581,7 +22611,7 @@ Merged: yes`;
|
|
|
22581
22611
|
return successResponse(text, { ...cell });
|
|
22582
22612
|
}, "get-cell")
|
|
22583
22613
|
);
|
|
22584
|
-
|
|
22614
|
+
registerTool(
|
|
22585
22615
|
"create-spreadsheet",
|
|
22586
22616
|
{
|
|
22587
22617
|
description: "Use when: you want to create a brand-new .numbers file with a single sheet and table from a list of headers, optionally with initial data rows.\nReturns: the file path, sheet name, table name, header count, and data-row count.\nDo not use when: you want to build the file from an existing CSV/TSV/JSON source \u2014 use import-csv; or you want to add to a file that already exists \u2014 use add-sheet / add-table / add-rows.\nSafety: writes a .numbers file via the numbers-parser sidecar (does not require Numbers.app). The target path is written unconditionally \u2014 if a file already exists at that path it is OVERWRITTEN in place; choose a fresh path or confirm overwrite first.",
|
|
@@ -22610,7 +22640,7 @@ ${result.numHeaders} columns, ${result.numRows} data rows`,
|
|
|
22610
22640
|
);
|
|
22611
22641
|
}, "create-spreadsheet")
|
|
22612
22642
|
);
|
|
22613
|
-
|
|
22643
|
+
registerTool(
|
|
22614
22644
|
"set-cell",
|
|
22615
22645
|
{
|
|
22616
22646
|
description: `Use when: you need to write a computed value to one cell in an existing .numbers file, addressed by 0-based row and column (header is row 0). Defaults to the first sheet/table if omitted.
|
|
@@ -22645,7 +22675,7 @@ Safety: modifies the .numbers file in place via the numbers-parser sidecar (does
|
|
|
22645
22675
|
);
|
|
22646
22676
|
}, "set-cell")
|
|
22647
22677
|
);
|
|
22648
|
-
|
|
22678
|
+
registerTool(
|
|
22649
22679
|
"set-cells-batch",
|
|
22650
22680
|
{
|
|
22651
22681
|
description: "Use when: you need to write computed values to multiple cells at once (each with 0-based row/col); more efficient than many set-cell calls. Defaults to the first sheet/table if omitted.\nReturns: the number of cells written and the sheet/table affected.\nDo not use when: replacing whole rows by index \u2014 use update-rows; appending new rows \u2014 use add-rows; or writing live formulas \u2014 use set-formulas-batch.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app) and OVERWRITES any existing data in the targeted cells.",
|
|
@@ -22679,7 +22709,7 @@ server.registerTool(
|
|
|
22679
22709
|
);
|
|
22680
22710
|
}, "set-cells-batch")
|
|
22681
22711
|
);
|
|
22682
|
-
|
|
22712
|
+
registerTool(
|
|
22683
22713
|
"add-rows",
|
|
22684
22714
|
{
|
|
22685
22715
|
description: "Use when: you want to append new rows of data to the end of an existing table; rows are added after the last existing row. Defaults to the first sheet/table if omitted.\nReturns: the number of rows added, the starting row index, and the new total row count.\nDo not use when: overwriting existing rows by index \u2014 use update-rows; setting individual cells \u2014 use set-cell / set-cells-batch.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app). Additive (appends rows) and does not overwrite existing data, but still mutates the file.",
|
|
@@ -22708,7 +22738,7 @@ server.registerTool(
|
|
|
22708
22738
|
);
|
|
22709
22739
|
}, "add-rows")
|
|
22710
22740
|
);
|
|
22711
|
-
|
|
22741
|
+
registerTool(
|
|
22712
22742
|
"delete-rows",
|
|
22713
22743
|
{
|
|
22714
22744
|
description: "Use when: you need to permanently remove a contiguous range of rows from a table; both startRow and endRow are 0-based inclusive indices (header is row 0). Defaults to the first sheet/table if omitted.\nReturns: the number of rows deleted and the new total row count.\nDo not use when: you only want to clear values while keeping the rows \u2014 use set-cells-batch with empty values; or overwrite rows in place \u2014 use update-rows.\nSafety: DESTRUCTIVE \u2014 requires explicit user confirmation; not undoable; the .numbers file is modified in place via the numbers-parser sidecar (does not require Numbers.app) and the deleted rows cannot be recovered. Double-check the 0-based inclusive range before calling.",
|
|
@@ -22735,7 +22765,7 @@ server.registerTool(
|
|
|
22735
22765
|
);
|
|
22736
22766
|
}, "delete-rows")
|
|
22737
22767
|
);
|
|
22738
|
-
|
|
22768
|
+
registerTool(
|
|
22739
22769
|
"add-sheet",
|
|
22740
22770
|
{
|
|
22741
22771
|
description: "Use when: you want to add a new sheet to an existing .numbers file, optionally naming its default table and providing its headers. Geometry depends on headers: with headers the table is created 1 row x headers.length columns; without them it is a 12 x 8 grid of empty cells (not overridable through MCP).\nReturns: the new sheet name, its default table name, and the table's dimensions.\nDo not use when: adding a table to an existing sheet \u2014 use add-table; or creating a whole new file \u2014 use create-spreadsheet.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app). Additive (adds a new sheet) and does not overwrite existing data, but still mutates the file.",
|
|
@@ -22761,7 +22791,7 @@ server.registerTool(
|
|
|
22761
22791
|
);
|
|
22762
22792
|
}, "add-sheet")
|
|
22763
22793
|
);
|
|
22764
|
-
|
|
22794
|
+
registerTool(
|
|
22765
22795
|
"add-table",
|
|
22766
22796
|
{
|
|
22767
22797
|
description: "Use when: you want to add a new table to an existing sheet, optionally naming it and providing its headers. Defaults to the first sheet if omitted. Geometry depends on headers: with headers the table is created 1 row x headers.length columns; without them it is a 12 x 8 grid of empty cells (not overridable through MCP).\nReturns: the new table name, the sheet it was added to, and the table's dimensions.\nDo not use when: adding a whole new sheet \u2014 use add-sheet; or creating a new file \u2014 use create-spreadsheet.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app). Additive (adds a new table) and does not overwrite existing data, but still mutates the file.",
|
|
@@ -22787,7 +22817,7 @@ server.registerTool(
|
|
|
22787
22817
|
);
|
|
22788
22818
|
}, "add-table")
|
|
22789
22819
|
);
|
|
22790
|
-
|
|
22820
|
+
registerTool(
|
|
22791
22821
|
"import-csv",
|
|
22792
22822
|
{
|
|
22793
22823
|
description: 'Use when: you want to convert an existing CSV, TSV, or JSON file into a new .numbers spreadsheet. Format is auto-detected from the input file extension unless you specify it explicitly; any unrecognized extension falls back to CSV. CSV/TSV fields are auto-typed (numbers, booleans, empty cells), so zero-padded identifiers LOSE their leading zeros \u2014 "01234" becomes 1234. JSON values are passed through untouched, but an array of objects takes its column set from the FIRST object only, silently dropping keys that appear later.\nReturns: the imported row and column counts, detected format, and the input/output paths plus sheet/table names.\nDo not use when: building a file from headers/rows you already have in hand \u2014 use create-spreadsheet; or exporting a .numbers table out to CSV/TSV/JSON \u2014 use export-table.\nSafety: writes the output .numbers file via the numbers-parser sidecar (does not require Numbers.app). The output path is written unconditionally \u2014 if a file already exists there it is OVERWRITTEN in place; choose a fresh output path or confirm overwrite first.',
|
|
@@ -22819,7 +22849,7 @@ Sheet: "${result.sheetName}" | Table: "${result.tableName}"`,
|
|
|
22819
22849
|
);
|
|
22820
22850
|
}, "import-csv")
|
|
22821
22851
|
);
|
|
22822
|
-
|
|
22852
|
+
registerTool(
|
|
22823
22853
|
"update-rows",
|
|
22824
22854
|
{
|
|
22825
22855
|
description: "Use when: you need to replace whole rows by 0-based index in an existing file; each update carries a row index and a complete array of column values. Carrying multiple {row, values} entries is more efficient than per-row writes. Defaults to the first sheet/table if omitted.\nReturns: the number of rows updated and the sheet/table affected.\nDo not use when: appending new rows \u2014 use add-rows; writing individual cells \u2014 use set-cell / set-cells-batch; or writing live formulas \u2014 use set-formulas-batch.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app) and OVERWRITES the entire contents of each targeted row.",
|
|
@@ -22851,7 +22881,7 @@ server.registerTool(
|
|
|
22851
22881
|
);
|
|
22852
22882
|
}, "update-rows")
|
|
22853
22883
|
);
|
|
22854
|
-
|
|
22884
|
+
registerTool(
|
|
22855
22885
|
"rename-sheet",
|
|
22856
22886
|
{
|
|
22857
22887
|
description: "Use when: you want to change a sheet's name in a .numbers file. Defaults to the first sheet if the current name is omitted.\nReturns: the old and new sheet names.\nDo not use when: renaming a table \u2014 use rename-table.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app).",
|
|
@@ -22874,7 +22904,7 @@ server.registerTool(
|
|
|
22874
22904
|
});
|
|
22875
22905
|
}, "rename-sheet")
|
|
22876
22906
|
);
|
|
22877
|
-
|
|
22907
|
+
registerTool(
|
|
22878
22908
|
"rename-table",
|
|
22879
22909
|
{
|
|
22880
22910
|
description: "Use when: you want to change a table's name in a .numbers file. Defaults to the first sheet/table if omitted.\nReturns: the old and new table names and the sheet it belongs to.\nDo not use when: renaming a sheet \u2014 use rename-sheet.\nSafety: modifies the .numbers file in place via the numbers-parser sidecar (does not require Numbers.app).",
|
|
@@ -22899,7 +22929,7 @@ server.registerTool(
|
|
|
22899
22929
|
);
|
|
22900
22930
|
}, "rename-table")
|
|
22901
22931
|
);
|
|
22902
|
-
|
|
22932
|
+
registerTool(
|
|
22903
22933
|
"set-formula",
|
|
22904
22934
|
{
|
|
22905
22935
|
description: 'Use when: you need to write a live formula (e.g. "=SUM(A2:A10)") into a cell so it computes in Numbers, addressed by 0-based row/col. Requires explicit sheet and table.\nReturns: the cell, the formula set, and its computed value.\nDo not use when: writing a plain computed value \u2014 use set-cell (this tool is for live formulas); or setting many formulas \u2014 use set-formulas-batch.\nSafety: drives Numbers.app via AppleScript and requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. The file is opened in Numbers.app if not already open, launching the app; the formula OVERWRITES any existing content in the target cell; the WHOLE document is saved, which commits any unsaved edits the user has open in it; and the document is left open afterwards.',
|
|
@@ -22930,7 +22960,7 @@ Computed value: ${result.computedValue}`,
|
|
|
22930
22960
|
);
|
|
22931
22961
|
}, "set-formula")
|
|
22932
22962
|
);
|
|
22933
|
-
|
|
22963
|
+
registerTool(
|
|
22934
22964
|
"set-formulas-batch",
|
|
22935
22965
|
{
|
|
22936
22966
|
description: "Use when: you need to write live formulas to multiple cells at once (each with 0-based row/col); more efficient than many set-formula calls. Requires explicit sheet and table.\nReturns: the number of formulas set and the sheet/table affected.\nDo not use when: writing plain computed values \u2014 use set-cells-batch; or setting a single formula \u2014 use set-formula.\nSafety: drives Numbers.app via AppleScript and requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; OVERWRITES any existing content in the targeted cells; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards.",
|
|
@@ -22988,7 +23018,7 @@ var cellStyleSchema = external_exports.object({
|
|
|
22988
23018
|
verticalAlignment: external_exports.enum(["top", "center", "bottom"]).optional().describe("Vertical alignment"),
|
|
22989
23019
|
textWrap: external_exports.boolean().optional().describe("Enable text wrapping")
|
|
22990
23020
|
});
|
|
22991
|
-
|
|
23021
|
+
registerTool(
|
|
22992
23022
|
"set-cell-style",
|
|
22993
23023
|
{
|
|
22994
23024
|
description: "Use when: you need to format one cell \u2014 font, text/background color, number format, alignment, text wrap \u2014 addressed by 0-based row/col. Requires explicit sheet and table.\nReturns: the styled cell and the sheet/table affected.\nDo not use when: styling many cells \u2014 use set-cells-style-batch; or writing a value/formula rather than formatting \u2014 use set-cell / set-formula.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards.",
|
|
@@ -23015,7 +23045,7 @@ server.registerTool(
|
|
|
23015
23045
|
);
|
|
23016
23046
|
}, "set-cell-style")
|
|
23017
23047
|
);
|
|
23018
|
-
|
|
23048
|
+
registerTool(
|
|
23019
23049
|
"set-cells-style-batch",
|
|
23020
23050
|
{
|
|
23021
23051
|
description: "Use when: you need to format multiple cells at once (each with 0-based row/col); more efficient than many set-cell-style calls. Requires explicit sheet and table.\nReturns: the number of cells styled and the sheet/table affected.\nDo not use when: styling a single cell \u2014 use set-cell-style; or writing values/formulas rather than formatting \u2014 use set-cells-batch / set-formulas-batch.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards.",
|
|
@@ -23046,7 +23076,7 @@ server.registerTool(
|
|
|
23046
23076
|
);
|
|
23047
23077
|
}, "set-cells-style-batch")
|
|
23048
23078
|
);
|
|
23049
|
-
|
|
23079
|
+
registerTool(
|
|
23050
23080
|
"set-column-width",
|
|
23051
23081
|
{
|
|
23052
23082
|
description: "Use when: you need to set a column's width in pixels, addressed by 0-based column index. Requires explicit sheet and table.\nReturns: the column index and the width applied.\nDo not use when: setting a row's height \u2014 use set-row-height.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards.",
|
|
@@ -23076,7 +23106,7 @@ server.registerTool(
|
|
|
23076
23106
|
});
|
|
23077
23107
|
}, "set-column-width")
|
|
23078
23108
|
);
|
|
23079
|
-
|
|
23109
|
+
registerTool(
|
|
23080
23110
|
"set-row-height",
|
|
23081
23111
|
{
|
|
23082
23112
|
description: "Use when: you need to set a row's height in pixels, addressed by 0-based row index. Requires explicit sheet and table.\nReturns: the row index and the height applied.\nDo not use when: setting a column's width \u2014 use set-column-width.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards.",
|
|
@@ -23106,7 +23136,7 @@ server.registerTool(
|
|
|
23106
23136
|
});
|
|
23107
23137
|
}, "set-row-height")
|
|
23108
23138
|
);
|
|
23109
|
-
|
|
23139
|
+
registerTool(
|
|
23110
23140
|
"merge-cells",
|
|
23111
23141
|
{
|
|
23112
23142
|
description: "Use when: you need to merge a rectangular range of cells into one, given 0-based inclusive top-left and bottom-right coordinates. Requires explicit sheet and table.\nReturns: the merged range and the sheet/table affected.\nDo not use when: undoing a merge \u2014 use unmerge-cells.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards. Merging keeps only the top-left cell's content and can DROP the values in the other cells of the range.",
|
|
@@ -23133,7 +23163,7 @@ server.registerTool(
|
|
|
23133
23163
|
});
|
|
23134
23164
|
}, "merge-cells")
|
|
23135
23165
|
);
|
|
23136
|
-
|
|
23166
|
+
registerTool(
|
|
23137
23167
|
"unmerge-cells",
|
|
23138
23168
|
{
|
|
23139
23169
|
description: "Use when: you need to split a previously merged range back into individual cells, given 0-based inclusive top-left and bottom-right coordinates. Requires explicit sheet and table.\nReturns: the unmerged range and the sheet/table affected.\nDo not use when: creating a merge \u2014 use merge-cells.\nSafety: drives Numbers.app via AppleScript \u2014 requires Numbers.app INSTALLED (it need not already be running) plus Automation permission. Opens the file in Numbers.app if it isn't open already, launching the app; modifies it in place; saves the WHOLE document, which commits any unsaved edits the user has open in it; and leaves the document open afterwards. Previously merged cells stay empty (the original non-top-left values are not restored).",
|
package/package.json
CHANGED