get_presentations
Retrieve a list of your presentations to select one for editing, exporting, or deleting.
Instructions
List presentations owned by the authenticated user. Use this when you need to pick an existing presentation_id before editing, exporting, or deleting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:216-230 (registration)Registration of the 'get_presentations' tool with the MCP server. The handler calls 'callRemoteTool' which forwards the request to the remote Alai MCP endpoint. No input schema is required (empty object).
server.registerTool( "get_presentations", { description: "List presentations owned by the authenticated user. Use this when you need to pick an existing presentation_id before editing, exporting, or deleting.", inputSchema: {}, }, async () => { try { return await callRemoteTool("get_presentations", {}); } catch (error) { return normalizeError(error); } }, ); - src/index.js:223-229 (handler)Handler function for get_presentations. Delegates to 'callRemoteTool' which creates an MCP client and proxies the call to the remote Alai service.
async () => { try { return await callRemoteTool("get_presentations", {}); } catch (error) { return normalizeError(error); } }, - src/index.js:22-43 (helper)Helper function that forwards tool calls to the remote Alai MCP endpoint using a streaming HTTP client transport.
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(() => {}); } } - src/index.js:51-72 (helper)Helper function that normalizes errors from the remote tool call into a structured error response with optional auth guidance.
function normalizeError(error) { const message = error instanceof Error ? error.message : "Unknown upstream error"; return { content: [ { type: "text", text: `Alai upstream request failed: ${message}`, }, ...(authGuidance() ? [ { type: "text", text: authGuidance(), }, ] : []), ], isError: true, }; }