analyze
Count and measure indexed files to answer how many, how large, how old, or what kind, returning JSON statistics for reports, charts, or dashboards without opening documents.
Instructions
[Tool boundaries: explore = a short overview to find your way around → analyze = numbers for a report, a chart or a dashboard → search/read = what the documents say.] Count and measure the user's indexed files. Returns JSON computed from the index on each call; no document is opened. The summary (files, bytes, parsed files, words, folders, languages, date range) always comes back; sections adds groups of statistics.
Use it for how many / how big / how old / what kind questions and for reports or charts about the files, e.g. "which folders take the most space", "find my duplicate files". Do NOT use it to find or read a document (use search / read); it reports keywords and titles, not what documents say.
Word counts cover parsed files only: while indexing runs, summary.words_estimated projects the total. Example: {"sections": ["types", "time"], "path": "/Users/me/Documents"}.
Scope: local indexed content only; cloud libraries are NOT included.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "analyze"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Restrict to the files under this directory and its subfolders: an absolute path as other tools return it. | |
| limit | No | Entries per ranked list. Default 10, max 50. | |
| library | No | Restrict to one local library: `local://<library-id>` or its name (see list_libraries). Cloud libraries are not supported. | |
| sections | No | Groups of statistics to return besides the summary. Any of: "types" (files, bytes, words per file type), "folders" (largest folders, depth, two-level tree), "time" (by year and month, weekday-by-hour, oldest and long-untouched files, added per day), "content" (longest documents, word distribution, languages, authors, media duration), "keywords" (the most common words of the text and the topics they form; with a scope, the keywords of the documents in it), "duplicates" (same content; same name and size), "names" (common words in file names, version families, screenshots), "agents" (files made by AI agents), "collections" (libraries, notes and clips with weekly additions), "index" (indexing progress, whole app), "usage" (agent calls and searches per day, whole app). ["all"] returns everything. Omit for the summary alone; ask only for what you will use. | |
| doc_types | No | Restrict to these document types, as in other tools' `doc_type`, e.g. ["pdf", "md", "image"]. | |
| modified_after | No | Only files modified at or after this ISO 8601 date or datetime (UTC), e.g. "2024-01-01". | |
| modified_before | No | Only files modified at or before this ISO 8601 date or datetime (UTC). |