Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ private static string BuildSystemMessage(string inputDir, string outputDir) => $
4. **Operate** — Pass the returned document ID to all subsequent tool calls.
Never guess or hard-code IDs; always use the value from step 1.
5. **Export/Save** — Call the matching export tool with the document ID:
• Word: ExportDocument | Excel: ExportWorkbook | PDF: ExportPDFDocument | PowerPoint: ExportPresentation
• Word: ExportDocument | Excel: ExportWorkbook | PDF: ExportPdfDocument | PowerPoint: ExportPresentation
Always export as the final step unless explicitly told not to save.

**CROSS-FORMAT CONVERSION:**
For Office-to-PDF: Load source → call ConvertToPDF with document ID and sourceType
("Word", "Excel", "PowerPoint") → export the returned PDF document ID with ExportPDFDocument.
("Word", "Excel", "PowerPoint") → export the returned PDF document ID with ExportPdfDocument.
For Office-to-Office: Load source → export with desired format/extension (tools handle mapping).

**DATA EXTRACTION:**
Expand Down
4 changes: 2 additions & 2 deletions Document-Processing/ai-agent-tools/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ Provides core life cycle operations for PDF documents - creating, loading, expor
| Tool | Syntax | Description |
|---|---|---|
| CreatePdfDocument | CreatePdfDocument(<br/>string? filePath = null,<br/>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(<br/>string documentId,<br/>string filePath) | Exports a PDF document from memory to the specified file path on the file system. |
| GetPdfDocuments | GetPdfDocuments() | Returns all PDF document IDs currently available in memory. |
| ExportPdfDocument | ExportPdfDocument(<br/>string documentId,<br/>string filePath) | Exports a PDF document from memory to the specified file path on the file system. |
| RemovePdfDocument | RemovePdfDocument(<br/>string documentId) | Removes a specific PDF document from memory by its ID. |
| SetActivePdfDocument | SetActivePdfDocument(<br/>string documentId) | Changes the active PDF document context to the specified document ID. |

Expand Down