Skip to main content
Glama

add-slide-title-only

Add a title slide to a PowerPoint presentation by specifying the presentation name and slide title. Simplify slide creation for AI-driven presentation editing tasks.

Instructions

This tool adds a new title slide to the presentation you are working on. The tool doesn't return anything. It requires the presentation_name to work on.

Input Schema

NameRequiredDescriptionDefault
presentation_nameYesName of the presentation to add the slide to
titleYesTitle of the slide

Input Schema (JSON Schema)

{ "properties": { "presentation_name": { "description": "Name of the presentation to add the slide to", "type": "string" }, "title": { "description": "Title of the slide", "type": "string" } }, "required": [ "presentation_name", "title" ], "type": "object" }

Implementation Reference

  • Handler for the 'add-slide-title-only' tool in the main server call_tool function. Validates input, retrieves the presentation, calls the presentation_manager to add the slide, and returns a success message.
    elif name == "add-slide-title-only": presentation_name = arguments.get("presentation_name") title = arguments.get("title") if not all([presentation_name, title]): 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_slide(presentation_name, title) except Exception as e: raise ValueError(f"Unable to add '{title} to presentation: {presentation_name}. Error: {e}") return [ types.TextContent( type="text", text=f"Added slide '{title}' to presentation: {presentation_name}" ) ]
  • Tool schema definition including input schema for 'add-slide-title-only' in the list_tools handler.
    types.Tool( name="add-slide-title-only", description="This tool adds a new title slide to the presentation you are working on. The tool doesn't " "return anything. It requires the presentation_name to work on.", 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", } }, "required": ["presentation_name", "title"], }, ),
  • Core helper function that adds a title-only slide to the specified presentation using python-pptx library.
    def add_title_slide(self, presentation_name: str, title: str) -> Slide: try: prs = self.presentations[presentation_name] except KeyError as e: raise ValueError(f"Presentation '{presentation_name}' not found") # Add a slide with title and content slide_layout = prs.slide_layouts[self.SLIDE_LAYOUT_TITLE] slide = prs.slides.add_slide(slide_layout) # Set the title title_shape = slide.shapes.title title_shape.text = title return slide

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