get_document_info tells the agent what it is about to edit: the format family (WordProcessing, Spreadsheet, Presentation, FixedLayout for PDF, Textual, Ebook, Email), the number of pages — worksheets for a workbook, slides for a presentation — whether it is password-protected, and which formats it can be saved to. Example prompt: “How many worksheets does budget.xlsx have?”
Tool description (as the AI agent sees it):
Inspects a document before editing it: its format family, format, number of pages (worksheets for spreadsheets, slides for presentations), size, whether it is password-protected, and which formats it can be saved to. Supports DOCX, DOC, RTF, ODT, XLSX, XLS, ODS, CSV, PPTX, PPT, ODP, PDF, TXT, HTML, XML, Markdown, EPUB, MOBI, EML, MSG and more. Call this first when the user asks how many pages, worksheets or slides a document has, or whether it can be edited. Do NOT pre-check whether files exist — just pass the filename the user provided; a missing file returns the list of available files. Returns JSON: { fileName, family, format: { name, extension, mime }, pageCount, size, isEncrypted, infoType, canEdit, canSaveTo[] }. family is one of WordProcessing, Spreadsheet, Presentation, FixedLayout, Textual, Email, Ebook. On failure isError is set and the text starts with ‘Document-info lookup failed for’; a file that cannot be found returns the list of available files instead.
{"fileName":"budget.xlsx","family":"Spreadsheet","format":{"name":"Office Open XML Workbook Macro-Free (XLSX)","extension":"xlsx","mime":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},"pageCount":3,"size":6099,"isEncrypted":false,"infoType":"SpreadsheetDocumentInfo","canEdit":true,"canSaveTo":["xlsx","xls","xlsm","xlsb","xltx","xltm","xlt","ods","csv","tsv","pdf","xps","txt","mhtml"]}
Field
Meaning
family
decides which parameters apply: worksheet for Spreadsheet, slide for Presentation, pages for FixedLayout (PDF)