Skip to main content
Glama

Get Folder Tree

folder_get_tree
Read-onlyIdempotent

Recursively build a tree of OneDrive folders to display the complete folder hierarchy, helping you understand folder organization.

Instructions

📖 Recursively build a tree of OneDrive folders (read-only, safe for unsupervised use)

Returns a hierarchical tree structure showing all folders and nested subfolders. Useful for understanding OneDrive folder organization.

Caching: Results are cached for 30 minutes (fresh) / 2 hours (stale). Use force_refresh=True to bypass cache and fetch fresh data.

Args: account_id: Microsoft account ID path: Starting path (default: "/") folder_id: Starting folder ID (takes precedence over path) max_depth: Maximum recursion depth (1-25, default: 10) use_cache: Whether to use cached data if available (default: True) force_refresh: Force refresh from API, bypassing cache (default: False)

Returns: Nested tree structure with folders and their children, including: - _cache_status: Cache state (fresh/stale/miss) - _cached_at: When data was cached (ISO format)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
pathNo/
folder_idNo
max_depthNo
use_cacheNo
force_refreshNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, openWorldHint. The description adds caching behavior (30 min fresh/2 hours stale), force refresh option, and return fields like _cache_status. This significantly enriches behavioral transparency beyond annotations.

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?

The description is well-structured with emoji, line breaks, and sections (caching, args, returns). Every sentence earns its place, though it is slightly verbose. Front-loaded key purpose and safety note.

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 6 parameters, existence of output schema, and complexity of building a tree, the description covers purpose, usage context, caching, all parameters, and return structure including cache metadata. It is complete and informative.

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?

With 0% schema coverage, the description provides detailed parameter meanings: account_id, path (default ''/''), folder_id (takes precedence over path), max_depth (1-25, default 10), use_cache, force_refresh. This adds substantial value beyond the raw schema.

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 clearly states the tool recursively builds a tree of OneDrive folders (read-only, safe for unsupervised use). It specifies the verb 'build a tree' and the resource 'OneDrive folders', and distinguishes from sibling tools by highlighting its read-only nature and hierarchical output.

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 mentions the tool is 'useful for understanding OneDrive folder organization' and provides caching details, but does not explicitly state when not to use it or offer alternatives like folder_list. It gives context for use but lacks exclusion criteria.

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/robin-collins/m365-mcp'

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