Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

share_drive_file

Grants access to a Google Drive file or folder for users, groups, domains, or anyone with the link, with configurable read, comment, or write roles.

Instructions

Shares a Google Drive file or folder with a user, group, domain, or anyone with the link.

When sharing a folder, all files inside inherit the permission.

Args: user_google_email (str): The user's Google email address. Required. file_id (str): The ID of the file or folder to share. Required. share_with (Optional[str]): Email address (for user/group), domain name (for domain), or omit for 'anyone'. role (str): Permission role - 'reader', 'commenter', or 'writer'. Defaults to 'reader'. share_type (str): Type of sharing - 'user', 'group', 'domain', or 'anyone'. Defaults to 'user'. send_notification (bool): Whether to send a notification email. Defaults to True. email_message (Optional[str]): Custom message for the notification email. expiration_time (Optional[str]): Expiration time in RFC 3339 format (e.g., "2025-01-15T00:00:00Z"). Permission auto-revokes after this time. allow_file_discovery (Optional[bool]): For 'domain' or 'anyone' shares - whether the file can be found via search. Defaults to None (API default).

Returns: str: Confirmation with permission details and shareable link.

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": {
      "user_google_email": "<user_google_email>",
      "file_id": "<file_id>"
    },
    "name": "share_drive_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNoreader
file_idYes
share_typeNouser
share_withNo
email_messageNo
expiration_timeNo
send_notificationNo
user_google_emailYes
allow_file_discoveryNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses folder permission inheritance, that a notification email is sent by default, that expiration_time auto-revokes the permission, and that allow_file_discovery only applies to domain/anyone shares. It omits prerequisite permissions (e.g., needing writer/owner access), what happens to pre-existing permissions when the same grantee is re-shared, and any rate limits.

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 first sentence front-loads purpose and scope, followed by the single most important behavioral caveat (folder inheritance) before the parameter list. The Args block is long but earns its place given 0% schema coverage; only the 'Returns' line is somewhat redundant with the output schema.

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?

For a 9-parameter mutation tool with no annotations, the definition is close but leaves out the authorization/permission preconditions and the collision behavior when a grantee already has access. The return value is covered by an output schema, so restating it is harmless but not compensating for those gaps.

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?

Schema coverage is 0% and the description compensates fully: it gives the enum values for role ('reader'/'commenter'/'writer') and share_type ('user'/'group'/'domain'/'anyone'), explains that omitting share_with means anyone, supplies an RFC 3339 example for expiration_time, and notes that a null allow_file_discovery defers to the API default. Every one of the nine parameters gains meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Shares a Google Drive file or folder') plus the set of grantees (user, group, domain, anyone), which is more precise than the bare name. It never distinguishes itself from nearby siblings such as set_drive_file_permissions, update_drive_permission, or batch_share_drive_file, so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the parameter semantics ('When sharing a folder, all files inside inherit the permission') and by the per-share_type guidance, but there is no explicit when-to-use/when-not guidance and no routing to alternatives like the batch variant or the lower-level permission tools.

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