Skip to main content
Glama

list-mail-folders

Read-only

Retrieve mail folders from the root directory of a Microsoft 365 user's mailbox, including search folders, with options to filter, sort, and include hidden folders.

Instructions

Get the mail folder collection directly under the root folder of the signed-in user. The returned collection includes any mail search folders directly under the root. By default, this operation does not return hidden folders. Use a query parameter includeHiddenFolders to include them in the response. This operation does not return all mail folders in a mailbox, only the child folders of the root folder. To return all mail folders in a mailbox, each child folder must be traversed separately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeHiddenFoldersNoInclude Hidden Folders
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
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
Behavior4/5

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

Annotations declare readOnly/openWorld traits. Description adds valuable behavioral context: hidden folders are excluded by default, search folders are included in the collection, and the operation is non-recursive (root-only). No contradictions with 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?

Four well-structured sentences front-loaded with primary purpose. Each sentence earns its place: defines scope, clarifies search folder behavior, documents hidden folder defaults, and states recursion limitations. Slight verbosity but logically organized.

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?

Adequate for a read-only list tool with 12 query parameters. Covers critical domain-specific behavior (root-only view, hidden folder handling) that prevents misuse. Could optionally mention pagination patterns (top/skip/fetchAllPages) given the traversal complexity discussed, but schema handles standard OData parameters.

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?

Despite 100% schema coverage (baseline 3), description adds semantic value by integrating 'includeHiddenFolders' into the narrative and explaining the default behavior (excluded by default) and when to use it, which augments the bare schema description 'Include Hidden Folders'.

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?

Specific verb 'Get' paired with resource 'mail folder collection' and precise scope 'directly under the root folder'. Explicitly distinguishes from siblings by clarifying it returns only root children, not all folders in the mailbox, and specifically mentions inclusion of search folders.

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?

Provides clear scope limitation ('only the child folders of the root folder') and explicit guidance that traversal is required for all folders ('each child folder must be traversed separately'). Mentions specific parameter usage for hidden folders. Lacks explicit naming of sibling tool (list-mail-child-folders) for traversal.

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