Skip to main content
Glama
Ichigo3766

PowerPoint MCP Server

by Ichigo3766

add-slide-title-content

Add a new slide with a title and formatted content to an existing PowerPoint presentation. Specify the presentation name, slide title, and structured content with main and sub-points for clear organization.

Instructions

Add a new slide with a title and content to an existing presentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesContent/body text of the slide. Separate main points with a single carriage return character.Make sub-points with tab character.Do not use bullet points, asterisks or dashes for points.Max main points is 4
presentation_nameYesName of the presentation to add the slide to
titleYesTitle of the slide

Implementation Reference

  • Core implementation of adding a title-content slide: selects layout, sets title, formats content using helper.
    def add_title_with_content_slide(self, presentation_name: str, title: str, content: str) -> Slide:
        try:
            prs = self.presentations[presentation_name]
        except KeyError as e:
            raise ValueError(f"Presentation '{presentation_name}' not found")
        slide_master = prs.slide_master
        # Add a slide with title and content
        slide_layout = prs.slide_layouts[self.SLIDE_LAYOUT_TITLE_AND_CONTENT]  # Use layout with title and content
        slide = prs.slides.add_slide(slide_layout)
    
        # Set the title
        title_shape = slide.shapes.title
        title_shape.text = title
    
        # Set the content
        content_shape = slide.placeholders[1]
        #content_shape.text = content
        # Get the content placeholder and add our formatted text
    
        text_frame = content_shape.text_frame
        self._add_formatted_bullets(text_frame, content)
        return slide
  • Registers the 'add-slide-title-content' tool in the MCP server with description and input schema.
    types.Tool(
        name="add-slide-title-content",
        description="Add a new slide with a title and content to an existing presentation",
        inputSchema={
            "type": "object",
            "properties": {
                "presentation_name": {
                    "type": "string",
                    "description": "Name of the presentation to add the slide to",
                },
                "title": {
                    "type": "string",
                    "description": "Title of the slide",
                },
                "content": {
                    "type": "string",
                    "description": "Content/body text of the slide. "
                                   "Separate main points with a single carriage return character."
                                   "Make sub-points with tab character."
                                   "Do not use bullet points, asterisks or dashes for points."
                                   "Max main points is 4"
                },
            },
            "required": ["presentation_name", "title", "content"],
        },
    ),
  • MCP server tool call handler: validates arguments and delegates to PresentationManager.add_title_with_content_slide.
    elif name == "add-slide-title-content":
        presentation_name = arguments.get("presentation_name")
        title = arguments.get("title")
        content = arguments.get("content")
    
        if not all([presentation_name, title, content]):
            raise ValueError("Missing required arguments")
    
        if presentation_name not in presentation_manager.presentations:
            raise ValueError(f"Presentation not found: {presentation_name}")
    
        try:
            slide = presentation_manager.add_title_with_content_slide(presentation_name, title, content)
        except Exception as e:
            raise ValueError(f"Unable to add slide '{title}' to presentation: {presentation_name}")
    
        return [
            types.TextContent(
                type="text",
                text=f"Added slide '{title}' to presentation: {presentation_name}"
            )
        ]
  • Helper function to format content text into PowerPoint paragraphs with bullet levels based on newlines and tabs.
    def _add_formatted_bullets(self, text_frame, text_block):
        """
        Process a text block and add paragraphs with proper bullet indentation
        using ASCII code detection:
        - ASCII 10 (LF) or ASCII 13 (CR) or combination for new lines (main bullets)
        - ASCII 9 (HT) for tab indentation (sub-bullets)
    
        Args:
            text_frame: The PowerPoint text frame to add text to
            text_block: String of text to process
        """
        # First, normalize all line endings to a single format
        # Replace CR+LF (Windows) with a single marker
        normalized_text = text_block.replace('\r\n', '\n')
        # Replace any remaining CR (old Mac) with LF
        normalized_text = normalized_text.replace('\r', '\n')
    
        # Split the text block into lines using ASCII 10 (LF)
        lines = normalized_text.split('\n')
    
        # Clear any existing text
        if text_frame.paragraphs:
            p = text_frame.paragraphs[0]
            p.text = ""
        else:
            p = text_frame.add_paragraph()
    
        # Process the first line separately (if it exists)
        if lines and lines[0].strip():
            first_line = lines[0]
            # Count leading tabs (ASCII 9) to determine indentation level
            level = 0
            while first_line and ord(first_line[0]) == 9:  # ASCII 9 is HT (tab)
                level += 1
                first_line = first_line[1:]
    
            p.text = first_line.strip()
            p.level = level
    
        # Process remaining lines
        for line in lines[1:]:
            if not line.strip():
                continue  # Skip empty lines
    
            # Count leading tabs (ASCII 9) to determine indentation level
            level = 0
            while line and ord(line[0]) == 9:  # ASCII 9 is HT (tab)
                level += 1
                line = line[1:]
    
            # Add the paragraph with proper indentation
            p = text_frame.add_paragraph()
            p.text = line.strip()
            p.level = level
    
    def add_section_header_slide(self, presentation_name: str, header: str, subtitle: str):
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'add a new slide' which implies a write operation, but doesn't cover permissions, whether changes are saved automatically, error handling, or what happens if the presentation doesn't exist. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

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 a single, efficient sentence that front-loads the core action. It wastes no words and directly communicates the tool's function without unnecessary elaboration, making it easy to parse quickly.

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?

Given the tool's complexity (a write operation with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like side effects, success/failure responses, or how it integrates with sibling tools, leaving the agent with insufficient context for reliable use.

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 already documents all three parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain the relationship between parameters or provide usage examples). Baseline 3 is appropriate when 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 verb 'add' and resource 'new slide with a title and content to an existing presentation', making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add-slide-title-only' or 'add-slide-title-with-chart', which would require mentioning what makes this tool unique (e.g., 'content' vs 'only title' or 'with chart').

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. With siblings like 'add-slide-title-only' and 'add-slide-title-with-chart', it fails to specify scenarios where adding content is preferred over other slide types or when to choose this over creating a new presentation. No exclusions or prerequisites are mentioned.

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

Related 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/Ichigo3766/powerpoint-mcp'

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