Syncfusion AI Assistant

How can I help you?

Syncfusion Document SDK AI Agent Tools

12 May 202624 minutes to read

Agent Tools are the callable functions exposed to the AI agent. Each tool class is initialized with the appropriate manager.

Agent tools support two operational modes that determine how documents are handled during AI agent execution. In‑memory mode enables live, in‑memory document processing, while Document Storage mode supports persistent, storage‑backed document handling.

The operational mode is determined by the manager used when initializing the tool.

Tools are organized into the following categories:

Category Tool Classes
PDF PdfDocumentAgentTools,
PdfOperationsAgentTools,
PdfSecurityAgentTools,
PdfContentExtractionAgentTools,
PdfAnnotationAgentTools,
PdfConverterAgentTools,
PdfOcrAgentTools
Word WordDocumentAgentTools,
WordOperationsAgentTools,
WordSecurityAgentTools,
WordMailMergeAgentTools,
WordFindAndReplaceAgentTools,
WordRevisionAgentTools,
WordImportExportAgentTools,
WordFormFieldAgentTools,
WordBookmarkAgentTools
Excel ExcelWorkbookAgentTools,
ExcelWorksheetAgentTools,
ExcelSecurityAgentTools,
ExcelFormulaAgentTools,
ExcelChartAgentTools,
ExcelConditionalFormattingAgentTools,
ExcelConversionAgentTools,
ExcelDataValidationAgentTools,
ExcelPivotTableAgentTools
PowerPoint PresentationDocumentAgentTools,
PresentationOperationsAgentTools,
PresentationSecurityAgentTools,
PresentationContentAgentTools,
PresentationFindAndReplaceAgentTools
Conversion OfficeToPdfAgentTools
Data Extraction DataExtractionAgentTools

Document Managers

Document Managers are in-memory containers that manage document life cycles during AI agent operations. They provide common functionality including document creation, import/export, active document tracking, and automatic expiration-based cleanup.

Available Document Managers

Document Manager Description
WordDocumentManager Manages Word documents in memory. Supports .docx, .doc, .rtf, .html, and .txt formats with auto-detection on import.
ExcelWorkbookManager Manages Excel workbooks in memory. Owns an ExcelEngine instance and implements IDisposable for proper resource cleanup. Supports .xlsx, .xls, .xlsm, and .csv on export.
PdfDocumentManager Manages PDF documents in memory. Supports both new PdfDocument instances and loaded PdfLoadedDocument instances, including password-protected files.
PresentationManager Manages PowerPoint presentations in memory. Supports creating new empty presentations and loading existing .pptx files, including password-protected ones.

DocumentManagerCollection

DocumentManagerCollection is a centralized registry that holds one document manager for each DocumentType. It is designed for tool classes that need to work across multiple document types within a single operation - specifically when the source and output documents belong to different document managers.

Why it is needed: Consider a Word-to-PDF conversion. The source Word document lives in WordDocumentManager, but the resulting PDF must be stored in PdfDocumentManager. Rather than hard coding both document managers into the tool class, OfficeToPdfAgentTools accepts a DocumentManagerCollection and detects the correct manager dynamically at runtime based on the sourceType argument.

Note: Tools that operate on a single document type (e.g., WordDocumentAgentTools, PdfAnnotationAgentTools) are initialized directly with their own manager. Only cross-format tools such as OfficeToPdfAgentTools require a DocumentManagerCollection.

Document Storage Manager

Document Storage Manager reads documents from and writes them back to storage (such as Azure Blob Storage, S3, or local disk) on each tool invocation; no in‑memory objects are maintained, so every tool call opens and saves document instances, making this mode well suited for web APIs and applications that require horizontal scaling, support large documents, or need state persistence across sessions.

PDF Tools

PdfDocumentAgentTools

Provides core life cycle operations for PDF documents - creating, loading, exporting, and managing PDF documents in memory.

Tool Syntax Description
CreatePdfDocument CreatePdfDocument(
string? filePath = null,
string? password = null)
Creates a new PDF document in memory or loads an existing one from a file path. Returns the documentId.
GetAllPDFDocuments GetAllPDFDocuments() Returns all PDF document IDs currently available in memory.
ExportPDFDocument ExportPDFDocument(
string documentId,
string filePath)
Exports a PDF document from memory to the specified file path on the file system.
RemovePdfDocument RemovePdfDocument(
string documentId)
Removes a specific PDF document from memory by its ID.
SetActivePdfDocument SetActivePdfDocument(
string documentId)
Changes the active PDF document context to the specified document ID.

