Skip to main content
Glama

add-slide-title-content

Add a slide with a title and content to an existing PowerPoint presentation using structured text formatting for main and sub-points.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
presentation_nameYesName of the presentation to add the slide to
titleYesTitle of the slide
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

Implementation Reference

  • Core handler function that creates a new slide using TITLE_AND_CONTENT layout, sets the title, and formats the content into bullets using the helper function.
    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 tool in the list_tools() callback with name, 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"],
        },
    ),
  • Dispatch logic in the call_tool handler that validates arguments and invokes the presentation manager method.
    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}"
            )
        ]
  • Input schema defining parameters: presentation_name (string, required), title (string, required), content (string with formatting instructions, required).
    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"],
    },
  • Helper utility that parses content string using line feeds for main bullets and tabs for sub-bullets, applying proper paragraph levels in PowerPoint.
    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
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 'Add' operation (implying mutation) but doesn't describe permissions needed, whether the slide is appended or inserted at a specific position, what happens on duplicate presentation names, or what the tool returns. For a mutation tool with zero annotation coverage, this is inadequate.

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 states the core purpose without unnecessary words. It's appropriately sized for this tool's complexity and front-loaded with the essential information.

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?

This is a mutation tool with no annotations and no output schema, yet the description provides minimal behavioral context. It doesn't explain what happens after adding the slide (e.g., success/failure response, slide position, error conditions). Given the tool's purpose and lack of structured data, the description should do more to compensate.

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 parameter semantics beyond what's in the schema (e.g., it doesn't explain formatting rules for 'content' that the schema already covers). Baseline 3 is appropriate when 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 ('Add a new slide'), the resource ('to an existing presentation'), and the content ('with a title and content'). It distinguishes from siblings like 'add-slide-title-only' by specifying both title and content, but doesn't explicitly contrast with all alternatives like 'add-slide-comparison'.

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 its many siblings (e.g., 'add-slide-title-only', 'add-slide-title-with-chart', 'add-slide-comparison'). It mentions 'existing presentation' which implies the presentation must already exist, but doesn't reference 'create-presentation' for when a presentation doesn't exist yet.

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/supercurses/powerpoint'

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