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"]
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it saves files, overwrites existing ones with the same name, and should be used after model output. However, it lacks details on permissions needed, error handling, or file system impacts. The description doesn't contradict annotations (none exist).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded: two sentences that directly state the purpose and usage guidelines. Every sentence earns its place with no wasted words. The structure is logical: what it does, followed by when/how to use it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (file creation with overwrite behavior), no annotations, and no output schema, the description is partially complete. It covers the core action and timing but lacks details on return values, error cases, or system dependencies. It's adequate for basic use but has gaps for robust agent operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents parameters (filename, content, output_dir). The description adds no additional parameter semantics beyond what's in the schema. It implies parameters through context (e.g., 'Markdownスライド' relates to content, 'ファイル' to filename) but doesn't explain them explicitly. Baseline is 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '生成済みのMarkdownスライドを.mdファイルとして保存します' (saves generated Markdown slides as .md files). It specifies the verb (保存/save) and resource (Markdown slides as .md files). However, it doesn't explicitly differentiate from the sibling tool 'generate_slide_prompt', which likely generates slides rather than saving them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use it: 'モデルがMarkdownを出力した直後に続けて実行してください' (execute immediately after the model outputs Markdown). It also mentions behavior with existing files: '同名があれば上書き' (overwrites if same name exists). However, it doesn't explicitly state when NOT to use it or name alternatives like the sibling tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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