Skip to main content

Add Message Attachments

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEghl.add_message_attachments
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: 2026-07-12.2
  • Descriptor hash: 1a4a32912667254cd8df4b6edee38184249c1bd04d4c2201e664e9880017fbfb

Set attachment URLs on an existing GHL message, replacing any existing attachments. GHL category: Conversations / Messages. Use only for owned remote HTTP(S) file URLs; do not pass local filesystem paths from your own machine. Maximum 5 URLs. Supported by GHL for Custom Call message type. Requires explicit confirmation.

Request Body

{
"jsonrpc": "2.0",
"id": "ghl-add-message-attachments-example",
"method": "tools/call",
"params": {
"name": "ghl.add_message_attachments",
"arguments": {
"messageId": "messageId_123",
"attachments": [],
"confirmApply": "confirmApply_example",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"strictTenant": false
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"messageId",
"attachments",
"confirmApply"
],
"properties": {
"tenantId": {
"type": "string",
"description": "Tenant ID from list_tenants."
},
"messageId": {
"type": "string",
"description": "GHL message ID whose attachments should be replaced."
},
"locationId": {
"type": "string",
"description": "Optional GHL location ID. If provided, it must match the authenticated runtime location; it is not forwarded unless GHL documents it for this operation."
},
"attachments": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"maxItems": 5,
"minItems": 1,
"description": "Remote HTTP(S) attachment URLs to set on the existing message. These replace existing attachments; local file paths, file:// URLs, and relative paths are rejected."
},
"confirmApply": {
"type": "string",
"description": "Required because this replaces attachments on an existing message. Set exactly to \"CONFIRM APPLY\" only after the user explicitly confirms the change."
},
"strictTenant": {
"type": "boolean",
"default": true,
"description": "Require tenantId to match locationId routing (default: true)."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the GHL MCP operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Tool-specific GHL or local navigation result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe execution, routing, and timing metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe error details when ok is false; credential values are never returned."
}
},
"description": "Normalized GHL MCP response 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": "ghl-add-message-attachments-example",
"method": "tools/call",
"params": {
"name": "ghl.add_message_attachments",
"arguments": {
"messageId": "messageId_123",
"attachments": [],
"confirmApply": "confirmApply_example",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"strictTenant": false
}
}
}'

Example Responses

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