Skip to main content
Glama

get-download-url

Read-only

Resolve a short-lived, pre-authenticated download URL for Microsoft Graph drive files, enabling direct streaming to disk without base64 encoding.

Instructions

Resolve a short-lived, pre-authenticated download URL for Microsoft Graph binary content that exposes one (drive/SharePoint file content). The returned URL streams the bytes with NO Authorization header, so the client can fetch it straight to disk (e.g. curl) without round-tripping base64 through the agent context. Prefer this over download-bytes for any file above a few KB or any bulk download. Returns { downloadUrl, name?, size?, contentType? }. NOTE: mail file attachments (/messages/{id}/attachments/{id}/$value) and meeting recordings do NOT expose a pre-authenticated URL — Graph offers no such link for them; use download-bytes for small ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesRelative Microsoft Graph path starting with "/". Either a driveItem content path or the item path itself, e.g. /drives/{drive-id}/items/{driveItem-id}/content, /me/drive/items/{driveItem-id}/content, or /sites/{site-id}/drive/items/{driveItem-id}. A trailing /content is optional and is stripped automatically for drive items. Mail attachment $value paths and meeting recordings are not supported (Graph exposes no pre-authenticated URL for them).
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description aligns with these without contradiction. It adds behavioral details beyond annotations: the URL is short-lived, pre-authenticated, requires no Authorization header, and streams bytes directly. It also discloses the return shape. Minor gap: no mention of URL expiration time or caching behavior, but it covers the key behavioral aspects for an agent.

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 concise and well-structured: it states the core purpose, then usage guidance, then return format, then a critical caveat. Each sentence carries essential information without redundancy. It is slightly longer than necessary but is front-loaded with the purpose and uses a clear note for limitations, so it earns a high score.

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 tool's single parameter, lack of output schema, and straightforward operation, the description is fully self-contained. It explains what the tool does, when to use it, what it returns, and what it does not support, covering all an agent needs to call it correctly. The absence of an output schema is mitigated by listing return fields in the description.

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?

The sole parameter `target` is fully described in the schema (100% coverage), but the description adds value by specifying accepted path formats, that a trailing /content is optional and stripped, and explicitly states unsupported paths (mail attachments, meeting recordings). This goes beyond the schema's basic type and description, making the parameter semantics richer.

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 opens with a specific verb ('Resolve') and resource ('short-lived, pre-authenticated download URL for Microsoft Graph binary content'), and immediately distinguishes itself from sibling tools by contrasting with download-bytes. It also clarifies the exact scope (drive/SharePoint file content) and what it returns, leaving no ambiguity about its function.

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?

Explicitly states when to prefer this tool over download-bytes ('above a few KB or any bulk download') and lists unsupported cases (mail attachments, meeting recordings) with guidance to use download-bytes for small ones. The description also notes that the URL avoids base64 round-tripping, giving a clear use-case rationale.

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/A-Impact-Pavel/ms365-mcp'

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