gogcli-mcp-slides 4.2.5 → 4.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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +454 -136
- package/manifest.json +9 -2
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/tools/slides-extra.ts +54 -44
- package/tests/tools/slides-extra.test.ts +129 -85
- package/vitest.config.ts +5 -0
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-slides",
|
|
5
5
|
"display_name": "gogcli (Slides)",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.4.0",
|
|
7
7
|
"description": "Extended Google Slides for Claude via gogcli — auth + full Slides support (create, edit, export, templates, markdown)",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
],
|
|
39
39
|
"env": {
|
|
40
40
|
"GOG_ACCOUNT": "${user_config.gog_account}",
|
|
41
|
-
"GOG_PATH": "${user_config.gog_path}"
|
|
41
|
+
"GOG_PATH": "${user_config.gog_path}",
|
|
42
|
+
"GOG_FILE_ROOTS": "${user_config.gog_file_roots}"
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
},
|
|
@@ -54,6 +55,12 @@
|
|
|
54
55
|
"title": "gog Executable Path",
|
|
55
56
|
"description": "Path to the gog executable (optional — defaults to 'gog' on your PATH)",
|
|
56
57
|
"required": false
|
|
58
|
+
},
|
|
59
|
+
"gog_file_roots": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"title": "Allowed file directories",
|
|
62
|
+
"description": "Directories tools may read files from (attachments, uploads) or write files to (exports, downloads), separated by ':' (';' on Windows). Optional — defaults to ~/gogcli-mcp-files",
|
|
63
|
+
"required": false
|
|
57
64
|
}
|
|
58
65
|
},
|
|
59
66
|
"tools": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-slides",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-slides",
|
|
5
5
|
"description": "Extended Google Slides MCP server via gogcli — auth + full Slides support",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test:coverage": "vitest run --coverage"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@chrischall/mcp-utils": "^2.
|
|
27
|
+
"@chrischall/mcp-utils": "^2.4.0",
|
|
28
28
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
29
29
|
"zod": "^4.6.1"
|
|
30
30
|
},
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-slides"
|
|
9
9
|
},
|
|
10
|
-
"version": "4.
|
|
10
|
+
"version": "4.4.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-slides",
|
|
15
|
-
"version": "4.
|
|
15
|
+
"version": "4.4.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { accountParam, runOrDiagnose, payloadArg } from '../../../gogcli-mcp/src/lib.js';
|
|
3
|
+
import { accountParam, runOrDiagnose, payloadArg, pos, confinePath } from '../../../gogcli-mcp/src/lib.js';
|
|
4
4
|
import type { GogArg } from '../../../gogcli-mcp/src/lib.js';
|
|
5
5
|
|
|
6
6
|
// Payload routing note — slides differs from gmail/docs.
|
|
@@ -37,7 +37,8 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
37
37
|
account: accountParam,
|
|
38
38
|
}),
|
|
39
39
|
}, async ({ title, content, contentFile, parent, debug, account }) => {
|
|
40
|
-
|
|
40
|
+
if (contentFile) confinePath(contentFile, 'contentFile');
|
|
41
|
+
const args: GogArg[] = ['slides', 'create-from-markdown', pos(title)];
|
|
41
42
|
if (content) args.push(payloadArg('content', 'content-file', content, 'md'));
|
|
42
43
|
if (contentFile) args.push(`--content-file=${contentFile}`);
|
|
43
44
|
if (parent) args.push(`--parent=${parent}`);
|
|
@@ -58,7 +59,8 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
58
59
|
account: accountParam,
|
|
59
60
|
}),
|
|
60
61
|
}, async ({ templateId, title, replacements, replacementsFile, parent, exact, account }) => {
|
|
61
|
-
|
|
62
|
+
if (replacementsFile) confinePath(replacementsFile, 'replacementsFile');
|
|
63
|
+
const args: GogArg[] = ['slides', 'create-from-template', pos(templateId), pos(title)];
|
|
62
64
|
if (replacements) {
|
|
63
65
|
for (const [k, v] of Object.entries(replacements)) {
|
|
64
66
|
args.push(`--replace=${k}=${v}`);
|
|
@@ -82,7 +84,9 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
82
84
|
account: accountParam,
|
|
83
85
|
}),
|
|
84
86
|
}, async ({ presentationId, image, notes, notesFile, before, account }) => {
|
|
85
|
-
|
|
87
|
+
confinePath(image, 'image');
|
|
88
|
+
if (notesFile) confinePath(notesFile, 'notesFile');
|
|
89
|
+
const args: GogArg[] = ['slides', 'add-slide', pos(presentationId), pos(image)];
|
|
86
90
|
if (notes) args.push(payloadArg('notes', 'notes-file', notes));
|
|
87
91
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
88
92
|
if (before) args.push(`--before=${before}`);
|
|
@@ -105,8 +109,9 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
105
109
|
account: accountParam,
|
|
106
110
|
}),
|
|
107
111
|
}, async ({ presentationId, slideId, image, url, width, height, x, y, unit, account }) => {
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
if (image) confinePath(image, 'image');
|
|
113
|
+
const args: GogArg[] = ['slides', 'insert-image', pos(presentationId), pos(slideId)];
|
|
114
|
+
if (image) args.push(pos(image));
|
|
110
115
|
args.push(`--width=${width}`);
|
|
111
116
|
if (url) args.push(`--url=${url}`);
|
|
112
117
|
if (height !== undefined) args.push(`--height=${height}`);
|
|
@@ -126,7 +131,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
126
131
|
}),
|
|
127
132
|
}, async ({ presentationId, slideId, account }) => {
|
|
128
133
|
// --force: gog refuses this delete under the runner's --no-input without it.
|
|
129
|
-
return runOrDiagnose(['slides', 'delete-slide', presentationId, slideId, '--force'], { account });
|
|
134
|
+
return runOrDiagnose(['slides', 'delete-slide', pos(presentationId), pos(slideId), '--force'], { account });
|
|
130
135
|
});
|
|
131
136
|
|
|
132
137
|
// Slide visibility (gog >= 0.38.0, openclaw/gogcli#1009). Skipping is NOT
|
|
@@ -149,7 +154,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
149
154
|
account: accountParam,
|
|
150
155
|
}),
|
|
151
156
|
}, async ({ presentationId, slideId, account }) => {
|
|
152
|
-
return runOrDiagnose(['slides', 'skip-slide', presentationId, slideId], { account });
|
|
157
|
+
return runOrDiagnose(['slides', 'skip-slide', pos(presentationId), pos(slideId)], { account });
|
|
153
158
|
});
|
|
154
159
|
|
|
155
160
|
server.registerTool('gog_slides_unskip_slide', {
|
|
@@ -162,7 +167,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
162
167
|
account: accountParam,
|
|
163
168
|
}),
|
|
164
169
|
}, async ({ presentationId, slideId, account }) => {
|
|
165
|
-
return runOrDiagnose(['slides', 'unskip-slide', presentationId, slideId], { account });
|
|
170
|
+
return runOrDiagnose(['slides', 'unskip-slide', pos(presentationId), pos(slideId)], { account });
|
|
166
171
|
});
|
|
167
172
|
|
|
168
173
|
server.registerTool('gog_slides_update_notes', {
|
|
@@ -176,7 +181,8 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
176
181
|
account: accountParam,
|
|
177
182
|
}),
|
|
178
183
|
}, async ({ presentationId, slideId, notes, notesFile, account }) => {
|
|
179
|
-
|
|
184
|
+
if (notesFile) confinePath(notesFile, 'notesFile');
|
|
185
|
+
const args: GogArg[] = ['slides', 'update-notes', pos(presentationId), pos(slideId)];
|
|
180
186
|
if (notes) args.push(payloadArg('notes', 'notes-file', notes));
|
|
181
187
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
182
188
|
return runOrDiagnose(args, { account });
|
|
@@ -195,8 +201,10 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
195
201
|
account: accountParam,
|
|
196
202
|
}),
|
|
197
203
|
}, async ({ presentationId, slideId, image, url, notes, notesFile, account }) => {
|
|
198
|
-
|
|
199
|
-
if (
|
|
204
|
+
if (image) confinePath(image, 'image');
|
|
205
|
+
if (notesFile) confinePath(notesFile, 'notesFile');
|
|
206
|
+
const args: GogArg[] = ['slides', 'replace-slide', pos(presentationId), pos(slideId)];
|
|
207
|
+
if (image) args.push(pos(image));
|
|
200
208
|
if (url) args.push(`--url=${url}`);
|
|
201
209
|
if (notes) args.push(payloadArg('notes', 'notes-file', notes));
|
|
202
210
|
if (notesFile) args.push(`--notes-file=${notesFile}`);
|
|
@@ -214,7 +222,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
214
222
|
account: accountParam,
|
|
215
223
|
}),
|
|
216
224
|
}, async ({ presentationId, pretty, account }) => {
|
|
217
|
-
const args = ['slides', 'raw', presentationId];
|
|
225
|
+
const args: GogArg[] = ['slides', 'raw', pos(presentationId)];
|
|
218
226
|
if (pretty) args.push('--pretty');
|
|
219
227
|
// Verbatim by contract: see the `lossless` note on runOrDiagnose.
|
|
220
228
|
return runOrDiagnose(args, { account, lossless: true });
|
|
@@ -234,7 +242,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
234
242
|
account: accountParam,
|
|
235
243
|
}),
|
|
236
244
|
}, async ({ presentationId, text, page, occurrence, all, matchCase, failEmpty, account }) => {
|
|
237
|
-
const args = ['slides', 'locate', presentationId, text];
|
|
245
|
+
const args: GogArg[] = ['slides', 'locate', pos(presentationId), pos(text)];
|
|
238
246
|
if (page) args.push(`--page=${page}`);
|
|
239
247
|
if (occurrence !== undefined) args.push(`--occurrence=${occurrence}`);
|
|
240
248
|
if (all) args.push('--all');
|
|
@@ -245,7 +253,8 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
245
253
|
|
|
246
254
|
server.registerTool('gog_slides_thumbnail', {
|
|
247
255
|
description: 'Get or download a rendered thumbnail image for a single slide.',
|
|
248
|
-
|
|
256
|
+
// Writes a file on the gog host and can overwrite one: not read-only (audit SEC-4).
|
|
257
|
+
annotations: { readOnlyHint: false, destructiveHint: true },
|
|
249
258
|
inputSchema: z.object({
|
|
250
259
|
presentationId: z.string().describe('Presentation ID'),
|
|
251
260
|
slideId: z.string().describe('Slide object ID'),
|
|
@@ -256,7 +265,8 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
256
265
|
account: accountParam,
|
|
257
266
|
}),
|
|
258
267
|
}, async ({ presentationId, slideId, format, size, out, overwrite, account }) => {
|
|
259
|
-
|
|
268
|
+
if (out) confinePath(out, 'out');
|
|
269
|
+
const args: GogArg[] = ['slides', 'thumbnail', pos(presentationId), pos(slideId)];
|
|
260
270
|
if (format) args.push(`--format=${format}`);
|
|
261
271
|
if (size) args.push(`--size=${size}`);
|
|
262
272
|
if (out) args.push(`--out=${out}`);
|
|
@@ -277,7 +287,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
277
287
|
account: accountParam,
|
|
278
288
|
}),
|
|
279
289
|
}, async ({ presentationId, layout, layoutId, index, account }) => {
|
|
280
|
-
const args = ['slides', 'new-slide', presentationId];
|
|
290
|
+
const args: GogArg[] = ['slides', 'new-slide', pos(presentationId)];
|
|
281
291
|
if (layout) args.push(`--layout=${layout}`);
|
|
282
292
|
if (layoutId) args.push(`--layout-id=${layoutId}`);
|
|
283
293
|
if (index !== undefined) args.push(`--index=${index}`);
|
|
@@ -294,7 +304,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
294
304
|
account: accountParam,
|
|
295
305
|
}),
|
|
296
306
|
}, async ({ presentationId, slideId, toIndex, account }) => {
|
|
297
|
-
const args = ['slides', 'duplicate-slide', presentationId, slideId];
|
|
307
|
+
const args: GogArg[] = ['slides', 'duplicate-slide', pos(presentationId), pos(slideId)];
|
|
298
308
|
if (toIndex !== undefined) args.push(`--to-index=${toIndex}`);
|
|
299
309
|
return runOrDiagnose(args, { account });
|
|
300
310
|
});
|
|
@@ -309,7 +319,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
309
319
|
account: accountParam,
|
|
310
320
|
}),
|
|
311
321
|
}, async ({ presentationId, slideId, toIndex, account }) => {
|
|
312
|
-
return runOrDiagnose(['slides', 'move-slide', presentationId, slideId, `--to-index=${toIndex}`], { account });
|
|
322
|
+
return runOrDiagnose(['slides', 'move-slide', pos(presentationId), pos(slideId), `--to-index=${toIndex}`], { account });
|
|
313
323
|
});
|
|
314
324
|
|
|
315
325
|
// --- gog 0.29 text authoring ---
|
|
@@ -328,7 +338,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
328
338
|
account: accountParam,
|
|
329
339
|
}),
|
|
330
340
|
}, async ({ presentationId, objectId, text, row, col, insertionIndex, replace, account }) => {
|
|
331
|
-
const args = ['slides', 'insert-text', presentationId, objectId, text];
|
|
341
|
+
const args: GogArg[] = ['slides', 'insert-text', pos(presentationId), pos(objectId), pos(text)];
|
|
332
342
|
if (row !== undefined) args.push(`--row=${row}`);
|
|
333
343
|
if (col !== undefined) args.push(`--col=${col}`);
|
|
334
344
|
if (insertionIndex !== undefined) args.push(`--insertion-index=${insertionIndex}`);
|
|
@@ -355,7 +365,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
355
365
|
account: accountParam,
|
|
356
366
|
}),
|
|
357
367
|
}, async ({ presentationId, objectId, range, font, size, textColor, bold, noBold, italic, noItalic, underline, noUnderline, account }) => {
|
|
358
|
-
const args = ['slides', 'style-text', presentationId, objectId, `--range=${range}`];
|
|
368
|
+
const args: GogArg[] = ['slides', 'style-text', pos(presentationId), pos(objectId), `--range=${range}`];
|
|
359
369
|
if (font) args.push(`--font=${font}`);
|
|
360
370
|
if (size !== undefined) args.push(`--size=${size}`);
|
|
361
371
|
if (textColor) args.push(`--text-color=${textColor}`);
|
|
@@ -380,7 +390,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
380
390
|
account: accountParam,
|
|
381
391
|
}),
|
|
382
392
|
}, async ({ presentationId, objectId, range, url, clear, account }) => {
|
|
383
|
-
const args = ['slides', 'link', presentationId, objectId, `--range=${range}`];
|
|
393
|
+
const args: GogArg[] = ['slides', 'link', pos(presentationId), pos(objectId), `--range=${range}`];
|
|
384
394
|
if (url) args.push(`--url=${url}`);
|
|
385
395
|
if (clear) args.push('--clear');
|
|
386
396
|
return runOrDiagnose(args, { account });
|
|
@@ -399,7 +409,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
399
409
|
account: accountParam,
|
|
400
410
|
}),
|
|
401
411
|
}, async ({ presentationId, objectId, range, on, off, preset, account }) => {
|
|
402
|
-
const args = ['slides', 'bullets', presentationId, objectId, `--range=${range}`];
|
|
412
|
+
const args: GogArg[] = ['slides', 'bullets', pos(presentationId), pos(objectId), `--range=${range}`];
|
|
403
413
|
if (on) args.push('--on');
|
|
404
414
|
if (off) args.push('--off');
|
|
405
415
|
if (preset) args.push(`--preset=${preset}`);
|
|
@@ -420,7 +430,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
420
430
|
account: accountParam,
|
|
421
431
|
}),
|
|
422
432
|
}, async ({ presentationId, find, replacement, object, pages, all, matchCase, account }) => {
|
|
423
|
-
const args = ['slides', 'replace-text', presentationId, find, replacement];
|
|
433
|
+
const args: GogArg[] = ['slides', 'replace-text', pos(presentationId), pos(find), pos(replacement)];
|
|
424
434
|
if (object) args.push(`--object=${object}`);
|
|
425
435
|
if (pages) for (const p of pages) args.push(`--page=${p}`);
|
|
426
436
|
if (all) args.push('--all');
|
|
@@ -446,7 +456,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
446
456
|
account: accountParam,
|
|
447
457
|
}),
|
|
448
458
|
}, async ({ presentationId, slideId, type, x, y, width, height, unit, objectId, account }) => {
|
|
449
|
-
const args = ['slides', 'element', 'create-shape', presentationId, slideId];
|
|
459
|
+
const args: GogArg[] = ['slides', 'element', 'create-shape', pos(presentationId), pos(slideId)];
|
|
450
460
|
if (type) args.push(`--type=${type}`);
|
|
451
461
|
if (x !== undefined) args.push(`--x=${x}`);
|
|
452
462
|
if (y !== undefined) args.push(`--y=${y}`);
|
|
@@ -473,7 +483,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
473
483
|
account: accountParam,
|
|
474
484
|
}),
|
|
475
485
|
}, async ({ presentationId, slideId, category, x, y, width, height, unit, objectId, account }) => {
|
|
476
|
-
const args = ['slides', 'element', 'create-line', presentationId, slideId];
|
|
486
|
+
const args: GogArg[] = ['slides', 'element', 'create-line', pos(presentationId), pos(slideId)];
|
|
477
487
|
if (category) args.push(`--category=${category}`);
|
|
478
488
|
if (x !== undefined) args.push(`--x=${x}`);
|
|
479
489
|
if (y !== undefined) args.push(`--y=${y}`);
|
|
@@ -500,7 +510,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
500
510
|
account: accountParam,
|
|
501
511
|
}),
|
|
502
512
|
}, async ({ presentationId, objectId, kind, fillColor, fillTransparent, outlineColor, outlineWeight, outlineDash, outlineTransparent, account }) => {
|
|
503
|
-
const args = ['slides', 'element', 'style', presentationId, objectId];
|
|
513
|
+
const args: GogArg[] = ['slides', 'element', 'style', pos(presentationId), pos(objectId)];
|
|
504
514
|
if (kind) args.push(`--kind=${kind}`);
|
|
505
515
|
if (fillColor) args.push(`--fill-color=${fillColor}`);
|
|
506
516
|
if (fillTransparent) args.push('--fill-transparent');
|
|
@@ -529,7 +539,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
529
539
|
account: accountParam,
|
|
530
540
|
}),
|
|
531
541
|
}, async ({ presentationId, objectId, translateX, translateY, scaleX, scaleY, shearX, shearY, rotate, applyMode, unit, account }) => {
|
|
532
|
-
const args = ['slides', 'element', 'transform', presentationId, objectId];
|
|
542
|
+
const args: GogArg[] = ['slides', 'element', 'transform', pos(presentationId), pos(objectId)];
|
|
533
543
|
if (translateX !== undefined) args.push(`--translate-x=${translateX}`);
|
|
534
544
|
if (translateY !== undefined) args.push(`--translate-y=${translateY}`);
|
|
535
545
|
if (scaleX !== undefined) args.push(`--scale-x=${scaleX}`);
|
|
@@ -552,7 +562,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
552
562
|
account: accountParam,
|
|
553
563
|
}),
|
|
554
564
|
}, async ({ presentationId, objectId, operation, account }) => {
|
|
555
|
-
return runOrDiagnose(['slides', 'element', 'z-order', presentationId, objectId, `--operation=${operation}`], { account });
|
|
565
|
+
return runOrDiagnose(['slides', 'element', 'z-order', pos(presentationId), pos(objectId), `--operation=${operation}`], { account });
|
|
556
566
|
});
|
|
557
567
|
|
|
558
568
|
server.registerTool('gog_slides_element_group', {
|
|
@@ -565,7 +575,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
565
575
|
account: accountParam,
|
|
566
576
|
}),
|
|
567
577
|
}, async ({ presentationId, objectIds, groupId, account }) => {
|
|
568
|
-
const args = ['slides', 'element', 'group', presentationId, ...objectIds];
|
|
578
|
+
const args: GogArg[] = ['slides', 'element', 'group', pos(presentationId), ...objectIds.map(pos)];
|
|
569
579
|
if (groupId) args.push(`--group-id=${groupId}`);
|
|
570
580
|
return runOrDiagnose(args, { account });
|
|
571
581
|
});
|
|
@@ -579,7 +589,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
579
589
|
account: accountParam,
|
|
580
590
|
}),
|
|
581
591
|
}, async ({ presentationId, groupIds, account }) => {
|
|
582
|
-
return runOrDiagnose(['slides', 'element', 'ungroup', presentationId, ...groupIds], { account });
|
|
592
|
+
return runOrDiagnose(['slides', 'element', 'ungroup', pos(presentationId), ...groupIds.map(pos)], { account });
|
|
583
593
|
});
|
|
584
594
|
|
|
585
595
|
server.registerTool('gog_slides_element_alt_text', {
|
|
@@ -593,7 +603,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
593
603
|
account: accountParam,
|
|
594
604
|
}),
|
|
595
605
|
}, async ({ presentationId, objectId, title, description, account }) => {
|
|
596
|
-
const args = ['slides', 'element', 'alt-text', presentationId, objectId];
|
|
606
|
+
const args: GogArg[] = ['slides', 'element', 'alt-text', pos(presentationId), pos(objectId)];
|
|
597
607
|
if (title !== undefined) args.push(`--title=${title}`);
|
|
598
608
|
if (description !== undefined) args.push(`--description=${description}`);
|
|
599
609
|
return runOrDiagnose(args, { account });
|
|
@@ -609,7 +619,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
609
619
|
}),
|
|
610
620
|
}, async ({ presentationId, objectId, account }) => {
|
|
611
621
|
// --force: gog refuses this delete under the runner's --no-input without it.
|
|
612
|
-
return runOrDiagnose(['slides', 'element', 'delete', presentationId, objectId, '--force'], { account });
|
|
622
|
+
return runOrDiagnose(['slides', 'element', 'delete', pos(presentationId), pos(objectId), '--force'], { account });
|
|
613
623
|
});
|
|
614
624
|
|
|
615
625
|
// --- gog 0.29 native tables (table subtree). Cell addressing is zero-based. ---
|
|
@@ -626,7 +636,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
626
636
|
account: accountParam,
|
|
627
637
|
}),
|
|
628
638
|
}, async ({ presentationId, slideId, rows, cols, objectId, account }) => {
|
|
629
|
-
const args = ['slides', 'table', 'create', presentationId, slideId, `--rows=${rows}`, `--cols=${cols}`];
|
|
639
|
+
const args: GogArg[] = ['slides', 'table', 'create', pos(presentationId), pos(slideId), `--rows=${rows}`, `--cols=${cols}`];
|
|
630
640
|
if (objectId) args.push(`--object-id=${objectId}`);
|
|
631
641
|
return runOrDiagnose(args, { account });
|
|
632
642
|
});
|
|
@@ -655,7 +665,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
655
665
|
account: accountParam,
|
|
656
666
|
}),
|
|
657
667
|
}, async ({ presentationId, tableObjectId, row, col, range, fillColor, fillTransparent, contentAlign, font, size, textColor, bold, noBold, italic, noItalic, underline, noUnderline, account }) => {
|
|
658
|
-
const args = ['slides', 'table', 'cell', 'style', presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
668
|
+
const args: GogArg[] = ['slides', 'table', 'cell', 'style', pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
659
669
|
if (range) args.push(`--range=${range}`);
|
|
660
670
|
if (fillColor) args.push(`--fill-color=${fillColor}`);
|
|
661
671
|
if (fillTransparent) args.push('--fill-transparent');
|
|
@@ -690,7 +700,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
690
700
|
account: accountParam,
|
|
691
701
|
}),
|
|
692
702
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, position, borderColor, weight, dash, transparent, account }) => {
|
|
693
|
-
const args = ['slides', 'table', 'border', 'style', presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
703
|
+
const args: GogArg[] = ['slides', 'table', 'border', 'style', pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
694
704
|
if (rowSpan !== undefined) args.push(`--row-span=${rowSpan}`);
|
|
695
705
|
if (colSpan !== undefined) args.push(`--col-span=${colSpan}`);
|
|
696
706
|
if (position) args.push(`--position=${position}`);
|
|
@@ -713,7 +723,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
713
723
|
account: accountParam,
|
|
714
724
|
}),
|
|
715
725
|
}, async ({ presentationId, tableObjectId, col, count, right, account }) => {
|
|
716
|
-
const args = ['slides', 'table', 'column', 'insert', presentationId, tableObjectId, `--col=${col}`];
|
|
726
|
+
const args: GogArg[] = ['slides', 'table', 'column', 'insert', pos(presentationId), pos(tableObjectId), `--col=${col}`];
|
|
717
727
|
if (count !== undefined) args.push(`--count=${count}`);
|
|
718
728
|
if (right) args.push('--right');
|
|
719
729
|
return runOrDiagnose(args, { account });
|
|
@@ -729,7 +739,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
729
739
|
account: accountParam,
|
|
730
740
|
}),
|
|
731
741
|
}, async ({ presentationId, tableObjectId, col, account }) => {
|
|
732
|
-
return runOrDiagnose(['slides', 'table', 'column', 'delete', presentationId, tableObjectId, `--col=${col}`, '--force'], { account });
|
|
742
|
+
return runOrDiagnose(['slides', 'table', 'column', 'delete', pos(presentationId), pos(tableObjectId), `--col=${col}`, '--force'], { account });
|
|
733
743
|
});
|
|
734
744
|
|
|
735
745
|
server.registerTool('gog_slides_table_column_size', {
|
|
@@ -743,7 +753,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
743
753
|
account: accountParam,
|
|
744
754
|
}),
|
|
745
755
|
}, async ({ presentationId, tableObjectId, col, width, account }) => {
|
|
746
|
-
return runOrDiagnose(['slides', 'table', 'column', 'size', presentationId, tableObjectId, `--col=${col}`, `--width=${width}`], { account });
|
|
756
|
+
return runOrDiagnose(['slides', 'table', 'column', 'size', pos(presentationId), pos(tableObjectId), `--col=${col}`, `--width=${width}`], { account });
|
|
747
757
|
});
|
|
748
758
|
|
|
749
759
|
server.registerTool('gog_slides_table_row_insert', {
|
|
@@ -758,7 +768,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
758
768
|
account: accountParam,
|
|
759
769
|
}),
|
|
760
770
|
}, async ({ presentationId, tableObjectId, row, count, below, account }) => {
|
|
761
|
-
const args = ['slides', 'table', 'row', 'insert', presentationId, tableObjectId, `--row=${row}`];
|
|
771
|
+
const args: GogArg[] = ['slides', 'table', 'row', 'insert', pos(presentationId), pos(tableObjectId), `--row=${row}`];
|
|
762
772
|
if (count !== undefined) args.push(`--count=${count}`);
|
|
763
773
|
if (below) args.push('--below');
|
|
764
774
|
return runOrDiagnose(args, { account });
|
|
@@ -774,7 +784,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
774
784
|
account: accountParam,
|
|
775
785
|
}),
|
|
776
786
|
}, async ({ presentationId, tableObjectId, row, account }) => {
|
|
777
|
-
return runOrDiagnose(['slides', 'table', 'row', 'delete', presentationId, tableObjectId, `--row=${row}`, '--force'], { account });
|
|
787
|
+
return runOrDiagnose(['slides', 'table', 'row', 'delete', pos(presentationId), pos(tableObjectId), `--row=${row}`, '--force'], { account });
|
|
778
788
|
});
|
|
779
789
|
|
|
780
790
|
server.registerTool('gog_slides_table_row_size', {
|
|
@@ -788,7 +798,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
788
798
|
account: accountParam,
|
|
789
799
|
}),
|
|
790
800
|
}, async ({ presentationId, tableObjectId, row, height, account }) => {
|
|
791
|
-
return runOrDiagnose(['slides', 'table', 'row', 'size', presentationId, tableObjectId, `--row=${row}`, `--height=${height}`], { account });
|
|
801
|
+
return runOrDiagnose(['slides', 'table', 'row', 'size', pos(presentationId), pos(tableObjectId), `--row=${row}`, `--height=${height}`], { account });
|
|
792
802
|
});
|
|
793
803
|
|
|
794
804
|
server.registerTool('gog_slides_table_merge', {
|
|
@@ -804,7 +814,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
804
814
|
account: accountParam,
|
|
805
815
|
}),
|
|
806
816
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, account }) => {
|
|
807
|
-
const args = ['slides', 'table', 'merge', presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
817
|
+
const args: GogArg[] = ['slides', 'table', 'merge', pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
808
818
|
if (rowSpan !== undefined) args.push(`--row-span=${rowSpan}`);
|
|
809
819
|
if (colSpan !== undefined) args.push(`--col-span=${colSpan}`);
|
|
810
820
|
return runOrDiagnose(args, { account });
|
|
@@ -823,7 +833,7 @@ export function registerExtraSlidesTools(server: McpServer): void {
|
|
|
823
833
|
account: accountParam,
|
|
824
834
|
}),
|
|
825
835
|
}, async ({ presentationId, tableObjectId, row, col, rowSpan, colSpan, account }) => {
|
|
826
|
-
const args = ['slides', 'table', 'unmerge', presentationId, tableObjectId, `--row=${row}`, `--col=${col}`];
|
|
836
|
+
const args: GogArg[] = ['slides', 'table', 'unmerge', pos(presentationId), pos(tableObjectId), `--row=${row}`, `--col=${col}`];
|
|
827
837
|
if (rowSpan !== undefined) args.push(`--row-span=${rowSpan}`);
|
|
828
838
|
if (colSpan !== undefined) args.push(`--col-span=${colSpan}`);
|
|
829
839
|
return runOrDiagnose(args, { account });
|