Gmail Create Draft
Immutable Catalog Entry
This descriptor comes from the active versioned Portal catalog.
- Contract tier:
agent_ready - Risk:
write - Catalog version:
google-2026.07.12.2 - Descriptor hash:
2370dfe47cca1d1d23fa4300f213f7ae93049f9f49bd49478683812e6efed15b
Use this Gmail write tool to create a draft instead of sending. Prefer drafts when user approval is still needed. It creates or updates Google provider state and requires per-request Google OAuth. The result is returned in a normalized bounded envelope.
Request Body
{
"jsonrpc": "2.0",
"id": "google-gmail-create-draft-example",
"method": "tools/call",
"params": {
"name": "google.gmail_create_draft",
"arguments": {
"to": "to_example",
"subject": "subject_example",
"body": "body_example",
"cc": "cc_example",
"bcc": "bcc_example",
"is_html": false,
"reply_to": "reply_to_example",
"from_alias": "from_alias_example"
}
}
}
Arguments Schema
{
"type": "object",
"title": "gmail_create_draftArguments",
"required": [
"to",
"subject",
"body"
],
"properties": {
"cc": {
"type": "string",
"title": "Cc",
"default": "",
"description": "Optional CC recipients."
},
"to": {
"type": "string",
"title": "To",
"description": "Recipient email address list accepted by Gmail."
},
"bcc": {
"type": "string",
"title": "Bcc",
"default": "",
"description": "Optional BCC recipients."
},
"body": {
"type": "string",
"title": "Body",
"description": "Email body content."
},
"is_html": {
"type": "boolean",
"title": "Is Html",
"default": false,
"description": "Set true when email body is HTML."
},
"subject": {
"type": "string",
"title": "Subject",
"description": "Email subject line."
},
"reply_to": {
"type": "string",
"title": "Reply To",
"default": "",
"description": "Optional Reply-To header."
},
"from_alias": {
"type": "string",
"title": "From Alias",
"default": "",
"description": "Optional configured Gmail send-as alias."
}
},
"additionalProperties": false
}
Output Schema
{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the local or Google provider operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Bounded local navigation or Google provider result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe timing, pagination, cache, request, and truncation metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe structured error when ok is false."
}
},
"description": "Google MCP normalized operation envelope.",
"additionalProperties": false
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "google-gmail-create-draft-example",
"method": "tools/call",
"params": {
"name": "google.gmail_create_draft",
"arguments": {
"to": "to_example",
"subject": "subject_example",
"body": "body_example",
"cc": "cc_example",
"bcc": "bcc_example",
"is_html": false,
"reply_to": "reply_to_example",
"from_alias": "from_alias_example"
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "google-gmail-create-draft-example",
"method": "tools/call",
"params": {
"name": "google.gmail_create_draft",
"arguments": {
"to": "to_example",
"subject": "subject_example",
"body": "body_example",
"cc": "cc_example",
"bcc": "bcc_example",
"is_html": false,
"reply_to": "reply_to_example",
"from_alias": "from_alias_example"
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "google-gmail-create-draft-example",
"method": "tools/call",
"params": {
"name": "google.gmail_create_draft",
"arguments": {
"to": "to_example",
"subject": "subject_example",
"body": "body_example",
"cc": "cc_example",
"bcc": "bcc_example",
"is_html": false,
"reply_to": "reply_to_example",
"from_alias": "from_alias_example"
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 502 Upstream Error
{
"ok": true,
"message": "Tool google.gmail_create_draft executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}
{
"ok": false,
"classification": "upstream_http_error",
"message": "Upstream MCP returned a non-success status."
}