get_document_info

get_document_info returns the file type, page count, and basic properties (author, title, dates, password-protected flag) of a document — without converting it. Example prompt: “How many pages does contract.pdf have?”

Tool description (as the AI agent sees it):

Returns file type, page count, and basic properties (author, title, dates, password-protected) for a source document. Call this tool immediately whenever the user asks to inspect a document, get document info, check file type, page count, or properties. Do NOT pre-check whether files exist — just pass the filename the user provided. The tool resolves files from storage and returns an error with available files if a name is not found.

Parameters

NameTypeRequiredDescription
fileobjectyesThe source document — FileInput shape

Example call

{
  "name": "get_document_info",
  "arguments": { "file": { "filePath": "contract.pdf" } }
}

Result

A JSON object with the file type, page count, size, and basic properties. Agents use it to answer inspection questions and to sanity-check documents before batch operations (“check the page count first, then convert”).

Example prompts

  • “How many pages does contract.pdf have, and what format is it?”
  • “Is presentation.pptx password-protected?”
  • “Show me the properties of report.docx.”