Skip to main content
Glama

Drive Unshare File

drive_unshare_file
DestructiveIdempotent

Revoke a person's, group's, domain's, or link's access to a Drive file or folder by specifying its permission_id. Use it to remove sharing access after confirming the change.

Instructions

Revoke one person's, group's, domain's or link's access to a Drive file or folder. Find the permission_id with drive_list_permissions; to lower access instead of removing it use drive_share_file with permission_id. Returns status 'ok' with file_id and permission_id, or status 'cancelled' if the user declines. It asks the user to confirm first; undo by granting access again with drive_share_file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_id": "<file_id>",
      "permission_id": "<permission_id>"
    },
    "name": "drive_unshare_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYesDrive file ID: the id field of Drive and search_workspace results, or the long ID in a Drive, Docs, Sheets or Slides URL.
permission_idYesDrive permission ID, from drive_list_permissions or the response of drive_share_file.

Output Schema

NameRequiredDescriptionDefault
statusNoMachine-readable operation status.
file_idNo
permission_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description goes well beyond them: it discloses the confirmation prompt, the two possible return statuses including the 'cancelled' path when the user declines, and the reversal route. That is exactly the operational context an agent needs before an irreversible write.

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?

Four tight sentences, front-loaded with the action and followed by prerequisites, outcomes, and undo. The one redundancy is restating the return payload (status, file_id, permission_id) even though an output schema exists.

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 destructive, two-parameter tool with an output schema, the definition covers the discovery step, the alternative tool, user-confirmation behavior, success/cancel outcomes, and recovery. Nothing needed to invoke it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, and the description's only parameter guidance ('find the permission_id with drive_list_permissions') is already present in the schema for both file_id and permission_id. Nothing new is added, so the baseline of 3 applies.

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 (revoke) and resource (access to a Drive file or folder), and enumerates the grantee types covered (person, group, domain, link). This clearly separates it from drive_share_file, which grants rather than removes access.

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?

Gives an explicit prerequisite path ('Find the permission_id with drive_list_permissions') and names the alternative for the adjacent case ('to lower access instead of removing it use drive_share_file with permission_id'). Both when-to-use and when-to-use-something-else are covered.

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

Deploy Server

Other Tools