Skip to main content
Glama

Manage sharing & permissions

manage_permissions
Destructive

Control who can access a Google Drive file by listing current permissions, granting or updating access for users, groups, domains, or link sharing, and revoking access when needed.

Instructions

Manages who can access a file. action=list shows the grants (id, type, role, emailAddress/domain, expirationTime, pendingOwner). action=share grants access: type=user/group (needs email_address), domain (needs domain), or anyone (link sharing; allow_file_discovery=true also makes it searchable); role=reader, commenter, writer, fileOrganizer/organizer (shared drives only) or owner. Sharing with a user emails them by default — send_notification_email=false suppresses it (not allowed for ownership transfers); email_message adds a note. action=update changes an existing grant's role (needs permission_id from list); action=remove revokes it. Ownership transfer: role=owner with transfer_ownership=true — between personal accounts this only INVITES the new owner (pendingOwner until they accept). Changes are live immediately; removing your own access to someone else's file is irreversible from your side. role=owner/organizer grants full control including permanent deletion — prefer writer or less.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoshare/update: the access level. fileOrganizer/organizer exist only on shared drives; owner transfers ownership.
typeNoshare only: who the grant is for. user/group need email_address; domain needs domain; anyone = link sharing.
actionYesWhat to do with the file's permissions.
domainNoshare with type=domain: the Workspace domain, e.g. example.com.
file_idYesThe file id — the long id from the Drive URL (drive.google.com/file/d/<fileId> or docs.google.com/.../d/<fileId>/edit) or from search_files/get_file output. Folders and shared-drive items are files too.
page_tokenNolist: nextPageToken from the previous page.
email_addressNoshare with type=user/group: the grantee's email address.
email_messageNoshare: a custom note for the notification email.
permission_idNoupdate/remove: the permission id from action=list.
expiration_timeNoupdate: RFC3339 expiry for the grant, e.g. 2026-12-31T00:00:00Z (not available for owners).
transfer_ownershipNoshare with role=owner: confirm the ownership transfer (required by the API for role=owner).
allow_file_discoveryNoshare with type=domain/anyone: whether the file can be FOUND by search (default false = link only).
send_notification_emailNoshare with type=user/group: send the notification email (API default true; must stay true for ownership transfer).
Behavior5/5

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

The description goes far beyond the annotations, disclosing that user sharing emails by default and can be suppressed, that ownership transfers between personal accounts only invite pendingOwner status until accepted, that changes are live immediately, that removing one's own access is irreversible, and that owner/organizer roles allow permanent deletion. These details align with destructiveHint=true and add critical safety context.

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?

The description is dense but tightly organized by action, with the core purpose front-loaded and each clause earning its place. Use of semicolons and explicit parameter groupings keeps related information together without unnecessary prose.

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 13-parameter tool with no output schema, the description is remarkably complete: it covers all four actions, parameter prerequisites, notification behavior, ownership-transfer caveats, and destructive consequences. An agent has enough context to invoke any action correctly, including edge cases like shared drives and pending ownership.

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

Parameters5/5

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

Even though schema coverage is 100%, the description adds important operational meaning: send_notification_email defaults to true and must stay true for ownership transfers, allow_file_discovery makes domain/anyone links searchable, expiration_time is unavailable for owners, and fileOrganizer/organizer are shared-drive-only. This meaningfully improves the agent's ability to combine parameters correctly.

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 opens with 'Manages who can access a file' and then enumerates four concrete actions (list, share, update, remove), each with a clear effect. This unambiguously identifies the resource and operation and distinguishes it from sibling file-management tools like update_file_metadata or manage_comments.

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?

It clearly explains when each action applies and the prerequisites for each (e.g., update needs permission_id from list, share requires certain type/role combinations). It does not explicitly name alternative sibling tools or exclusion scenarios, but the tool is the only permissions-management tool in the set, so the usage context is 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/A1-x-Tech/mcp-google-drive'

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