create-presentation
Generate a new PowerPoint presentation by specifying a name. This tool initiates presentation creation for 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)The handler for the 'create-presentation' tool. It creates a new empty PowerPoint presentation instance using the pptx library and stores it in the PresentationManager's presentations dictionary for subsequent slide additions.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:46-60 (registration)Registers the 'create-presentation' tool in the list_tools handler, including its name, description, and input schema which requires a 'name' parameter.types.Tool( 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"], }, ),
- src/powerpoint/server.py:50-60 (schema)Defines the input schema for the 'create-presentation' tool, specifying an object with a required 'name' string property.inputSchema={ "type": "object", "properties": { "name": { "type": "string", "description": "Name of the presentation (without .pptx extension)", }, }, "required": ["name"], }, ),