Skip to main content
Glama

create-drive-item-preview

Destructive

Creates a short-lived embeddable preview URL for files (Office docs, PDFs, images) to display inline previews in emails or chat messages, eliminating the need to open the file.

Instructions

Invoke action 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
driveIdYesPath parameter: driveId
driveItemIdYesPath parameter: driveItemId
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Behavior2/5

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

The description describes a non-destructive action (generating a URL), but the annotation destructiveHint is true, creating a contradiction. The description adds some behavioral context (output URLs, short-lived) but fails to address the discrepancy with annotations.

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 relatively concise with three sentences, front-loading purpose and use case. The tip format is acceptable, though the opening 'Invoke action preview' is slightly vague. Overall minimal waste.

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?

Given no output schema, the description explains return values (getUrl, postUrl). It covers the main use case but omits details on optional parameters like includeHeaders and excludeResponse. The mention of viewer not in schema undermines completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning by detailing body parameters (page, zoom, viewer) and output (getUrl, postUrl). However, it introduces a 'viewer' field not present in the schema, and simplifies zoom type, causing inconsistency. Schema coverage is 80% but the description's extra info is partially inaccurate.

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 clearly states it generates a short-lived embeddable preview URL for files like Office docs, PDFs, and images. It specifies the verb 'Generate a preview URL' and the resource 'drive item', distinguishing it from siblings like create-drive-item-share-link.

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 clear usage guidance: 'Useful for surfacing inline previews in summary emails or chat messages without needing the recipient to open the file.' It implies the tool is for embedding previews, not for sharing access, though it doesn't explicitly state when not to use or list alternatives.

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