Skip to main content
Glama

Get File

file_get
Idempotent

Download a OneDrive file to a local path using a Microsoft Graph identifier, with configurable size limits and retry protection.

Instructions

✏️ Download a OneDrive file to a local path (requires user confirmation recommended)

The download URL is supplied by Microsoft Graph (never user input) and is validated against an allow-list of Microsoft domains before use. The file is streamed to disk in configurable chunks with retry behaviour to protect against transient failures. Download size and timeouts respect the environment variables MCP_FILE_DOWNLOAD_MAX_MB and MCP_FILE_DOWNLOAD_TIMEOUT.

Args: file_id: The Microsoft Graph file identifier to download. account_id: Microsoft account identifier associated with the file. download_path: Absolute path where the file will be stored locally. Must reside within an allowed root directory.

Returns: Dictionary containing download metadata (name, size_mb, mime_type).

Raises: ValidationError: If input parameters are invalid. RuntimeError: If all download attempts fail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes
account_idYes
download_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description discloses key behaviors: user confirmation, security validation (allow-list of Microsoft domains), streaming, chunking, retry, and environment variable controls. This adds value beyond the annotations (which show idempotentHint=true, etc.) by explaining actual execution behavior.

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 sections (Args, Returns, Raises) and front-loads the core purpose. While it is comprehensive, it could be slightly more concise without losing important details. Every sentence adds value, making it a strong 4.

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 the three parameters, no nested objects, and presence of an output schema, the description is remarkably complete. It covers parameter validation, security, error handling, environment variables, and return format. No gaps are evident.

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 schema coverage 0%, the description fully compensates by clearly defining each parameter: file_id, account_id, download_path (including constraint 'Must reside within an allowed root directory'). It also describes the return dictionary and exception types, providing rich semantics beyond the bare 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's purpose: 'Download a OneDrive file to a local path'. This is a specific verb ('download') and resource ('OneDrive file' with local path). It distinguishes from sibling tools like 'file_download_url' by emphasizing the actual download to disk and mentioning user confirmation.

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 explicitly notes 'requires user confirmation recommended' and mentions environment variables for size/timeout limits, giving guidance on when to use. However, it does not explicitly state when not to use or compare with alternatives like 'file_download_url', so it falls short of a perfect score.

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