Convert and Merge Tools
ConvertDocumentsAgentTool
The ConvertDocumentsAgentTool class provides an agent‑tool wrapper around Telerik’s document conversion engine, enabling automated file conversions within AI‑driven workflows. Typical use cases include converting DOCX → PDF or XLSX → CSV.
Learn how to integrate the Agent Tools in your application: Getting Started with DPL Agent Tools.
| Tool | Signature | Description |
|---|---|---|
| ConvertDocument | CallToolResult ConvertDocument(
FileDescriptor sourceFile,
FileDescriptor destinationFile) |
Performs format transformations or direct copies of supported file types. |
Supported Formats
The tool handles conversions for the following file types:
- Flow documents: .docx, .doc (import only), .rtf, .html
- Fixed documents: .pdf
- Spreadsheet documents: .xlsx, .xls, .xlsm, .csv
- Text documents: .txt
The Telerik Document Processing libraries provide converting from one document format to another that is valid and compatible with the input format. See: Supported Formats.
MergeDocumentsAgentTool
MergeDocumentsAgentTool is an agent tool designed to merge multiple documents of varying formats into a single combined output file. It acts as a wrapper around Telerik’s internal MergeDocumentsTool, exposing a tool-enabled method suitable for AI‑driven workflows using Agent Tools. This class supports merging files directly from the file system, avoiding the use of any document import utilities, and maintains a consistent output directory location.
| Tool | Signature | Description |
|---|---|---|
| MergeDocuments | CallToolResult MergeDocuments(
FileDescriptor[] sourceFilePaths,
FileDescriptor destinationFilePath) |
Merges multiple source files—specified by their disk paths and formats—into a single destination document. |