Skip to main content
Glama

graph_list_files

List files and folders in OneDrive or SharePoint document libraries, with paging options to navigate large collections.

Instructions

List files and folders in OneDrive or a SharePoint document library.

Args: folder_id: Folder ID to list contents of. Empty for root folder. top: Maximum number of items to return (default 25). compact: Whether to return only the identifying fields instead of the full record (default false). Use it to page through large collections cheaply. skip: Number of items to skip before returning results (default 0). Graph returns at most 50 per call, so page by raising skip in steps of top. next_link: Opaque nextLink URL from a previous call, used to fetch the next page. Overrides the other paging arguments when supplied. include_next_link: Whether to wrap the result as {items, next_link} so paging can continue (default false, which returns a bare list). drive_id: Drive ID to act on. Empty targets your own OneDrive.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "graph_list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
skipNo
compactNo
drive_idNo
folder_idNo
next_linkNo
include_next_linkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it documents defaults, paging limits, how next_link overrides other paging arguments, and how include_next_link changes the return shape. It does not discuss permissions, ordering, or error behavior, so it stops short of fully transparent.

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 front-loaded with the purpose and then uses a compact Args block to document seven parameters without wasted wording. Each parameter note adds useful operational detail.

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

Completeness4/5

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

For a seven-parameter tool with no annotations and no output schema, the description is largely complete: paging, compact mode, drive targeting, and wrapped output are all explained. The main gap is the lack of explicit sibling differentiation and permission context.

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?

Schema description coverage is 0%, so the description must compensate, and it does by explaining all seven parameters with defaults and behavioral meaning. It clarifies folder_id, top, compact, skip, next_link, include_next_link, and drive_id in practical terms.

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 a specific verb and resource: listing files and folders in OneDrive or a SharePoint document library. It is clear what the tool does, but it does not explicitly distinguish itself from close siblings such as graph_search_files, graph_list_recent_files, or graph_list_shared_files.

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 parameter notes imply usage, especially for paging with compact, skip, and next_link. However, there is no explicit guidance on when to choose this tool over search, recent-files, shared-files, or drive-listing alternatives.

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

Deploy Server

Other Tools