Skip to main content
Glama

list-folder-files

Read-only

Retrieve files and subfolders from a Microsoft 365 OneDrive or SharePoint folder. Use this tool to access, search, filter, and organize your cloud storage items through the Microsoft Graph API.

Instructions

Return a collection of DriveItems in the children relationship of a DriveItem. DriveItems with a non-null folder or package facet can have one or more child DriveItems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoShow only the first n items
skipNoSkip the first n items
searchNoSearch items by search phrases
filterNoFilter items by property values
countNoInclude count of items
orderbyNoOrder items by property values
selectNoSelect properties to be returned
expandNoExpand related entities
driveIdYesPath parameter: driveId
driveItemIdYesPath parameter: driveItemId
fetchAllPagesNoAutomatically fetch all pages of results
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, establishing the safety profile. The description adds that this retrieves children of a DriveItem, providing API-specific context. However, it omits behavioral details about pagination despite the presence of fetchAllPages, top, and skip parameters, and doesn't mention error conditions.

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

Conciseness4/5

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

Two sentences with no filler. Information is front-loaded with the core operation in the first sentence, and scope clarification in the second. Minor deduction for using technical API jargon ('facet,' 'children relationship') where simpler language ('folders containing files') could improve agent comprehension.

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

Completeness3/5

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

Given 13 parameters including OData-style query options (filter, select, expand, orderby) and pagination controls (fetchAllPages), the tool is operationally complex. While annotations cover safety traits and the schema documents parameters, the description lacks domain context (OneDrive/SharePoint) and fails to address pagination behavior despite dedicated parameters for it. Adequate but not comprehensive.

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

Parameters3/5

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

With 100% schema description coverage, the baseline is 3. The description provides high-level context that parameters operate on DriveItem children relationships, but does not elaborate on specific parameter semantics (e.g., explaining that driveId/driveItemId identify the parent folder, or how filter/search differ).

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

Purpose4/5

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

The description states the tool returns a collection of DriveItems in the 'children relationship,' specifying the verb (return) and resource (child DriveItems). However, it relies heavily on Microsoft Graph terminology ('DriveItems,' 'facets') without clarifying this lists files/folders in a OneDrive/SharePoint folder, which slightly hinders accessibility.

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

Usage Guidelines3/5

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

The second sentence implies when the tool applies ('DriveItems with a non-null folder or package facet can have one or more child DriveItems'), hinting that this works on folders. However, it lacks explicit guidance distinguishing this from siblings like get-drive-root-item or other file operations, and provides no 'when not to use' guidance.

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/alfredo-ia/ms-365-mcp-server'

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