PdfOperationsAgentTools

Provides merge, split, and compression operations for PDF documents.

Tool Syntax Description
MergePdfs MergePdfs(
List<PdfFileInput> pdfFiles,
bool mergeAccessibilityTags = false,
string? outputFilePath = null)
Merges multiple PDF files into a single PDF document.
SplitPdf SplitPdf(
string documentIdOrFilePath,
int[][]? pageRanges = null,
string outputFilePattern = “Output{0}.pdf”,
string? outputFolderPath = null)
Splits a PDF document into individual pages or by specified page ranges.
CompressPdf CompressPdf(
string documentIdOrFilePath,
bool compressImages = true,
int imageQuality = 50,
bool optimizeFont = true,
bool optimizePageContents = true,
bool removeMetadata = true,
string? outputFilePath = null)
Compresses a PDF by optimizing images, fonts, page contents, and optionally removing metadata.
ReorderPdfPages ReorderPdfPages(
string documentIdOrFilePath,
int[] orderIndexes,
string? outputFilePath = null)
Rearranges PDF pages using a zero-based page index sequence. Get the PDF page count first and ensure the index array length matches it.

PdfSecurityAgentTools

Provides encryption, decryption, permissions management, digital signing, and redaction capabilities for PDF documents.

Tool Syntax Description
EncryptPdf EncryptPdf(
string documentIdOrFilePath,
string password,
string encryptionAlgorithm = “AES”,
string keySize = “256”,
string? outputFilePath = null)
Protects a PDF document with a user password and applies the specified encryption algorithm and key size.
DecryptPdf DecryptPdf(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Removes encryption from a password-protected PDF document by clearing its security passwords and permissions. password is required for protected files.
SetPermissions SetPermissions(
string documentIdOrFilePath,
PermissionsRequest permissions,
string? password = null,
string? outputFilePath = null)
Sets document permissions on a PDF such as print, copy, edit content, and more. Permissions are specified as a comma-separated string of flag names.
RemovePermissions RemovePermissions(
string documentIdOrFilePath,
string? password = null,
string? outputFilePath = null)
Removes all document permissions from a PDF by resetting them to the default (unrestricted) state.
SignPdf SignPdf(
string documentIdOrFilePath,
string certificateFilePath,
string certificatePassword,
RectangleF bounds,
int pageIndex = 0,
string? appearanceImagePath = null,
string? outputFilePath = null)
Digitally signs a PDF document using a PFX certificate and places the signature within the specified bounds. An optional appearance image can be provided for the visible signature.
RedactPdf RedactPdf(
string documentIdOrFilePath,
RedactionRequest redaction,
string? outputFilePath = null)
Redacts rectangular regions from an existing PDF document by permanently removing sensitive content and filling the areas with the specified color. redaction contains redaction items (page index, bounds, optional color).

PdfContentExtractionAgentTools

Provides tools for extracting text, images, and searching for text content in PDF documents.

Tool Syntax Description
ExtractText ExtractText(
string documentIdOrFilePath,
int startPageIndex = -1,
int endPageIndex = -1)
Extracts text content from a PDF document across a specified page range, or from all pages if no range is given.
ExtractImages ExtractImages(
string documentIdOrFilePath,
int startPageIndex = -1,
int endPageIndex = -1,
string? outputPath = null)
Extracts images from a PDF document across a specified page range or the entire document and saves them to the specified output folder.
FindTextInPdf FindTextInPdf(
string documentIdOrFilePath,
string[] text)
Searches a PDF document for matching array of text and returns all occurrences grouped by page with their bounding rectangle positions.
GetPdfDocumentPageCount GetPdfDocumentPageCount(
string documentIdOrFilePath)
Returns the number of pages in the specified PDF document.
GetPdfDocumentPageSize GetPdfDocumentPageSize(
string documentIdOrFilePath,
int pageNumber)
Gets the width and height of a specific page in a PDF document.

PdfAnnotationAgentTools

Provides tools for watermarking, managing annotations, and importing/exporting form field data in PDF documents.

Tool Syntax Description
WatermarkPdf WatermarkPdf(
string documentIdOrFilePath,
string watermarkText,
int? rotation = null,
float locationX = -1,
float locationY = -1,
byte[]? watermarkColor = null,
float opacity = 50f,
string? outputFilePath = null)
Applies a configurable text watermark to all pages of a PDF document. Supports opacity, rotation, color, and custom positioning.
ExportAnnotations ExportAnnotations(
string documentIdOrFilePath,
AnnotationDataFormat format,
string? exportFilePath = null)
Exports annotations from a PDF document into XFDF, FDF, or JSON format. Returns annotation data or export file path.
ImportAnnotations ImportAnnotations(
string documentIdOrFilePath,
AnnotationDataFormat format,
string importFilePath,
string? outputFilePath = null)
Imports annotations into a PDF document from XFDF, FDF, or JSON format.
ExportFormFields ExportFormFields(
string documentIdOrFilePath,
DataFormat format,
string? exportPath = null)
Exports form field data from a PDF document into FDF, XFDF, or XML format. Returns form field data or export file path.
ImportFormFields ImportFormFields(
string documentIdOrFilePath,
DataFormat format,
string? sourcePdfPath = null,
string? outputFilePath = null)
Imports form field data into a PDF document from FDF, XFDF, or XML format.

PdfConverterAgentTools

Provides tools to convert PDF and image files to PDF.

Tool Syntax Description
ConvertPdfToPdfA ConvertPdfToPdfA(
string documentIdOrFilePath,
PdfConformanceLevel conformanceLevel,
string? outputFilePath = null)
Converts an existing PDF document to a PDF/A-compliant format. Supported conformance levels: PdfA1B, PdfA2B, PdfA3B, Pdf_A4, Pdf_A4F, Pdf_A4E.
ImageToPdf ImageToPdf(
string[] imageFiles,
PdfImagePosition imagePosition = null,
int pageWidth = 612,
int pageHeight = 792,
string? outputFilePath = null)
Creates a PDF document from one or more image files with control over image placement and page size. imagePosition values: Stretch, Center, FitToPage.

PdfOcrAgentTools

Provides tools to perform Optical Character Recognition (OCR) on PDF documents.

Tool Syntax Description
OcrPdf OcrPdf(
string documentIdOrFilePath,
string? dataPath = null,
string language = “eng”,
string? outputFilePath = null)
Performs Optical Character Recognition (OCR) on a PDF document to make scanned or image-based text selectable and searchable. dataPath is required when using non-English languages (path to Tesseract tessdata folder). Supported language codes: eng (English), etc.

Word Tools

WordDocumentAgentTools

Provides core life cycle operations for Word documents - creating, loading, exporting, and managing Word documents in memory.

Tool Syntax Description
CreateDocument CreateDocument(
string? filePath = null,
string? password = null)
Creates a new Word document in memory or loads an existing one from a file path. Returns the documentId.
GetAllDocuments GetAllDocuments() Returns all Word document IDs currently available in memory.
ExportDocument ExportDocument(
string documentId,
string filePath,
string? formatType = “Docx”)
Exports a Word document to the file system. Supported formats: Docx, Doc, Rtf, Html, Txt.
RemoveDocument RemoveDocument(
string documentId)
Removes a specific Word document from memory by its ID.
SetActiveDocument SetActiveDocument(
string documentId)
Changes the active Word document context to the specified document ID.

WordOperationsAgentTools

Provides merge, split, compare, clone, field management, and table of contents operations for Word documents.

Tool Syntax Description
MergeDocuments MergeDocuments(
string destinationDocumentIdOrFilePath,
string[] documentIdsOrFilePaths,
string pasteOption = “UseDestinationStyles”,
string? outputFilePath = null)
Merges multiple Word documents into a single destination document.
SplitDocument SplitDocument(
string documentIdOrFilePath,
string splitRules = “SplitBySection”,
string placeholderText = “«(.*)»”,
string? outputFilePath = null)
Splits a single Word document into multiple documents based on the specified splitRules.
CompareDocuments CompareDocuments(
string originalDocumentIdOrFilePath,
string revisedDocumentIdOrFilePath,
string author = “Author”,
DateTime dateTime = default,
string? outputFilePath = null)
Compares the original document with the revised document and marks differences as tracked changes in the original document.
CloneDocument CloneDocument(
string documentIdOrFilePath,
string? outputFilePath = null)
Creates a deep copy of a Word document and stores it in memory. Useful for duplicating templates before making changes.
UpdateDocumentFields UpdateDocumentFields(
string documentIdOrFilePath,
bool updatePageFields = false,
string? outputFilePath = null)
Updates all fields (DATE, TIME, DOCVARIABLE, IF, SEQ, etc.) present in a Word document.
UnlinkDocumentFields UnlinkDocumentFields(
string documentIdOrFilePath,
string? outputFilePath = null)
Unlinks all fields in a Word document by replacing each field with its current result as static text.
UpdateTableOfContents UpdateTableOfContents(
string documentIdOrFilePath,
string? outputFilePath = null)
Updates (rebuilds) the Table of Contents in a Word document based on current heading styles and page layout.

WordSecurityAgentTools

Provides password protection, encryption, and decryption for Word documents.

Tool Syntax Description
ProtectDocument ProtectDocument(
string documentIdOrFilePath,
string password,
string protectionType,
string? outputFilePath = null)
Protects a Word document with a password and protection type (e.g.,AllowOnlyReading).
EncryptDocument EncryptDocument(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Encrypts a Word document with a password.
UnprotectDocument UnprotectDocument(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Removes protection from a Word document using the provided password.
DecryptDocument DecryptDocument(
string documentIdOrFilePath,
string? password,
string? outputFilePath = null)
Removes encryption from a Word document. The document must be loaded with the correct password first.

WordMailMergeAgentTools

Provides mail merge operations for populating Word document templates with structured data.

Tool Syntax Description
ExecuteMailMerge ExecuteMailMerge(
string documentIdOrFilePath,
string dataSourceJson,
bool removeEmptyParagraphs = true,
bool clearFields = true,
string? outputFilePath = null)
Executes mail merge using JSON data.
ExecuteGroupMailMerge ExecuteGroupMailMerge(
string documentIdOrFilePath,
string dataTableJson,
string groupName = “”,
bool removeEmptyFields = true,
bool removeEmptyGroup = true,
bool clearFields = true,
bool removeEmptyParagraphs = true,
bool startAtNewPage = false,
string? outputFilePath = null)
Executes group mail merge using JSON data. Requires groupName for array JSON.
ExecuteNestedGroupMailMerge ExecuteNestedGroupMailMerge(
string documentIdOrFilePath,
string dataTableJson,
string groupName = “”,
bool removeEmptyFields = true,
bool removeEmptyGroup = true,
bool clearFields = true,
bool removeEmptyParagraphs = true,
bool startAtNewPage = false,
string? outputFilePath = null)
Executes a nested group mail merge operation in the Word document using a DataTable.

WordFindAndReplaceAgentTools

Provides text search and replacement operations within Word documents.

Tool Syntax Description
FindAndReplace FindAndReplace(
string documentIdOrFilePath,
string[] findTexts,
string[] replaceTexts,
bool matchCase = false,
bool wholeWord = false,
bool replaceFirst = false,
string? outputFilePath = null)
Finds all occurrences of one or more texts and replaces them in a single pass. Supports arrays to replace multiple placeholders at once.
FindAndReplaceWithRegex FindAndReplaceWithRegex(
string documentIdOrFilePath,
string findWhat,
string replaceText,
bool replaceFirst = false,
string? outputFilePath = null)
Finds and replaces first occurrence of the specified pattern in the Word document. Returns a count of replaced text.

WordRevisionAgentTools

Provides tools to inspect and manage tracked changes (revisions) in Word documents.

Tool Syntax Description
AcceptRevisionsByAuthor AcceptRevisionsByAuthor(
string documentIdOrFilePath,
string author,
string? outputFilePath = null)
Accepts all revisions made by a specific author.
RejectRevision RejectRevision(
string documentIdOrFilePath,
string author,
string? outputFilePath = null)
Rejects all revisions made by a specific author.
AcceptAllRevisions AcceptAllRevisions(
string documentIdOrFilePath,
string? outputFilePath = null)
Accepts all revisions in the document and returns count.
RejectAllRevisions RejectAllRevisions(
string documentIdOrFilePath,
string? outputFilePath = null)
Rejects all revisions in the document and returns count.

WordImportExportAgentTools

Provides tools to import from and export Word documents to HTML and Markdown and Image formats.

Tool Syntax Description
ImportHtml ImportHtml(
string htmlContentOrFilePath,
string? documentIdOrFilePath = null,
string? outputFilePath = null)
Imports HTML content into a Word document.
ImportMarkdown ImportMarkdown(
string markdownContentOrFilePath,
string? documentIdOrFilePath = null,
string? outputFilePath = null)
Imports Markdown content into a Word document.
GetHtml GetHtml(
string documentIdOrFilePath)
Returns the document content as HTML.
GetMarkdown GetMarkdown(
string documentIdOrFilePath)
Returns the document content as Markdown.
GetText GetText(
string documentIdOrFilePath)
Returns the document content as plain text.
ConvertDocument ConvertDocument(
string documentIdOrFilePath,
string filePath,
string? formatType = “Docx”)
Converts the document to the specified format and saves to the given file path. Supported formats: Docx, Doc, Rtf, Html, Txt.
ExportAsImage ExportAsImage(
string documentIdOrFilePath,
string? imageFormat = “Png”,
int? startPageIndex = null,
int? endPageIndex = null,
string outputDirectory = “.”)
Exports document pages as images (PNG or JPEG) to the output directory.

WordFormFieldAgentTools

Provides tools to read and write form field values in Word documents.

Tool Syntax Description
GetFormData GetFormData(
string documentIdOrFilePath)
Retrieves all form field data as a dictionary.
SetFormFields SetFormFields(
string documentIdOrFilePath,
string dataJson,
string? outputFilePath = null)
Sets form field values from a single JSON object; call once with all fields.
GetFormField GetFormField(
string documentIdOrFilePath,
string fieldName)
Gets a specific form field value by name.

WordBookmarkAgentTools

Provides tools to manage bookmarks and bookmark content within Word documents.

Tool Syntax Description
GetBookmarks GetBookmarks(
string documentIdOrFilePath)
Gets all bookmark names from the document.
GetContent GetContent(
string documentIdOrFilePath,
string bookmarkName)
Gets content from the bookmark and creates a new document.
ReplaceContent ReplaceContent(
string documentIdOrFilePath,
string bookmarkName,
string replaceDocumentIdOrFilePath,
string? outputFilePath = null)
Replaces the existing bookmark content with content from another document.
RemoveContent RemoveContent(
string documentIdOrFilePath,
string bookmarkName,
string? outputFilePath = null)
Removes the content of the specified bookmark.
RemoveBookmark RemoveBookmark(
string documentIdOrFilePath,
string bookmarkName,
string? outputFilePath = null)
Removes the specified bookmark from the document.

Excel Tools

ExcelWorkbookAgentTools

Provides core life cycle operations for Excel workbooks - creating, loading, exporting, and managing workbooks in memory.

Tool Syntax Description
CreateWorkbook CreateWorkbook(
string? filePath = null,
string? password = null)
Creates a new Excel workbook in memory or loads an existing one from a file path. Returns the workbookId.
GetAllWorkbooks GetAllWorkbooks() Returns all Excel workbook IDs currently available in memory.
ExportWorkbook ExportWorkbook(
string workbookId,
string filePath,
string version = “XLSX”)
Exports an Excel workbook to the file system. Supported formats: XLS, XLSX, XLSM, CSV.
RemoveWorkbook RemoveWorkbook(
string workbookId)
Removes a specific workbook from memory by its ID.
SetActiveWorkbook SetActiveWorkbook(
string workbookId)
Changes the active workbook context to the specified workbook ID.

ExcelWorksheetAgentTools

Provides tools to create, manage, and populate worksheets within Excel workbooks.

Tool Syntax Description
CreateWorksheet CreateWorksheet(
string workbookIdOrFilePath,
string? sheetName = null,
string? outputFilePath = null)
Creates a new worksheet inside the specified workbook.
DeleteWorksheet DeleteWorksheet(
string workbookIdOrFilePath,
string worksheetName,
string? outputFilePath = null)
Deletes a worksheet from the workbook.

ExcelSecurityAgentTools

Provides encryption, decryption, and protection management for Excel workbooks and worksheets.

Tool Syntax Description
EncryptWorkbook EncryptWorkbook(
string workbookIdOrFilePath,
string password,
string? outputFilePath = null)
Encrypts an Excel workbook with a password.
DecryptWorkbook DecryptWorkbook(
string workbookIdOrFilePath,
string password,
string? outputFilePath = null)
Removes encryption from an Excel workbook using the provided password.
ProtectWorkbook ProtectWorkbook(
string workbookIdOrFilePath,
string password,
string? outputFilePath = null)
Protects the workbook structure (sheets) with a password.
UnprotectWorkbook UnprotectWorkbook(
string workbookIdOrFilePath,
string password,
string? outputFilePath = null)
Removes workbook structure protection.
ProtectWorksheet ProtectWorksheet(
string workbookIdOrFilePath,
string worksheetName,
string password,
string? outputFilePath = null)
Protects a specific worksheet from editing using a password.
UnprotectWorksheet UnprotectWorksheet(
string workbookIdOrFilePath,
string worksheetName,
string password,
string? outputFilePath = null)
Removes protection from a specific worksheet.

ExcelChartAgentTools

Provides tools to create modify and remove charts in excel workbooks

Tool Syntax Description
CreateChart CreateChart(
string workbookIdOrFilePath,
string worksheetName,
string chartType,
string dataRange,
bool isSeriesInRows = false,
int topRow = 8,
int leftColumn = 1,
int bottomRow = 23,
int rightColumn = 8,
string? outputFilePath = null)
Creates a chart from a data range in the worksheet. Supports many chart types (e.g., Column_Clustered, Line, Pie, Bar_Clustered). Returns the chart index.
CreateChartWithSeries CreateChartWithSeries(
string workbookIdOrFilePath,
string worksheetName,
string chartType,
string seriesName,
string valuesRange,
string categoryLabelsRange,
int topRow = 8,
int leftColumn = 1,
int bottomRow = 23,
int rightColumn = 8,
string? outputFilePath = null)
Creates a chart and adds a named series with values and category labels. Returns the chart index.
AddSeriesToChart AddSeriesToChart(
string workbookIdOrFilePath,
string worksheetName,
int chartIndex,
string seriesName,
string valuesRange,
string categoryLabelsRange = “”,
string? outputFilePath = null)
Adds a new series to an existing chart.
SetChartElement SetChartElement(
string workbookIdOrFilePath,
string worksheetName,
int chartIndex,
int seriesIndex,
string title,
bool hasLegend,
string position = “Bottom”,
bool showValue = true,
bool showCategoryName = false,
bool showSeriesName = false,
string dataLabelPosition = “Outside”,
string? categoryAxisTitle = null,
string? valueAxisTitle = null,
string? outputFilePath = null)
Sets chart elements including title, legend, data labels, and axis titles. position (legend): Bottom, Top, Left, Right, Corner. dataLabelPosition: Outside, Inside, Center, etc.

ExcelConditionalFormattingAgentTools

Provides tools to add or remove conditional formatting in workbook

Tool Syntax Description
AddConditionalFormat AddConditionalFormat(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string formatType,
string? operatorType = null,
string? firstFormula = null,
string? secondFormula = null,
string? backColor = null,
bool? isBold = null,
bool? isItalic = null,
string? outputFilePath = null)
Adds conditional formatting to a cell or range. formatType values: CellValue, Formula, DataBar, ColorScale, IconSet.

ExcelConversionAgentTools

Provides tools to convert worksheet to image, HTML, ODS, JSON file formats

Tool Syntax Description
ConvertWorksheetToImage ConvertWorksheetToImage(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string outputPath,
string imageFormat = “PNG”,
string scalingMode = “Best”)
Converts an entire worksheet to an image file. Supports PNG, JPEG, BMP, GIF, and TIFF formats.
ConvertChartToImage ConvertChartToImage(
string workbookIdOrFilePath,
string worksheetName,
int chartIndex,
string outputPath,
string imageFormat = “PNG”,
string scalingMode = “Best”)
Converts an Excel chart to an image file. Supports PNG and JPEG formats.
ConvertWorkbook ConvertWorkbook(
string workbookIdOrFilePath,
string outputPath,
string? formatType = “xlsx”)
Converts the workbook to the file system in the specified format. Works only in DocumentStorage mode. workbookIdOrFilePath: The input file path from storage. Supported formats: xls, xlsx, xlsm
ConvertWorkbookToHtml ConvertWorkbookToHtml(
string workbookIdOrFilePath,
string outputPath,
string textMode = “DisplayText”)
Converts an entire Excel workbook to an HTML file with styles, hyperlinks, images, and charts preserved.
ConvertWorksheetToHtml ConvertWorksheetToHtml(
string workbookIdOrFilePath,
string worksheetName,
string outputPath,
string textMode = “DisplayText”)
Converts a specific Excel worksheet to an HTML file with styles, hyperlinks, images, and charts preserved.
ConvertWorkbookToJson ConvertWorkbookToJson(
string workbookIdOrFilePath,
string outputPath,
bool includeSchema = true)
Converts an entire workbook to JSON format with optional schema.
ConvertWorksheetToJson ConvertWorksheetToJson(
string workbookIdOrFilePath,
string worksheetName,
string outputPath,
bool includeSchema = true)
Converts a specific worksheet to JSON format with optional schema.
ConvertRangeToJson ConvertRangeToJson(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string outputPath,
bool includeSchema = true)
Converts a specific cell range to JSON format.

ExcelDataValidationAgentTools

Provides tools to add data validation to workbook

Tool Syntax Description
AddDropdownValidation AddDropdownValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string sourceRange = null,
string listValues = “”,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds a dropdown list data validation to a cell or range. List values are limited to 255 characters including separators.
AddNumberValidation AddNumberValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string numberType = “decimal”,
string comparisonOperator = “”,
string firstValue = “”,
string? secondValue = null,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds number validation to a cell or range with specified comparison operator and values.
AddDateValidation AddDateValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string comparisonOperator,
string firstDate,
string? secondDate = null,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds date validation to a cell or range with specified comparison operator and dates.
AddTimeValidation AddTimeValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string comparisonOperator,
string firstTime,
string? secondTime = null,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds time validation to a cell or range with specified comparison operator and time values. Use 24-hour format like 10:00 or 18:30.
AddTextLengthValidation AddTextLengthValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string comparisonOperator,
string firstLength,
string? secondLength = null,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds text length validation to a cell or range with specified comparison operator and length values.
AddCustomValidation AddCustomValidation(
string workbookIdOrFilePath,
string worksheetName,
string rangeAddress,
string formula,
bool showErrorBox = true,
string? errorTitle = null,
string? errorMessage = null,
bool showPromptBox = false,
string? promptMessage = null,
string? outputFilePath = null)
Adds custom formula-based validation to a cell or range.

ExcelPivotTableAgentTools

Provides tools to create, edit pivot table in workbook

Tool Syntax Description
CreatePivotTable CreatePivotTable(
string workbookIdOrFilePath,
string dataWorksheetName,
string dataRange,
string pivotWorksheetName,
string pivotTableName,
string pivotLocation,
string rowFieldIndices,
string columnFieldIndices,
int dataFieldIndex,
string dataFieldCaption,
string builtInStyle = “None”,
string subtotalType = “Sum”,
string? outputFilePath = null)
Creates a pivot table in the specified worksheet using a data range from a source worksheet. Supports row, column, and data (values) fields with a chosen aggregation function. builtInStyle options: PivotStyleLight1-28, PivotStyleMedium1-28, PivotStyleDark1-28, or None. subtotalType options: Sum, Count, Average, Max, Min, Product, CountNums, StdDev, StdDevP, Var, VarP. Only supported in XLSX format.

PowerPoint Tools

PresentationDocumentAgentTools

Provides core life cycle operations for PowerPoint presentations - creating, loading, exporting, and managing presentations in memory.

Tool Syntax Description
LoadPresentation LoadPresentation(
string? filePath = null,
string? password = null)
Creates an empty presentation in memory or loads an existing one from a file path. Returns the documentId.
GetAllPresentations GetAllPresentations() Returns all presentation IDs currently available in memory.
ExportPresentation ExportPresentation(
string documentId,
string filePath,
string format = “PPTX”)
Exports a PowerPoint presentation to the file system.
RemovePresentation RemovePresentation(
string documentId)
Removes a specific presentation from memory by its ID.
SetActivePresentation SetActivePresentation(
string documentId)
Changes the active presentation context to the specified document ID.

PresentationOperationsAgentTools

Provides merge and split and export as image operations for PowerPoint presentations.

Tool Syntax Description
MergePresentations MergePresentations(
string documentIdOrFilePath ,
string sourceDocumentIds,
string pasteOption = “SourceFormatting”,
string? outputFilePath = null)
Merges multiple presentations into a destination presentation.
SplitPresentation SplitPresentation(
string documentIdOrFilePath,
string splitRules,
string pasteOption = “SourceFormatting”,
string? outputFilePath = null)
Splits a presentation by sections, layout type, or slide numbers (e.g., "1,3,5").
ExportAsImage ExportAsImage(
string documentIdOrFilePath,
string outputDirectory,
string? imageFormat = “Png”,
int? startSlideIndex = null,
int? endSlideIndex = null)
Exports presentation slides as PNG or JPEG images to the output directory.

PresentationSecurityAgentTools

Provides password protection and encryption management for PowerPoint presentations.

Tool Syntax Description
ProtectPresentation ProtectPresentation(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Write-protects a PowerPoint presentation with a password.
EncryptPresentation EncryptPresentation(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Encrypts a PowerPoint presentation with a password.
UnprotectPresentation UnprotectPresentation(
string documentIdOrFilePath,
string? outputFilePath = null)
Removes write protection from a presentation.
DecryptPresentation DecryptPresentation(
string documentIdOrFilePath,
string password,
string? outputFilePath = null)
Removes encryption from a presentation.

PresentationContentAgentTools

Provides tools for reading content and metadata from PowerPoint presentations.

Tool Syntax Description
GetText GetText(
string? documentIdOrFilePath)
Extracts all text content from a presentation.
GetSlideCount GetSlideCount(
string documentIdOrFilePath)
Returns the number of slides in the presentation.

PresentationFindAndReplaceAgentTools

Provides text search and replacement across all slides in a PowerPoint presentation.

Tool Syntax Description
FindAndReplace FindAndReplace(
string documentIdOrFilePath,
string[] findTexts,
string[] replaceTexts,
bool matchCase = false,
bool wholeWord = false,
string? outputFilePath = null)
Finds and replaces all occurrences of the specified text across all slides in the presentation.
FindAndReplaceByPattern FindAndReplaceByPattern(
string documentIdOrFilePath,
string regexPattern,
string replaceText,
string? outputFilePath = null)
Finds and replaces text that matches a regex pattern across all slides (e.g., {[A-Za-z]+}).

PDF Conversion Tools

OfficeToPdfAgentTools

Provides conversion of Word, Excel, and PowerPoint documents to PDF format.

Tool Syntax Description
ConvertToPDF ConvertToPDF(
string sourceDocumentIdOrFilePath,
string sourceType,
string? outputFilePath = null)
Converts a Word, Excel, or PowerPoint document to PDF. sourceType must be Word, Excel, or PowerPoint.

Data Extraction Tools

DataExtractionAgentTools

Provides AI-powered structured data extraction from PDF documents and images, returning results as JSON.

Tool Syntax Description
ExtractDataAsJSON ExtractDataAsJSON(
string inputFilePath,
bool enableFormDetection = true,
bool enableTableDetection = true,
double confidenceThreshold = 0.6,
int startPage = -1,
int endPage = -1,
bool detectSignatures = true,
bool detectTextboxes = true,
bool detectCheckboxes = true,
bool detectRadioButtons = true,
bool detect_Border_less_Tables = true,
string? outputFilePath = null)
Extracts structured data (text, forms, tables, checkboxes, signatures) from a PDF or image file and returns the result as JSON.
ExtractTableAsJSON ExtractTableAsJSON(
string inputFilePath,
bool detect_Border_less_Tables = true,
double confidenceThreshold = 0.6,
int startPage = -1,
int endPage = -1,
string? outputFilePath = null)
Extracts only table data from a PDF document and returns the result as JSON. Optimized for table-focused extraction.
RecognizeFormAsJson RecognizeFormAsJson(
string inputFilePath,
bool detectSignatures = true,
bool detectTextboxes = true,
bool detectCheckboxes = true,
bool detectRadioButtons = true,
double confidenceThreshold = 0.6,
int startPage = -1,
int endPage = -1,
string? outputFilePath = null)
Extracts only form field data from a PDF document and returns as JSON. Optimized for form-focused recognition.
ConvertPDFtoMarkdown ConvertPDFtoMarkdown(
string inputFilePath,
bool enableFormDetection = true,
bool enableTableDetection = true,
double confidenceThreshold = 0.6,
int startPage = -1,
int endPage = -1,
bool detectSignatures = true,
bool detectTextboxes = true,
bool detectCheckboxes = true,
bool detectRadioButtons = true,
bool detectBorderlessTables = true,
string? outputFilePath = null)
Convert PDF documents and scanned images into structured Markdown (MD) by extracting text, tables, headers, and form fields, with configurable detection and layout preservation.
ConvertPDFTableToMarkdown ConvertPDFTableToMarkdown(
string inputFilePath,
double confidenceThreshold = 0.6,
int startPage = -1,
int endPage = -1,
bool detectBorderlessTables = true,
string? outputFilePath = null)
Convert tables from PDF documents and scanned images into clean and well‑structured Markdown (MD) format by analyzing visual table structures, including bordered and border‑less tables, for accurate programmatic table extraction.

See Also