@piotr-agier/google-drive-mcp 2.0.0 → 2.0.2
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/dist/index.js +17 -21
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5121,8 +5121,8 @@ Image URL: ${imageUrl}` }],
|
|
|
5121
5121
|
const docs = ctx.google.docs({ version: "v1", auth: ctx.authClient });
|
|
5122
5122
|
await docs.documents.batchUpdate({
|
|
5123
5123
|
documentId: a.documentId,
|
|
5124
|
-
//
|
|
5125
|
-
requestBody: { requests: [{
|
|
5124
|
+
// addDocumentTab is not yet in the googleapis TypeScript types — cast required
|
|
5125
|
+
requestBody: { requests: [{ addDocumentTab: { tabProperties: { title: a.title } } }] }
|
|
5126
5126
|
});
|
|
5127
5127
|
return { content: [{ type: "text", text: `Requested creation of tab "${a.title}" in document ${a.documentId}.` }], isError: false };
|
|
5128
5128
|
}
|
|
@@ -5133,8 +5133,8 @@ Image URL: ${imageUrl}` }],
|
|
|
5133
5133
|
const docs = ctx.google.docs({ version: "v1", auth: ctx.authClient });
|
|
5134
5134
|
await docs.documents.batchUpdate({
|
|
5135
5135
|
documentId: a.documentId,
|
|
5136
|
-
//
|
|
5137
|
-
requestBody: { requests: [{
|
|
5136
|
+
// updateDocumentTabProperties is not yet in the googleapis TypeScript types — cast required
|
|
5137
|
+
requestBody: { requests: [{ updateDocumentTabProperties: { tabId: a.tabId, tabProperties: { title: a.title }, fields: "title" } }] }
|
|
5138
5138
|
});
|
|
5139
5139
|
return { content: [{ type: "text", text: `Renamed tab ${a.tabId} to "${a.title}".` }], isError: false };
|
|
5140
5140
|
}
|
|
@@ -7660,23 +7660,19 @@ Slide ${a.slideIndex ?? index} (ID: ${slide.objectId}):
|
|
|
7660
7660
|
if (!notesObjectId) {
|
|
7661
7661
|
return errorResponse("This slide does not have a speaker notes object. Speaker notes may need to be initialized manually in Google Slides first.");
|
|
7662
7662
|
}
|
|
7663
|
-
const
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
insertionIndex: 0
|
|
7677
|
-
}
|
|
7678
|
-
}
|
|
7679
|
-
];
|
|
7663
|
+
const notesPage = slide.slideProperties?.notesPage;
|
|
7664
|
+
const speakerNotesShape = notesPage?.pageElements?.find(
|
|
7665
|
+
(el) => el.objectId === notesObjectId
|
|
7666
|
+
);
|
|
7667
|
+
const existingTextElements = speakerNotesShape?.shape?.text?.textElements || [];
|
|
7668
|
+
const hasExistingText = existingTextElements.some(
|
|
7669
|
+
(el) => el.textRun?.content
|
|
7670
|
+
);
|
|
7671
|
+
const requests = [];
|
|
7672
|
+
if (hasExistingText) {
|
|
7673
|
+
requests.push({ deleteText: { objectId: notesObjectId, textRange: { type: "ALL" } } });
|
|
7674
|
+
}
|
|
7675
|
+
requests.push({ insertText: { objectId: notesObjectId, text: a.notes, insertionIndex: 0 } });
|
|
7680
7676
|
await slidesService.presentations.batchUpdate({
|
|
7681
7677
|
presentationId: a.presentationId,
|
|
7682
7678
|
requestBody: { requests }
|