Skip to main content
Glama
OneDrive Read-Only MCP Server

OneDrive Read-Only MCP Server

by joescars

download_file

Downloads a OneDrive file to local disk for local access while keeping the source unchanged; saves as a plain filename and refuses to overwrite existing files.

Instructions

Download a OneDrive file's content to local disk (read-only — the source file in OneDrive is never modified).

Args: path_or_id: Human path (e.g. '/Documents/foo.pdf') or Graph item id of the FILE to download. dest_filename: Optional bare local filename to save as (defaults to the OneDrive file's own name). Saved under DOWNLOAD_DIR. Must be a plain file name (no path separators) and must not already exist — an existing destination raises an error instead of being silently overwritten.

Returns {local_path, size_bytes, mime_type, source_name}. The file is always saved to disk (owner-only permissions); base64 content is not returned to keep responses small and to safely handle large files.

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": {
      "path_or_id": "<path_or_id>"
    },
    "name": "download_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
path_or_idYes
dest_filenameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well. It discloses that the source is never modified, the file is always saved to disk with owner-only permissions, base64 is not returned, large files are handled safely, and existing destinations raise an error instead of being overwritten.

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 core action and safety property, then organized into Args and Returns sections. Despite its length, every sentence adds necessary constraints or behavioral context, especially given the bare input schema.

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?

There is no output schema and no annotations, but the description supplies return fields, local-save behavior, safety constraints, and parameter meaning. For a two-parameter download tool, this gives an agent enough information to call it correctly and anticipate errors.

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. It explains path_or_id as a human path or Graph item id for the file, and dest_filename as an optional bare local filename with defaulting, location, separator restrictions, and no-overwrite behavior.

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 states a specific verb and resource: downloading a OneDrive file's content to local disk. It clearly distinguishes the operation from sibling tools like search_onedrive, list_folder, get_item_metadata, and get_drive_info by emphasizing file-content retrieval and local saving.

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 usage context is clear: retrieve a file's actual content rather than metadata or folder listings. However, it does not explicitly name alternative tools or state when not to use this tool, such as for folders or metadata-only requests.

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