export_presentation
Export a finished presentation to PDF, PowerPoint, or a shareable link for delivery.
Instructions
Export a finished presentation to PDF, PowerPoint, or a shareable link. Use this after generation or editing when you need a deliverable artifact.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| presentation_id | Yes | Presentation to export. | |
| formats | Yes | One or more export formats to generate. |
Implementation Reference
- src/index.js:298-321 (registration)Registration of the 'export_presentation' tool via server.registerTool with its description and input schema.
server.registerTool( "export_presentation", { description: "Export a finished presentation to PDF, PowerPoint, or a shareable link. Use this after generation or editing when you need a deliverable artifact.", inputSchema: { presentation_id: z .string() .min(1) .describe("Presentation to export."), formats: z .array(z.enum(["pdf", "ppt", "link"])) .min(1) .describe("One or more export formats to generate."), }, }, async (args) => { try { return await callRemoteTool("export_presentation", args); } catch (error) { return normalizeError(error); } }, ); - src/index.js:300-313 (schema)Input schema for 'export_presentation': requires presentation_id (string) and formats (array of 'pdf', 'ppt', 'link').
{ description: "Export a finished presentation to PDF, PowerPoint, or a shareable link. Use this after generation or editing when you need a deliverable artifact.", inputSchema: { presentation_id: z .string() .min(1) .describe("Presentation to export."), formats: z .array(z.enum(["pdf", "ppt", "link"])) .min(1) .describe("One or more export formats to generate."), }, }, - src/index.js:314-321 (handler)Handler function that calls callRemoteTool('export_presentation', args) and normalizes any errors.
async (args) => { try { return await callRemoteTool("export_presentation", args); } catch (error) { return normalizeError(error); } }, ); - src/index.js:22-43 (helper)The callRemoteTool helper function that connects to the remote MCP endpoint, invokes the tool by name, and returns the result.
async function callRemoteTool(name, args) { const client = new Client( { name: "alai-mcp-wrapper", version: "1.0.2" }, { capabilities: {} }, ); const transport = new StreamableHTTPClientTransport(new URL(REMOTE_MCP_URL), { requestInit: { headers: createRemoteHeaders(), }, }); try { await client.connect(transport); return await client.callTool({ name, arguments: args, }); } finally { await transport.close().catch(() => {}); await client.close().catch(() => {}); } }