create-presentation
Generate a new PowerPoint presentation by specifying its name. Use this tool to initiate the creation process for tailored presentations within the PowerPoint MCP Server.
Instructions
This tool starts the process of generating a new powerpoint presentation with the name given by the user. Use this tool when the user requests to create or generate a new presentation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the presentation (without .pptx extension) |
Implementation Reference
- src/powerpoint/server.py:490-508 (handler)Handler for the create-presentation tool. Creates a new Presentation object from python-pptx and stores it in the PresentationManager instance.elif name == "create-presentation": presentation_name = arguments.get("name") if not presentation_name: raise ValueError("Missing presentation name") # Create new presentation prs = Presentation() try: presentation_manager.presentations[presentation_name] = prs except KeyError as e: raise ValueError(f"Unable to add {presentation_name} to presentation. Error: {str(e)}") return [ types.TextContent( type="text", text=f"Created new presentation: {presentation_name}" ) ]
- src/powerpoint/server.py:47-60 (registration)Tool registration in list_tools() decorator, defining the tool's name, description, and input schema.name="create-presentation", description="This tool starts the process of generating a new powerpoint presentation with the name given " "by the user. Use this tool when the user requests to create or generate a new presentation.", inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Name of the presentation (without .pptx extension)", }, }, "required": ["name"], }, ),
- PresentationManager.__init__ method that initializes the dictionary for storing presentations, used by the handler.def __init__(self): self.presentations: Dict[str, Any] = {}