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

NameTypeRequiredDescription
namestringyesName for the new file
contentstringyesText content of the file
mime_typestringyesMIME type of the file (e.g., “text/plain”, “application/json”, “text/html”)
parent_folder_idstringnoID 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

FieldTypeDescription
idstringID of the newly created file
namestringName of the created file
mimeTypestringMIME type of the created file
webViewLinkstringURL to open file in Google Drive web interface
errorstringError code if connection failed
messagestringError 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.

Regenerated from source · build May 9, 2026