delete_slide
Remove a specific slide from a presentation by providing its unique identifier.
Instructions
Remove a slide from a presentation permanently. Use this only when you know the exact slide identifier to delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| presentation_id | Yes | Presentation that owns the slide. | |
| slide_id | Yes | Slide identifier to remove from the presentation. |
Implementation Reference
- src/index.js:273-296 (registration)Tool registration for "delete_slide" via server.registerTool with schema and handler. The handler delegates to callRemoteTool("delete_slide", args).
server.registerTool( "delete_slide", { description: "Remove a slide from a presentation permanently. Use this only when you know the exact slide identifier to delete.", inputSchema: { presentation_id: z .string() .min(1) .describe("Presentation that owns the slide."), slide_id: z .string() .min(1) .describe("Slide identifier to remove from the presentation."), }, }, async (args) => { try { return await callRemoteTool("delete_slide", args); } catch (error) { return normalizeError(error); } }, ); - src/index.js:278-287 (schema)Input schema for delete_slide tool: requires presentation_id (string) and slide_id (string), both with min length 1.
inputSchema: { presentation_id: z .string() .min(1) .describe("Presentation that owns the slide."), slide_id: z .string() .min(1) .describe("Slide identifier to remove from the presentation."), }, - src/index.js:289-295 (handler)Handler lambda that calls callRemoteTool("delete_slide", args) to delegate the actual deletion to a remote Alai MCP endpoint.
async (args) => { try { return await callRemoteTool("delete_slide", args); } catch (error) { return normalizeError(error); } }, - src/index.js:22-43 (helper)Generic callRemoteTool helper that forwards any tool call (including delete_slide) to the remote Alai MCP server via HTTP with auth headers.
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(() => {}); } }