Skip to main content
Glama
Softeria

Microsoft 365 MCP Server

by Softeria

create-drive-item-preview

create-drive-item-preview
Destructive

Generate a short-lived embeddable preview URL for Microsoft 365 files (Office docs, PDFs, images) to display inline in emails or chat messages.

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 description presents the operation as a benign 'create' action that returns a short-lived URL, yet the annotations set destructiveHint=true. This is a direct contradiction: no mention of destructive effects or reasons for the destructive flag. The description also fails to explain why a preview creation would be considered destructive.

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 compact and front-loaded with the main action. The emoji and tip format are slightly informal but every sentence adds useful information, including body structure, return values, and a practical use case.

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

Completeness4/5

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

Without an output schema, the description still explains return values, body options, and short-lived nature, which is good. It omits discussion of the destructive hint and confirm gate, but those are already exposed via annotations and parameter descriptions, so the overall picture is adequate for a moderately complex tool.

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 83%, and the description adds the 'viewer' option not present in the schema, and clarifies that return values are getUrl and postUrl. These additions meaningfully supplement the schema descriptions, which already cover driveId and driveItemId well.

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?

Clearly states it creates a drive item preview and explains that it generates a short-lived embeddable preview URL for files. It distinguishes itself from sibling tools like share-link or download-url by focusing on inline previews for summary emails or chat messages.

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?

Provides a concrete use case: 'surfacing inline previews in summary emails or chat messages without needing the recipient to open the file.' It does not explicitly exclude alternate tools, but the context is clear enough for an agent to decide when to use it.

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/Softeria/ms-365-mcp-server'

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