How to extract data from a folder of documents at once

Extraction is rarely about one file. It is about the folder that arrived this morning.

Note
The commands and config snippets on this page are for the .NET build of the server, which ships as a Docker image only. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

Setup

Mount the folder into the container as /data and point GROUPDOCS_MCP_STORAGE_PATH at it (configuration). Files are resolved by name, so the agent passes invoice-014.pdf, not a host path.

The prompt

For every PDF in my documents folder: extract the tables as JSON, total the amount column, and give me one table of file name → total → page count.

The agent loops, calls extract_tables and get_document_info per file, and assembles the result.

Triage first on a mixed folder

Not every file will cooperate. One cheap pass up front tells you what you are dealing with:

First, for each file, report format, page count, and whether text extraction returns anything. Then extract only from the ones that do.

The files that return nothing are scans — handle them with extract_barcodes or set them aside.

Keep the run honest and affordable

  • Ask for failures explicitly. A password-protected or corrupt file fails its own call; a batch that reports only successes hides them.
  • Restrict by page where the data has a known location — the first page of each invoice, say.
  • Avoid extract_images in bulk unless you want the images: it writes files per image, and a folder of illustrated reports produces hundreds.
  • Watch metered usage. Under metered licensing every call is billed processing; a targeted sweep costs less than an exhaustive one.
  • Check the licence first. Unlicensed extraction is limited, and a partial read across a whole folder is a quietly wrong dataset — get_license_status.

Where the results go next

The agent holds structured data at this point, so the useful follow-ups are ordinary questions:

Which three invoices have the highest totals? Which files have no barcode at all? Write the totals to a CSV in the output folder.

All of it from documents that never left the machine — architecture.