Skip to main content
Glama

share_file

Destructive

Shares a Google Drive file or folder with specified users, groups, domains, or anyone by applying permission roles and sending optional notification emails.

Instructions

Share any file or folder with one or more principals.

Permission entries share concurrently rather than one at a time. If the caller supplied a progressToken, a notifications/progress update is sent as each share finishes (#355).

Args: file_id: The Google Drive file or folder ID. permissions: List of permission entries. Each must have 'type' and 'role'. Additional fields depend on type: type='user' or 'group' — requires 'email_address' type='domain' — requires 'domain' type='anyone' — no extra fields

             type values: 'user', 'group', 'domain', 'anyone'
             role values: 'reader', 'commenter', 'writer'

             Example:
             [
                 {'type': 'user', 'email_address': 'alice@example.com', 'role': 'writer'},
                 {'type': 'domain', 'domain': 'example.com', 'role': 'reader'},
                 {'type': 'anyone', 'role': 'reader'},
             ]
send_notification: Send notification email to user/group recipients (default True).

Returns: Dictionary with 'successes' and 'failures' lists.

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>",
      "permissions": "<permissions>"
    },
    "name": "share_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_idYes
permissionsYes
send_notificationNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only supply destructiveHint=true, and the description adds real value beyond that: shares are applied concurrently, progress notifications are emitted when a progressToken is supplied, and send_notification defaults to True. It still omits what the destructive hint implies operationally (that an existing share can be overwritten or that the file becomes publicly readable with type='anyone').

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 description is front-loaded with the purpose and behavior, then uses conventional Args/Returns sections, so it is easy to scan. The multi-entry example is justified by the zero-coverage nested schema, though the inline type/role recap is slightly repetitive.

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 3-param mutation tool with an output schema, the definition covers parameters, concurrency, notifications, and partial-failure semantics via the successes/failures note. The main remaining gap is permission requirements and whether each entry adds to or replaces existing access.

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 description coverage is 0%, so the description carries the full burden and does so thoroughly: it documents file_id, the nested permissions entries with per-type required fields ('user'/'group' need email_address, 'domain' needs domain, 'anyone' needs nothing), the allowed type and role values, the default for send_notification, and a worked example.

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?

The opening sentence gives a specific verb and resource ('Share any file or folder') plus the scope ('one or more principals'), so an agent knows exactly what the tool does. It does not explicitly contrast itself with the sheet-specific sibling share_spreadsheet, leaving differentiation to inference.

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 only implied: 'any file or folder' suggests generic Drive sharing vs. the spreadsheet-specific sibling, and the permissions block implies bulk sharing is the point. There is no explicit when-to-use/when-not guidance, no mention of prerequisites such as needing owner/editor rights, and no named alternative.

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