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

NameTypeRequiredDescription
file_idstringyesThe ID of the file to retrieve
fieldsstringnoComma-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

FieldTypeDescription
idstringFile ID
namestringFile name
mimeTypestringMIME type of the file
sizestringFile size in bytes
createdTimestringISO 8601 creation timestamp
modifiedTimestringISO 8601 last modified timestamp
ownersarrayList of file owners
webViewLinkstringURL to open file in Google Drive web interface
parentsarrayParent folder IDs
sharedbooleanWhether file is shared
permissionsarrayFile permissions
errorstringError code if connection failed
messagestringError 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.

Regenerated from source · build May 9, 2026