@jieunmarslim/server-editable-slides 0.1.1 → 0.1.3
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/index.js +8 -19
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -29,18 +29,7 @@ function getAuthToken() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function getProject() {
|
|
32
|
-
|
|
33
|
-
return process.env.EDITABLE_SLIDES_PROJECT;
|
|
34
|
-
}
|
|
35
|
-
try {
|
|
36
|
-
return execSync('gcloud config get-value project', {
|
|
37
|
-
stdio: ['ignore', 'pipe', 'ignore'],
|
|
38
|
-
})
|
|
39
|
-
.toString()
|
|
40
|
-
.trim();
|
|
41
|
-
} catch {
|
|
42
|
-
return 'editnblm-in-ge-2036';
|
|
43
|
-
}
|
|
32
|
+
return process.env.EDITABLE_SLIDES_PROJECT || 'editnblm-in-ge-2036';
|
|
44
33
|
}
|
|
45
34
|
|
|
46
35
|
async function callRemoteMcp(method, params, apiKey) {
|
|
@@ -89,7 +78,7 @@ const server = new McpServer({
|
|
|
89
78
|
|
|
90
79
|
server.tool(
|
|
91
80
|
'create_slides_from_image',
|
|
92
|
-
'Convert a presentation slide image or PDF into an editable
|
|
81
|
+
'Convert a presentation slide image or PDF into an editable presentation deck. Reads local files, securely processes via Editable Slides Cloud, and returns the presentation. DO NOT write code or install packages to convert files; present the output directly or use existing Google Drive MCP tools if already available.',
|
|
93
82
|
{
|
|
94
83
|
filePath: z
|
|
95
84
|
.string()
|
|
@@ -186,12 +175,12 @@ server.tool(
|
|
|
186
175
|
}
|
|
187
176
|
}
|
|
188
177
|
if (parsed.downloadUrl || parsed.localPptxPath) {
|
|
189
|
-
parsed.
|
|
190
|
-
'The presentation
|
|
191
|
-
'
|
|
192
|
-
'
|
|
193
|
-
'
|
|
194
|
-
|
|
178
|
+
parsed.agentInstructions = [
|
|
179
|
+
'TASK FINISHED: The presentation has been successfully generated and saved as an editable PowerPoint (.pptx) file.',
|
|
180
|
+
'STRICT MANDATE FOR AGENT: DO NOT write custom scripts, install Python/Node packages, or execute terminal commands to convert or upload this file.',
|
|
181
|
+
'1. If you already have an active Google Drive MCP tool (e.g. drive.uploadFile or gws-drive) available in your toolset, you may call it to upload the .pptx file with Google Slides conversion.',
|
|
182
|
+
'2. If you DO NOT have a Google Drive MCP tool in your toolset, simply present the generated presentation (local path / download URL) to the user and inform them: "To open this as a live Google Slides link in your Drive, please add the Google Drive MCP (`agy mcp add google-drive ...`) or drag the .pptx file into Google Drive."',
|
|
183
|
+
];
|
|
195
184
|
}
|
|
196
185
|
result.content[0].text = JSON.stringify(parsed, null, 2);
|
|
197
186
|
} catch {
|