Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

batch_share_drive_file

Share a Google Drive file or folder with multiple users or groups at once, setting each recipient's role and optional expiration time.

Instructions

Shares a Google Drive file or folder with multiple users or groups in a single operation.

Each recipient can have a different role and optional expiration time.

Note: Each recipient is processed sequentially. For very large recipient lists, consider splitting into multiple calls.

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. recipients (List[Dict]): List of recipient objects. Each should have: - email (str): Recipient email address. Required for 'user' or 'group' share_type. - role (str): Permission role - 'reader', 'commenter', or 'writer'. Defaults to 'reader'. - share_type (str, optional): 'user', 'group', or 'domain'. Defaults to 'user'. - expiration_time (str, optional): Expiration in RFC 3339 format (e.g., "2025-01-15T00:00:00Z"). For domain shares, use 'domain' field instead of 'email': - domain (str): Domain name. Required when share_type is 'domain'. send_notification (bool): Whether to send notification emails. Defaults to True. email_message (Optional[str]): Custom message for notification emails.

Returns: str: Summary of created permissions with success/failure for each recipient.

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>",
      "recipients": "<recipients>"
    },
    "name": "batch_share_drive_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYes
recipientsYes
email_messageNo
send_notificationNo
user_google_emailYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose sequential processing, the send_notification default of True, and that the return summarizes success/failure per recipient, which hints at partial failure. It omits permission/ownership prerequisites, behavior when a permission already exists (idempotency vs duplicate), and notification/latency implications of the email path.

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 summary and caveat are front-loaded before the argument list, and the sentence about sequential processing carries real value. The Args block is verbose docstring boilerplate and the Returns section partially duplicates the existing output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with 0% schema coverage and no annotations, the description covers recipients, roles, notification behavior, and the return shape well enough to invoke it correctly. The remaining gap is authorization/ownership requirements and duplicate-permission handling, which an agent would still have to discover empirically.

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 0%, so the description must compensate, and it does: every top-level parameter is explained plus the full nested recipient object (email, role values, share_type options, RFC 3339 expiration format, and the domain field alternative for domain shares). It stops short of stating constraints such as allowed role strings for domain shares or required-vs-optional distinctions for nested fields beyond the obvious ones.

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 and resource ('Shares a Google Drive file or folder') plus the distinguishing scope ('with multiple users or groups in a single operation'), which separates it cleanly from the singular share_drive_file sibling.

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 batch framing plus the note that recipients are processed sequentially, with advice to split very large lists into multiple calls, gives clear context for when this tool is appropriate. It never explicitly says to use share_drive_file for a single recipient, so the alternative routing is only implied by the name and scope.

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