How to find documents by date range, amount and file name with an AI agent

The GroupDocs.Search MCP server finds documents by dates written in them, by numbers in a range, and by words in the file name — locally, across Word, Excel, PDF and email. The one rule: put content: in front of a date range, or it also matches the files’ own dates:

docker run --rm -i -v $(pwd)/documents:/data \
  ghcr.io/groupdocs-search/search-net-mcp:latest

Which reports mention a date in Q3 2026, and which mention an amount over 100000?

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.

Prerequisites

  • The reports indexed with add_to_index.
  • Dates written as yyyy-MM-dd, MM/dd/yyyy or dd.MM.yyyy (the engine’s defaults); numbers written without separators (125000, not 125,000).

The trap, and the fix

Captured from server 26.10.1 against four reports; only the board minutes mention an October date:

-> search {"query":"daterange(2026-10-01 ~~ 2026-10-31)",
          "indexName":"reports"}
<- documentsFound 4 — every report: the engine also indexes each file's
   creation and modification dates, and the files were written in October

-> search {"query":"content: daterange(2026-10-01 ~~ 2026-10-31)",
          "indexName":"reports"}
<- documentsFound 1: reports/board-minutes-2026-10.pdf

content: restricts the range to the documents’ own text. To search by file date on purpose, name that field: modificationdate: daterange(2026-10-01 ~~ 2026-10-31).

Dates, amounts, names

-> search {"query":"content: daterange(2026-07-01 ~~ 2026-09-30)", ...}
<- documentsFound 2: capex-register-2026.xlsx, q3-operations-report.docx

-> search {"query":"content: (100000 ~~ 999999)", ...}
<- documentsFound 2:
   capex-register-2026.xlsx — terms ["230000", "410000"]
   q3-operations-report.docx — terms ["125000"]

-> search {"query":"filename: q3", ...}
<- documentsFound 1: reports/q3-operations-report.docx

-> search {"query":"warehouse AND content: (100000 ~~ 999999)", ...}
<- documentsFound 2: capex-register-2026.xlsx, q3-operations-report.docx

Spreadsheet cells count: the XLSX matched on its date and amount columns.

Combine with care

AND is evaluated per document. The last query matched the capex register because it contains Warehouse racking and also 410000 — on the solar-roof row. Ask for the fragments when the combination matters:

For each match, quote the line with the amount.

get_text_fragments with the same query shows which line each number is on.

Expected result

The documents with a date or amount in range, plus the passage for each when you ask — from Word, Excel, PDF and email in one index.

Troubleshooting

SymptomCauseFix
A date range matches almost every fileno content: prefix — file dates matchedcontent: daterange(…)
An amount is not foundwritten with separators (125,000, 125 000)search the parts, or a word next to it; ranges see whole numbers only
A date is not founda format outside the defaults (15 Aug 2026)search the words (August AND 2026)

FAQ

Does the range understand currencies? No — numbers are numbers. 100000 ~~ 999999 matches any whole number in that range, whatever it counts.

Can it search by the date a file was modified? Yes: modificationdate: daterange(…); also creationdate:.

Are Excel dates found? Dates stored as text in cells, yes — as in the capex register above.

Add to your CLAUDE.md or AGENTS.md

Agents follow project instructions about when to use a tool. Paste this into the instruction file your agent reads (CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, .cursorrules):

For date questions about documents in ./documents, search with
content: daterange(yyyy-MM-dd ~~ yyyy-MM-dd) — never a bare daterange, which also
matches file dates. Use content: (min ~~ max) for amounts; quote the matching line.

Honest limits

  • Evaluation mode: an index holds at most 100 documents and a search returns at most 10 — the response says so in its evaluation field. Licensing.
  • Full-text, not semantic: it matches words, not meaning. Ask the agent to try variants (OR, fuzzy: true).
  • No OCR: scans without a text layer are indexed by their file properties only.
  • Docker only: there is no dnx channel for this product (why).