Skip to main content
Glama

Download OneDrive File

download_file
Read-only

Retrieves a file's metadata and download URL, returns inline text content under 100KB, and provides raw bytes when extraction fails or file types are unsupported.

Instructions

Get a file's metadata and download URL. Returns content inline for text files under 100KB. For a SharePoint file, pass drive_id as well — without it the item is looked up in your own OneDrive and will not be found. For readable text from PDF/DOCX/XLSX, use read_document instead; come here when extraction fails (scanned PDFs, unsupported types, files over the extraction cap) or you need raw bytes.

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

Input Schema

NameRequiredDescriptionDefault
item_idYesDrive item ID
drive_idNoDrive ID holding the item. Required for SharePoint; omit for your own OneDrive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the description doesn't need to argue safety. It adds real behavioral detail beyond that: inline content only for text files under 100KB, and that omitting drive_id on a SharePoint item causes a lookup miss. It stops short of noting whether the download URL is time-limited/signed or what happens for large non-text files, which would round it out.

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?

Three tight sentences, each doing distinct work: what it does, SharePoint caveat, and sibling routing with fallback conditions. Nothing redundant and the core capability is front-loaded.

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 the description still covers return behavior (metadata, download URL, inline text content under 100KB), the SharePoint lookup rule, and the alternative tool with its failure conditions. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100% and drive_id's own schema description already says 'Required for SharePoint; omit for your own OneDrive.' The description restates this, adding only emphasis on the consequence ('will not be found'). Genuine but marginal value over the structured field.

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?

States a specific verb and resource ('Get a file's metadata and download URL') plus the inline-content behavior, and explicitly contrasts itself with read_document. An agent can distinguish this from the sibling without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit routing: use read_document for readable text from PDF/DOCX/XLSX, and come here when extraction fails (scanned PDFs, unsupported types, over the extraction cap) or raw bytes are needed. It also states the SharePoint drive_id prerequisite and the failure mode if omitted.

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