Skip to main content
Glama

Create a OneDrive sharing link

files_create_link

Create a sharing link for a OneDrive file or folder and get its URL, permission type, and scope. Defaults to an organization view link; retry with organization scope if anonymous is blocked.

Instructions

Creates a sharing link for a OneDrive file or folder and returns its URL, permission type and scope. Defaults to a view link scoped to the organization. Anonymous links are blocked by policy in many tenants, which surfaces as a 403: retry with scope organization. Calling this twice with the same type and scope returns the existing link rather than creating a second one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoLink permission: view for read-only, edit for read-write. Defaults to view.view
scopeNoWho can use the link. organization requires the recipient to sign in to the same tenant; anonymous works for anyone holding the URL and is disabled by policy in many tenants.organization
itemIdYesId of the file or folder to create a sharing link for.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description reveals meaningful behavior: call outcomes, defaults, a 403 failure mode for anonymous links, and the fact that duplicate calls return the existing link rather than creating a second one. This adds substantial practical context that annotations alone do not convey.

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?

Three sentences, each earning its place: purpose and return value, defaults, then the two important behavioral caveats. The most actionable information is front-loaded, and there is no filler.

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?

For a three-parameter tool with no output schema, the description is complete: it explains what is returned, the safe default behavior, and the error/retry path. The annotations cover mutation and non-destructiveness, so nothing essential is missing for an agent to invoke the tool correctly.

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 100%, so the baseline is 3. The description adds value by tying scope to a concrete error/retry pattern and by explaining repeated-call behavior for type and scope, which is not present in the schema. It does not add new semantics for itemId, but the schema already defines it clearly.

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 specific verb and resource: it creates a sharing link for a OneDrive file or folder and explicitly lists the returned data (URL, permission type, scope). This distinguishes it clearly from sibling file tools like files_get_item or files_create_folder, and from the broader graph_request fallback.

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 gives clear operational context: defaults, a policy-related failure mode with a recommended retry scope, and idempotent behavior for repeated calls with the same type and scope. It does not explicitly enumerate when-not-to-use alternatives, but the tool's unique purpose makes that less necessary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.