Skip to main content
Glama

create-drive-item-preview

create-drive-item-preview
Destructive

Generate a short-lived embeddable preview URL for Office docs, PDFs, or images. Get interactive and form-post links to display inline previews in emails or chat without opening the file.

Instructions

Create a drive item preview.

šŸ’” TIP: Generate a short-lived embeddable preview URL for a file (Office docs, PDFs, images). Body: { page?: number | string, zoom?: number, viewer?: 'onedrive' | 'office' }. Returns getUrl (interactive) and postUrl (form-post). Useful for surfacing inline previews in summary emails or chat messages without needing the recipient to open the file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
confirmNoFor destructive operations when the confirm gate is enabled (MS365_MCP_REQUIRE_CONFIRM=true; off by default). Set to true only after the user has explicitly approved this action. When the gate is on, calls without confirm: true return { error: "confirmation_required" } without touching user data.
driveIdYesValue for the 'driveId' path segment. Pass it under the name 'driveId', not as 'id'. Use the 'id' field of the drive object as returned by Microsoft Graph.
driveItemIdYesValue for the 'driveItemId' path segment. Pass it under the name 'driveItemId', not as 'id'. Use the 'id' field of the drive item object as returned by Microsoft Graph.
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior1/5

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

The annotations declare destructiveHint: true, but the description describes a benign 'create preview' operation with no mention of destructive side effects. This directly contradicts the annotation. The description gives the impression of a safe, non-destructive action, which is misleading given the annotation. This is a serious inconsistency.

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 concise, front-loads the core action, and uses a tip to provide key details. It includes body structure and return values in a compact format, with no redundant text. Excellent structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main functional aspects, use case, and return values, but fails to disclose the destructive nature indicated by annotations. Without that disclosure, the agent may make an incorrect safety assessment. While the schema and output information are adequate, the destructiveHint contradiction makes the description incomplete for safe usage.

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?

Schema coverage is high (83%), but the description adds value by specifying the body fields (page, zoom, viewer) and explaining the return values (getUrl and postUrl). It also clarifies the purpose of the body. While it doesn't detail driveId/driveItemId, those are already described in the schema. The additional viewer option (not in schema properties) is useful.

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 clear verb and resource ('Create a drive item preview') and explains the purpose: generates a short-lived embeddable preview URL for files. It differentiates from sharing tools by emphasizing previews for inline use in emails/chats. This is specific and unambiguous.

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 provides a concrete use case ('surfacing inline previews in summary emails or chat messages') and notes the URLs are short-lived and embeddable. It does not explicitly exclude alternatives like share links, but the context makes the intended scenario clear. Sufficient guidance for most agents, though not exhaustive.

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