Skip to main content
Glama

m365_files_list

Read-onlyIdempotent

List immediate files and folders in a OneDrive folder (root by default) with IDs and metadata to browse directory contents without reading file contents.

Instructions

Browse the immediate files and folders in one OneDrive folder (root by default); not recursive. Returns IDs and metadata, not contents, with up to top items across internal pages. Use m365_files_search to find matches across the drive, m365_files_info for one item's metadata, or m365_files_read for text content.

Input Schema

NameRequiredDescriptionDefault
topNoMaximum total children to return, not page size
pathNoRoot-relative folder path, e.g. Documents/Work; omit for root. Not an item ID or URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.1
    • changedInput schema / properties / path / description
      Previous value: -"Folder path (e.g. Documents/Work)"New value: +"Root-relative folder path, e.g. Documents/Work; omit for root. Not an item ID or URL"
    • changedInput schema / properties / top / description
      Previous value: -"Max results"New value: +"Maximum total children to return, not page size"
  2. Changed3 schema fields changedv1.2.0
    • addedInput schema / properties / top / maximum
      Added value: +500
    • addedInput schema / properties / top / minimum
      Added value: +1
    • changedInput schema / properties / top / type
      Previous value: -"number"New value: +"integer"
  3. First observedv1.0.7

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, and open-world behavior. The description adds important context beyond them: the listing is non-recursive, returns IDs and metadata rather than file contents, and 'top' applies across internal pages rather than to a single page.

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 definition is front-loaded and compact: it first defines the action and scope, then the return behavior, then the sibling alternatives. Every sentence earns its place by resolving a specific ambiguity an agent would otherwise face.

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?

For a simple two-parameter read-only listing tool, the description covers the essential call context: non-recursive scope, root default, return format, pagination behavior of 'top', and sibling alternatives. Annotations and schema already carry safety and parameter details, so no important gap remains.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds path semantics that the schema does not state: the folder listing is immediate and non-recursive, and the root is the default. It also reinforces that 'top' limits total returned children across internal pages, consistent with the schema's note that it is not page size.

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 states a specific verb and resource: browsing immediate files and folders in one OneDrive folder, with the root as default and explicitly non-recursive. It also distinguishes itself from m365_files_search, m365_files_info, and m365_files_read by naming the exact sibling that handles each alternative case.

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

Usage Guidelines5/5

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

It explicitly routes the agent to alternatives: use m365_files_search for matches across the drive, m365_files_info for a single item's metadata, and m365_files_read for text content. The scope of this tool, browsing one folder non-recursively, is clear enough that there is no ambiguity about when to select it.

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