get_document_info
Retrieve metadata from Office files: detect document type, file size, and format-specific details such as paragraphs, sheets, or slide count.
Instructions
Return metadata for a single Office file.
Detects the format by extension and dispatches to the
format-specific *_get_info tool. The returned dict is a
superset of the underlying tool's dict, augmented with type
("word" / "excel" / "pptx") and size_bytes.
Args:
path: Path to an existing Office file (abs or relative to
folder/default folder).
folder: Optional base folder for relative paths.
Returns: A dict with:
* ``type`` — one of ``"word"``, ``"excel"``, ``"pptx"``.
* ``size_bytes`` — file size in bytes.
* Format-specific fields: for ``.docx`` →
``paragraphs``, ``sections``, ``tables``, ``images``,
``properties``; for ``.xlsx`` → ``sheets`` (list),
``sheet_count``, ``sheet_names``; for ``.pptx`` →
``slide_count``, ``layouts``, ``dimensions_inches`` (with
``width_inches`` / ``height_inches``).Raises:
OfficeMCPError: ERR_FILE_NOT_FOUND if the file is missing
(VAL-GEN-010), ERR_UNSUPPORTED_FMT if the
extension is not one of .docx / .xlsx / .pptx.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||