drive_get_file
Pack: google_drive · Endpoint: https://gateway.pipeworx.io/google_drive/mcp
Get metadata for a specific Drive file by ID. Returns name, type, size, owners, permissions, creation date, and last modified time.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
file_id | string | yes | The ID of the file to retrieve |
fields | string | no | Comma-separated list of fields to include (default: id,name,mimeType,size,createdTime,modifiedTime,owners,webViewLink) |
Example call
Arguments
{
"file_id": "1a2b3c4d5e6f7g8h9i0j"
}
curl
curl -X POST https://gateway.pipeworx.io/google_drive/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"drive_get_file","arguments":{"file_id":"1a2b3c4d5e6f7g8h9i0j"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('drive_get_file', {
"file_id": "1a2b3c4d5e6f7g8h9i0j"
});
More examples
{
"file_id": "1a2b3c4d5e6f7g8h9i0j",
"fields": "id,name,mimeType,size,webViewLink"
}
Response shape
| Field | Type | Description |
|---|---|---|
id | string | File ID |
name | string | File name |
mimeType | string | MIME type of the file |
size | string | File size in bytes |
createdTime | string | ISO 8601 creation timestamp |
modifiedTime | string | ISO 8601 last modified timestamp |
owners | array | List of file owners |
webViewLink | string | URL to open file in Google Drive web interface |
parents | array | Parent folder IDs |
shared | boolean | Whether file is shared |
permissions | array | File permissions |
error | string | Error code if connection failed |
message | string | Error message with instructions |
Full JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "File ID"
},
"name": {
"type": "string",
"description": "File name"
},
"mimeType": {
"type": "string",
"description": "MIME type of the file"
},
"size": {
"type": "string",
"description": "File size in bytes"
},
"createdTime": {
"type": "string",
"description": "ISO 8601 creation timestamp"
},
"modifiedTime": {
"type": "string",
"description": "ISO 8601 last modified timestamp"
},
"owners": {
"type": "array",
"description": "List of file owners",
"items": {
"type": "object",
"properties": {
"displayName": {
"type": "string",
"description": "Owner display name"
},
"emailAddress": {
"type": "string",
"description": "Owner email address"
}
}
}
},
"webViewLink": {
"type": "string",
"description": "URL to open file in Google Drive web interface"
},
"parents": {
"type": "array",
"description": "Parent folder IDs",
"items": {
"type": "string"
}
},
"shared": {
"type": "boolean",
"description": "Whether file is shared"
},
"permissions": {
"type": "array",
"description": "File permissions",
"items": {
"type": "object"
}
},
"error": {
"type": "string",
"description": "Error code if connection failed"
},
"message": {
"type": "string",
"description": "Error message with instructions"
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"google_drive": {
"url": "https://gateway.pipeworx.io/google_drive/mcp"
}
}
}
See Getting Started for client-specific install steps.