drive_create_file
Pack: google_drive · Endpoint: https://gateway.pipeworx.io/google_drive/mcp
Create a new file in Drive with specified name, content, and type (e.g., ‘text/plain’, ‘application/pdf’). Returns the file ID for future reference.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name for the new file |
content | string | yes | Text content of the file |
mime_type | string | yes | MIME type of the file (e.g., “text/plain”, “application/json”, “text/html”) |
parent_folder_id | string | no | ID of the parent folder (optional, defaults to root) |
Example call
Arguments
{
"name": "meeting_notes.txt",
"content": "Q4 Planning Meeting\n- Review sales targets\n- Budget allocation",
"mime_type": "text/plain"
}
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_create_file","arguments":{"name":"meeting_notes.txt","content":"Q4 Planning Meeting\n- Review sales targets\n- Budget allocation","mime_type":"text/plain"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('drive_create_file', {
"name": "meeting_notes.txt",
"content": "Q4 Planning Meeting\n- Review sales targets\n- Budget allocation",
"mime_type": "text/plain"
});
More examples
{
"name": "data.json",
"content": "{\"key\": \"value\"}",
"mime_type": "application/json",
"parent_folder_id": "0a1b2c3d4e5f6g7h8i9j"
}
Response shape
| Field | Type | Description |
|---|---|---|
id | string | ID of the newly created file |
name | string | Name of the created file |
mimeType | string | MIME type of the created file |
webViewLink | string | URL to open file in Google Drive web interface |
error | string | Error code if connection failed |
message | string | Error message with instructions |
Full JSON Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the newly created file"
},
"name": {
"type": "string",
"description": "Name of the created file"
},
"mimeType": {
"type": "string",
"description": "MIME type of the created file"
},
"webViewLink": {
"type": "string",
"description": "URL to open file in Google Drive web interface"
},
"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.