PresentationDocumentAgentTools Class
Provides AI agent tools for PowerPoint presentation lifecycle management and I/O operations. Handles presentation creation, import, export, and manager.
Inherited Members
Namespace: Syncfusion.AI.AgentTools.PowerPoint
Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
Syntax
public class PresentationDocumentAgentTools : AgentToolBase
Constructors
PresentationDocumentAgentTools(PresentationManager, String)
Initializes a new instance of the PresentationDocumentAgentTools class.
Declaration
public PresentationDocumentAgentTools(PresentationManager manager, string outputDirectory = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationManager | manager | The presentation manager. |
| System.String | outputDirectory | Optional output directory for file operations. |
Methods
CreatePresentation(String, String)
Creates a empty PowerPoint presentation instance in memory or loads an existing presentation from a file.
Declaration
[Tool(Name = "CreatePresentation", Description = "Create a empty PowerPoint Presentation instance in memory or load an existing one. FilePath - Use the path to load an existing Presentation; if null, creates an empty presentation. Returns the documentid.")]
public AgentToolResult CreatePresentation([ToolParameter(Description = "Path to an existing PowerPoint file, or null to create a new presentation")] string filePath = null, [ToolParameter(Description = "Password for encrypted presentation")] string password = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | Optional path to an existing PowerPoint file. If null, creates a new empty presentation. |
| System.String | password | Optional password for encrypted presentations. |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result containing the document ID of the created or loaded presentation. |
ExportPresentation(String, String, String)
Exports a PowerPoint presentation from memory to the file system in the specified format
Declaration
[Tool(Name = "ExportPresentation", Description = "Exports the PowerPoint presentation to the file system in the specified format.")]
public AgentToolResult ExportPresentation([ToolParameter(Description = "The ID of the presentation to export")] string documentId, [ToolParameter(Description = "The file name or full path to export to. If only filename is provided, uses the output directory.")] string filePath, [ToolParameter(Description = "The format: PPTX, PPTM, POTM, POTX, MD (default: PPTX)")] string format = "PPTX")
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentId | The ID of the presentation to export. |
| System.String | filePath | The file path where the presentation should be saved. |
| System.String | format | The export format (PPTX, PPTM, POTM, POTX, MD). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result containing the export file path. |
GetAllPresentations()
Retrieves all presentation document IDs currently in memory.
Declaration
[Tool(Name = "GetAllPresentations", Description = "Returns all documentid of the PowerPoint presentation instances that are available in main memory.")]
public AgentToolResult GetAllPresentations()
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result containing array of all presentation document IDs. |
RemovePresentation(String)
Removes a specific presentation from memory by its ID.
Declaration
[Tool(Name = "RemovePresentation", Description = "Removes a specific PowerPoint presentation from memory by ID.")]
public AgentToolResult RemovePresentation([ToolParameter(Description = "The ID of the presentation to remove")] string documentId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentId | The ID of the presentation to remove. |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating whether the presentation was removed successfully. |
SetActivePresentation(String)
Sets the active presentation context by ID.
Declaration
[Tool(Name = "SetActivePresentation", Description = "Changes the active PowerPoint presentation context by ID.")]
public AgentToolResult SetActivePresentation([ToolParameter(Description = "The ID of the presentation to set as active")] string documentId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentId | The ID of the presentation to set as active. |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating success or failure. |