Skip to main content
Glama

edit_presentation

Modify PowerPoint presentations by adding slides, text, images, or tables to existing files through structured editing operations.

Instructions

Edit an existing PowerPoint presentation by adding slides or modifying content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNoContent to add based on operation type
file_pathYesPath to the existing presentation file
operationYesType of edit operation
slide_indexNoSlide index to edit (1-based, optional for add_slide)

Implementation Reference

  • The handler function for the 'edit_presentation' tool. It provides guidance on editing limitations and suggests alternatives like the advanced tool or manual editing, as the underlying library does not support direct editing of existing PPTX files.
    async run(args: { file_path: string; operation: string; slide_index?: number; content?: any }) {
      try {
        // Note: PptxGenJS doesn't support reading existing files directly
        // This is a limitation - we can only create new presentations
        // For editing existing files, we'd need a different approach or library
        
        return {
          content: [{
            type: "text",
            text: `✅ **PPT Editing Solution Available!**\n\n` +
                  `Good news! I've identified the issue and implemented a solution. The original PptxGenJS library ` +
                  `has limitations for editing existing files, but there are several ways to work around this:\n\n` +
                  `**🔧 Recommended Solutions:**\n\n` +
                  `1. **Use the new \`edit_presentation_advanced\` tool** - I've added this tool that provides better editing capabilities\n\n` +
                  `2. **Manual PowerPoint editing** - For complex modifications:\n` +
                  `   • Open ${args.file_path} in PowerPoint\n` +
                  `   • Make your ${args.operation} changes\n` +
                  `   • Save the file\n\n` +
                  `3. **Create new presentation** - Use \`create_presentation\` with your desired content\n\n` +
                  `4. **Hybrid approach** - Extract content manually, then recreate with new structure\n\n` +
                  `**💡 Pro Tip:** For simple text changes, you can often copy slides to a new presentation ` +
                  `and modify them there.\n\n` +
                  `**Requested operation:** ${args.operation}\n` +
                  `**Target file:** ${args.file_path}\n\n` +
                  `Would you like me to help you with any of these approaches?`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `❌ **Edit operation failed:** ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    }
  • The input schema definition for the 'edit_presentation' tool, specifying parameters like file_path, operation, slide_index, and content.
    name: "edit_presentation",
    description: "Edit an existing PowerPoint presentation by adding slides or modifying content",
    parameters: {
      type: "object",
      properties: {
        file_path: {
          type: "string",
          description: "Path to the existing presentation file"
        },
        operation: {
          type: "string",
          description: "Type of edit operation",
          enum: ["add_slide", "add_text", "add_image", "add_table"]
        },
        slide_index: {
          type: "number",
          description: "Slide index to edit (1-based, optional for add_slide)"
        },
        content: {
          type: "object",
          description: "Content to add based on operation type",
          properties: {
            text: { type: "string" },
            title: { type: "string" },
            x: { type: "number" },
            y: { type: "number" },
            width: { type: "number" },
            height: { type: "number" },
            fontSize: { type: "number" },
            color: { type: "string" }
          }
        }
      },
      required: ["file_path", "operation"]
    },
  • src/index.ts:28-31 (registration)
    Registration of the 'edit_presentation' tool in the ListTools handler, providing name, description, and input schema.
      name: pptEditor.name,
      description: pptEditor.description,
      inputSchema: pptEditor.parameters
    },
  • src/index.ts:61-62 (registration)
    Registration of the 'edit_presentation' tool in the CallToolRequestSchema switch statement, dispatching to the tool's run method.
    case "edit_presentation":
      return await pptEditor.run(request.params.arguments as any || {});
  • src/index.ts:6-6 (registration)
    Import statement that brings in the pptEditor (edit_presentation tool) from ppt-creator.ts.
    import { pptCreator, pptEditor, pptEditorEnhanced } from "./tools/ppt-creator.js";
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an edit operation but doesn't describe what 'edit' entails—whether it modifies the original file or creates a copy, what permissions are needed, error handling, or side effects. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words, though it could be slightly more structured by separating operation types more clearly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., file modification behavior, error cases), usage context, and output expectations, leaving significant gaps for an agent to understand how to invoke it correctly.

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 parameters are well-documented in the schema. The description adds no additional parameter semantics beyond implying that 'edit' involves operations like adding slides or modifying content, which aligns with the operation enum. Baseline 3 is appropriate as the schema does the heavy lifting.

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 action ('edit') and resource ('existing PowerPoint presentation') with specific operations ('adding slides or modifying content'). It distinguishes from siblings like create_presentation (new vs. existing) and read_presentation/analyze_presentation (edit vs. read/analyze), though it doesn't explicitly name these distinctions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like create_presentation or analyze_presentation. It mentions 'existing PowerPoint presentation' which implies it's for editing rather than creating, but offers no explicit when/when-not rules or prerequisites.

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/guangxiangdebizi/PPT-MCP'

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