Skip to main content
Glama

List SharePoint Files

list_site_items
Read-only

List files and folders in a SharePoint site's document library to browse content by site, drive, folder path, or folder ID.

Instructions

List files and folders in a SharePoint site's document library

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>"
    },
    "name": "list_site_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_idYesSite ID
drive_idNoDrive ID (omit for default document library)
folder_idNoFolder ID (omit for root)
folder_pathNoFolder path (e.g., 'General/Reports')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the description only needs to add context beyond that. It clarifies the scope is the site's document library rather than the whole site, but says nothing about pagination, result limits, or whether folders are listed non-recursively.

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?

A single front-loaded sentence with no filler; the resource and scope come first. It is arguably too terse rather than too long, but nothing in it is wasted.

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?

For a read-only listing tool with full schema coverage and no output schema, the core is covered by annotations and parameters. Still missing is anything about result shape, paging, or how folder_id and folder_path interact, which matters for an agent trying to enumerate a library.

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?

Schema description coverage is 100%, so all four parameters are already documented, including the 'omit for default document library' and 'omit for root' defaults. The description's phrase 'document library' reinforces the drive_id default but adds no syntax or interaction detail beyond the schema.

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 gives a specific verb ('List') and resource ('files and folders') scoped to a SharePoint site's document library, so the agent knows exactly what comes back. It does not differentiate from near-siblings such as search_site_files or list_drive_items, which is the only thing keeping it from a 5.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus search_site_files (filtered search) or list_drive_items (drive-level listing), and no stated prerequisites. The agent must infer the choice from names alone, which the description never addresses.

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