Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 ), }, ], }; }
  • 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 );
  • 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, })), })); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/masaki39/marp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server