Skip to main content
Glama

create_slide_file

Save generated Markdown slides as .md files for Marp-compatible presentations. Use this tool after AI models output slide content to create or update presentation files.

Instructions

生成済みのMarkdownスライドを.mdファイルとして保存します。モデルがMarkdownを出力した直後に続けて実行してください(同名があれば上書き)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesName of the markdown file to create (without extension)
contentYesThe markdown content for the slides
output_dirNoDirectory path where the file should be created (default: current directory).

Implementation Reference

  • The switch case implementing the create_slide_file tool handler. It destructures arguments, creates the output directory if needed, appends .md extension to filename if absent, constructs the full filepath, writes the markdown content to the file, and returns a success message with the filepath.
    case "create_slide_file": { const { filename, content, output_dir = "." } = args as any; // Ensure the output directory exists await fs.mkdir(output_dir, { recursive: true }); // Add .md extension if not present const finalFilename = filename.endsWith('.md') ? filename : `${filename}.md`; const filepath = path.join(output_dir, finalFilename); // Write the file await fs.writeFile(filepath, content, 'utf-8'); return { content: [ { type: "text", text: `Successfully created slide file: ${filepath}\n\nThe markdown file has been saved and is ready to be used with your preferred presentation tool.`, }, ], }; }
  • Input schema definition for the create_slide_file tool, specifying required string parameters 'filename' and 'content', and optional 'output_dir' with default '.'.
    inputSchema: { type: "object", properties: { filename: { type: "string", description: "Name of the markdown file to create (without extension)" }, content: { type: "string", description: "The markdown content for the slides" }, output_dir: { type: "string", description: "Directory path where the file should be created (default: current directory)", default: "." } }, required: ["filename", "content"] }
  • src/index.ts:33-55 (registration)
    Tool registration object in the TOOLS array, defining the name, description, and input schema for the create_slide_file tool, used for listing available tools.
    { name: "create_slide_file", description: "生成済みのMarkdownスライドを.mdファイルとして保存します。モデルがMarkdownを出力した直後に続けて実行してください(同名があれば上書き)。", inputSchema: { type: "object", properties: { filename: { type: "string", description: "Name of the markdown file to create (without extension)" }, content: { type: "string", description: "The markdown content for the slides" }, output_dir: { type: "string", description: "Directory path where the file should be created (default: current directory)", default: "." } }, required: ["filename", "content"] } }
Install Server

Other Tools

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/nanameru/Majin-Slide-MCP'

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