工具:get_file_permissions
呼叫這項工具,列出雲端硬碟檔案的權限。
以下範例示範如何使用 curl 叫用 get_file_permissions MCP 工具。
| Curl 要求 |
|---|
curl --location 'https://drivemcp.googleapis.com/mcp/v1' \ --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's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
輸入內容的結構定義
要求取得檔案權限。
GetFilePermissionsRequest
| JSON 表示法 |
|---|
{ "fileId": string } |
| 欄位 | |
|---|---|
fileId |
必填。要取得權限的檔案 ID。 |
輸出內容的結構定義
取得檔案權限的回應。
GetFilePermissionsResponse
| JSON 表示法 |
|---|
{
"permissions": [
{
object ( |
| 欄位 | |
|---|---|
permissions[] |
權限清單。 |
權限
| JSON 表示法 |
|---|
{ "role": string "displayName": string "type": string "emailAddress": string "view": string } |
| 欄位 | |
|---|---|
聯集欄位
|
|
role |
檔案的受讓人角色。可能角色包括:* |
聯集欄位
|
|
displayName |
僅供輸出。權限值的「可識別」名稱。以下列出每種權限類型的範例:* |
聯集欄位
|
|
type |
受讓人類型。支援的值包括:* |
聯集欄位
|
|
emailAddress |
這個權限參照的使用者或群組的電子郵件地址。 |
聯集欄位
|
|
view |
指定這項權限適用的檢視區塊 (如有)。支援的值包括:* |
工具註解
破壞性提示:❌ | 等冪提示:✅ | 唯讀提示:✅ | 開放世界提示:❌