get_themes
List available themes for your account to obtain valid theme IDs before creating a presentation.
Instructions
List themes available to the authenticated account. Call this before generate_presentation when you need valid theme_id values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:184-198 (registration)Registration of the 'get_themes' tool via server.registerTool with name 'get_themes', description about listing themes, and an empty input schema.
server.registerTool( "get_themes", { description: "List themes available to the authenticated account. Call this before generate_presentation when you need valid theme_id values.", inputSchema: {}, }, async () => { try { return await callRemoteTool("get_themes", {}); } catch (error) { return normalizeError(error); } }, ); - src/index.js:191-197 (handler)Handler function for 'get_themes' - calls the remote Alai MCP endpoint with the tool name 'get_themes' and empty arguments, delegating execution to the upstream service.
async () => { try { return await callRemoteTool("get_themes", {}); } catch (error) { return normalizeError(error); } }, - src/index.js:22-43 (helper)The callRemoteTool helper function that connects to the remote Alai MCP endpoint via StreamableHTTPClientTransport, calls the specified tool, and returns the result. This is the underlying mechanism used by the get_themes handler.
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:80-83 (schema)The theme_id input schema in basePresentationInput that references theme identifiers from get_themes, showing how the output of get_themes is consumed downstream.
theme_id: z .string() .optional() .describe("Theme identifier from get_themes. Use this to control layout family."),