Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavioral traits: non-recursive scanning, default folder handling, relative path resolution, and error behavior (ERR_INVALID_PARAMS). No contradictions are present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet complete: a one-line summary followed by detailed Args, Returns (with field descriptions), and Raises sections. Every sentence provides necessary information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter, no nested objects, output schema exists), the description covers all relevant aspects: input behavior, output structure, error conditions, and edge cases (empty folder returns []). It is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% coverage for the single parameter 'folder'. The description compensates thoroughly by explaining its default (None → default folder), how relative paths are resolved, and that it must be a directory or raises an error.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description precisely states it lists Office files (.docx/.xlsx/.pptx) in a folder non-recursively, filtering out non-Office files and subdirectories. This clearly distinguishes it from sibling tools that handle conversion, creation, or editing of individual document types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates when to use the tool (to list Office files in a folder) and what it does not do (non-recursive, filtering). While it does not explicitly mention alternatives or when to avoid using it, the context is sufficient given the sibling tool names are distinct.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gawirable/office-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server