list_documents
List all Word, Excel, and PowerPoint files in a folder, returning metadata like path, name, type, size, and last modified time.
Instructions
List all Office files in a folder (non-recursive).
Scans the immediate children of folder and returns one entry
per file with extension .docx/.xlsx/.pptx. Non-Office
files (and subdirectories) are filtered out. The scan does not
descend into subdirectories.
Args:
folder: Folder to scan. When None (default), the default
folder from :func:office_mcp.config.get_default_folder
is used. Relative paths are joined with the default folder.
Returns: A list of dicts, each with:
* ``path`` — absolute, canonical path to the file.
* ``name`` — file basename (e.g. ``"report.docx"``).
* ``type`` — one of ``"word"``, ``"excel"``, ``"pptx"``.
* ``size_bytes`` — file size on disk (positive int).
* ``modified`` — ISO-8601 timestamp of last modification
(``datetime.fromisoformat``-parseable, with timezone).
An empty folder returns ``[]`` (``VAL-GEN-002``).Raises:
OfficeMCPError: ERR_INVALID_PARAMS if folder exists
but is not a directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |