Skip to main content
Glama

Set file sharing

set_file_sharing
DestructiveIdempotent

Change who can open a Files document, folder, or artifact. Only its owner or a workspace admin can. Each access entry sets one audience: "team" (everyone in the project), "link" (anyone with the URL, signed in or not, which publishes the file), or a project member's email. A role of null removes that access given on this file; access inherited from a parent folder, such as a shared folder, stays and is listed under inherited. Audiences you do not list keep their access. All entries apply together or not at all. Returns who can open the file afterwards, including artifactUrl for an artifact.

Input Schema

NameRequiredDescriptionDefault
accessYesAccess to set. Audiences not listed keep their current access. Each audience or email appears once.
fileIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / fileId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the permission requirement, that "link" publishes the file to anyone with the URL, that null revokes, that parent-folder inherited access survives, that unlisted audiences are untouched, that the write is all-or-nothing, and what the response contains (post-change access plus artifactUrl). That is exactly the destructive/mutation context an agent needs despite destructiveHint=true already being set.

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?

Front-loaded with purpose and permission, then the audience model, then edge cases, then return value — a logical order with no filler. It is dense, packing multiple concepts into single sentences (e.g. the final sentence bundling the return shape with artifactUrl), which slightly hurts scannability.

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?

No output schema exists, yet the description explains the return value; no annotations need supplementing on permissions or blast radius, and the inheritance/atomicity semantics answer the questions an agent would otherwise have to guess at. Nothing material is missing for correct invocation.

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 only 50% (fileId has no description), but the description compensates strongly for the complex access array: audience kinds, allowed roles per kind, null-removal semantics, once-per-audience constraint, and unlisted-audience behavior. The one gap is that fileId is never described or tied to list_files/get_file output.

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?

States a specific verb+resource: "Change who can open a Files document, folder, or artifact." This cleanly separates it from the read-side sibling get_file_sharing and from content tools like update_file, and the three supported resource types are named explicitly.

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?

Gives the authorization precondition up front ("Only its owner or a workspace admin can") and explains the additive/patch semantics (unlisted audiences keep access, null removes). It stops short of explicitly routing the agent to get_file_sharing to inspect current sharing first or naming any alternative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources