list_slide_layouts
Discover available slide layout templates with their parameters and descriptions to select the appropriate structure for your presentation content.
Instructions
List all available slide layouts with their parameters and descriptions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/list_layouts.ts:56-75 (handler)The main handler function for the list_layouts tool (referred to as list_slide_layouts in file comment). It retrieves all slide layouts from the active theme and returns a formatted JSON response.export async function listLayouts(): Promise<ToolResponse> { const theme = getActiveTheme(); const layoutsInfo = getAllLayoutsInfo(); return { content: [ { type: "text", text: JSON.stringify( { theme: theme.name, layouts: layoutsInfo, }, null, 2 ), }, ], }; }
- src/tools/list_layouts.ts:54-54 (schema)Input schema for the tool, defined as an empty object since no parameters are required.export const listLayoutsSchema = z.object({});
- src/index.ts:47-52 (registration)Registration of the tool with name 'list_layouts' on the MCP server, linking the schema and handler.server.tool( "list_layouts", "ALWAYS read this first before creating Marp slides - lists all available layouts with parameters and descriptions", listLayoutsSchema.shape, listLayouts );
- src/tools/list_layouts.ts:36-48 (helper)Helper function used by the handler to compile detailed information about all available slide layouts.export function getAllLayoutsInfo() { const theme = getActiveTheme(); return Object.entries(theme.layouts).map(([name, layout]) => ({ name, description: layout.description, className: layout.className, params: Object.entries(layout.params).map(([paramName, paramDef]) => ({ name: paramName, ...paramDef, })), })); }