Skip to main content

Gmail Get Attachment

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

READgoogle.gmail_get_attachment
  • Contract tier: agent_ready
  • Risk: read
  • Catalog version: google-2026.07.12.2
  • Descriptor hash: f5a7989630e3f0f38e4ed8dd20ac81c8366cd09b199de93f936df13bb357ac7a

Fetch Gmail attachment metadata or bounded base64 content. It reads the configured user's Google data through per-request OAuth, does not mutate provider state, and returns a normalized bounded envelope.

Request Body

{
"jsonrpc": "2.0",
"id": "google-gmail-get-attachment-example",
"method": "tools/call",
"params": {
"name": "google.gmail_get_attachment",
"arguments": {
"message_id": "message_id_123",
"attachment_id": "attachment_id_123",
"max_bytes": 1,
"include_content": false
}
}
}

Arguments Schema

{
"type": "object",
"title": "gmail_get_attachmentArguments",
"required": [
"message_id",
"attachment_id"
],
"properties": {
"max_bytes": {
"type": "integer",
"title": "Max Bytes",
"default": 5000000,
"description": "Maximum bytes to return when including file content."
},
"message_id": {
"type": "string",
"title": "Message Id",
"description": "Gmail message ID."
},
"attachment_id": {
"type": "string",
"title": "Attachment Id",
"description": "Gmail attachment ID from a message payload part."
},
"include_content": {
"type": "boolean",
"title": "Include Content",
"default": false,
"description": "Set true to include bounded base64 content in the response."
}
},
"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 -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-get-attachment-example",
"method": "tools/call",
"params": {
"name": "google.gmail_get_attachment",
"arguments": {
"message_id": "message_id_123",
"attachment_id": "attachment_id_123",
"max_bytes": 1,
"include_content": false
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool google.gmail_get_attachment executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}