Tool: get_file_permissions
Call this tool to list the permissions of a Drive File.
The following sample demonstrate how to use curl
to invoke the get_file_permissions
MCP tool.
| Curl Request |
|---|
curl --location 'https://drivemcp.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_file_permissions", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request to get file permissions.
GetFilePermissionsRequest
| JSON representation |
|---|
{ "fileId" : string } |
| Fields | |
|---|---|
fileId
|
Required. The ID of the file to get permissions for. |
Output Schema
Response to get file permissions.
GetFilePermissionsResponse
| JSON representation |
|---|
{
"permissions"
:
[
{
object (
|
| Fields | |
|---|---|
permissions[]
|
The list of permissions. |
Permission
| JSON representation |
|---|
{ "role" : string "displayName" : string "type" : string "emailAddress" : string "view" : string } |
Union field _role
.
_role
can be only one of the following:
role
string
The role of the grantee for the file. The possible roles include: * owner
* organizer
* fileOrganizer
* writer
* commenter
* reader
Union field _display_name
.
_display_name
can be only one of the following:
displayName
string
Output only. The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: * user
- User's full name, as defined for their Google Account, such as "Dana A." * group
- Name of the Google Group, such as "The Company Administrators." * domain
- String domain name, such as "cymbalgroup.com." * anyone
- No displayName
is present.
Union field _type
.
_type
can be only one of the following:
type
string
The type of the grantee. Supported values include: * user
* group
* domain
* anyone
Union field _email_address
.
_email_address
can be only one of the following:
emailAddress
string
The email address of the user or group to which this permission refers.
Union field _view
.
_view
can be only one of the following:
view
string
Specifies the view to which this permission applies, if any. Supported values include: * published
* metadata
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

