Skip to main content
Glama

create-drive-item-share-link

create-drive-item-share-link
Destructive

Generate a shareable link for a OneDrive or SharePoint file or folder without sending email notifications. Specify access type and scope to get a URL for direct sharing.

Instructions

Create a link to share a driveItem driveItem. The createLink action creates a new sharing link if the specified link type doesn't already exist for the calling application. If a sharing link of the specified type already exists for the app, the existing sharing link is returned. DriveItem resources inherit sharing permissions from their ancestors.

šŸ’” TIP: Create a shareable link for a file or folder WITHOUT sending an email invitation. Body: { type: 'view' | 'edit' | 'embed', scope: 'anonymous' | 'organization' | 'users', password?: string, expirationDateTime?: ISO-8601, retainInheritedPermissions?: boolean }. Returns a permission with link.webUrl. Pair with share-drive-item when you want to grant explicit access; use this when you only need a URL to paste into a doc/email/chat without triggering OneDrive notifications.

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
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so it's a write operation. The description adds valuable behavioral context: idempotency (creates only if not exists, otherwise returns existing), inheritance of permissions from ancestors, and that it does NOT trigger OneDrive notifications. This goes beyond the annotations without contradicting them.

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 moderately long but well-structured with a tip and clear sections. It front-loads the core purpose and then provides usage context. Minor redundancy (e.g., 'driveItem driveItem' typo) and some tangential info (inheritance) slightly reduce conciseness, but overall it earns its length.

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 primary use case and return value, but introduces potential confusion: schema includes recipients and sendNotification fields (email-related), yet the description claims this tool does NOT send email. It does not explain why those fields exist or how they interact, leaving an agent uncertain about when to use them. Also lacks error handling or auth requirements, which could be important for a destructive operation.

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 a compact body template with enums for type and scope, plus optional fields (password, expirationDateTime, retainInheritedPermissions). It also clarifies the return value (permission with link.webUrl), which is not in the schema. This extra semantic value lifts it above the baseline.

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 the tool creates a share link for a driveItem, explains the createLink action, and describes idempotent behavior (returns existing link if type exists). It distinguishes itself from share-drive-item by contrasting link-only vs explicit access, so an agent can immediately identify which tool to use.

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?

Provides explicit when-to-use guidance: create a link WITHOUT sending an email invitation, and explicitly contrasts with share-drive-item for when explicit access is needed. The tip section gives a concrete body example and notes it returns a webUrl, making usage clear.

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