get_document_info

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Conversion MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-conversion -- dnx GroupDocs.Conversion.Mcp --yes
Folders, licensing and more →

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.”