Skip to main content
Glama
ghl-mcp-server-v2

ghl-mcp-server-v2

by zackscriven

ghl_conversation_upload_file_attachments

Upload file attachments to GoHighLevel conversations or contacts using multipart form data, with support for multiple file types and secure email attachments.

Instructions

multipart/form-data upload. The body schema below carries only the declared form fields (conversationId, contactId, locationId, attachmentUrls, chatServiceSid, isGroupSms) from UploadFilesDto — per the endpoint description, each file's binary content must ALSO be attached as a separate multipart part keyed fileAttachment (buffer), which is not represented in the JSON schema. Allowed file types per spec: JPG, JPEG, PNG, MP4, MPEG, ZIP, RAR, PDF, DOC, DOCX, TXT, MP3, WAV. Upload file attachments Post the necessary fields for the API to upload files. The files need to be a buffer with the key "fileAttachment". Note: One of conversationId or contactId must be provided. File Size Limits: Maximum file size: 5 MBMaximum files per upload: 5 Allowed file types: Images: JPG, JPEG, PNG, GIF, SVG, HEIC, AI Videos: MP4, MPEG, 3GP Audio: MP3, WAV, WAVE, AIFF, AIF, AIFC, GSM, ULAW, OGG, AAC, M4A, AMR Documents: PDF, DOC, DOCX, TXT, CSV, XLS, XLSX, PPT, PPTX, ODT Archives: ZIP, RAR Other: VCF, VCARD (contact files), ICS (calendar files) The API will return an object with the URLs Secure attachments: Set isSecureAttachment to true to upload the file as a secure attachment. This is currently supported for the email channel only; support for the remaining conversation channels is coming. A secure attachment is returned with a /files/d/{slug} URL that is publicly accessible for one hour after upload. After that window the attachment becomes private — to render, download, or retry access, extract the {slug} from the returned URL and call GET /files/d/{slug} with a bearer token Endpoint: POST /conversations/messages/upload (Version header: v3; source: v3/conversations-v3.json) OAuth scopes: conversations/message.write

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "ghl_conversation_upload_file_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesOne of conversationId, contactId, workflowId, or campaignId must be provided

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changedv2.1.0
    • changedInput schema / properties / body / description
      Previous value: -"Request body (schema carried verbatim from the official OpenAPI spec)."New value: +"One of conversationId, contactId, workflowId, or campaignId must be provided"
    • addedInput schema / properties / body / properties / attachmentUrls / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "filePath": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / body / properties / attachmentUrls / description
      Removed value: -"Array of attachment URLs to upload for the conversation"
    • removedInput schema / properties / body / properties / attachmentUrls / example
      Removed value: -[
      -  "https://example.com/files/invoice.pdf"
      -]
    • removedInput schema / properties / body / properties / attachmentUrls / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / body / properties / attachmentUrls / type
      Removed value: -"array"
    • addedInput schema / properties / body / properties / campaignId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Campaign Id",
      +      "example": "ve9EPM428h8vShlRW1KT",
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "filePath": {
      +          "type": "string"
      +        },
      +        "filename": {
      +          "type": "string"
      +        },
      +        "mimeType": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "filePath"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Campaign Id"
      +}
    • removedInput schema / properties / body / properties / chatServiceSid
      Removed value: -{
      -  "description": "Twilio chat service SID for group SMS uploads",
      -  "example": "ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / contactId / anyOf
      Added value: +[
      +  {
      +    "description": "Contact Id",
      +    "example": "ve9EPM428h8vShlRW1KT",
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "filePath": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / body / properties / contactId / example
      Removed value: -"ve9EPM428h8vShlRW1KT"
    • removedInput schema / properties / body / properties / contactId / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / conversationId / anyOf
      Added value: +[
      +  {
      +    "description": "Conversation Id",
      +    "example": "ve9EPM428h8vShlRW1KT",
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "filePath": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / body / properties / conversationId / example
      Removed value: -"ve9EPM428h8vShlRW1KT"
    • removedInput schema / properties / body / properties / conversationId / type
      Removed value: -"string"
    • removedInput schema / properties / body / properties / isGroupSms
      Removed value: -{
      -  "description": "Flag to indicate group SMS upload flow. When true, only 1 file upload is allowed per request.",
      -  "example": "true",
      -  "type": "string"
      -}
    • addedInput schema / properties / body / properties / isSecureAttachment
      Added value: +{
      +  "anyOf": [
      +    {
      +      "default": "false",
      +      "description": "Set to true to upload the file as a secure attachment. Defaults to false. Currently supported for the email channel only; support for the remaining conversation channels is coming. A secure attachment URL is publicly accessible for one hour after upload, after which the file must be fetched with GET /files/d/{slug} using the files.readonly OAuth scope. Considered only until 30 November 2026; from that date every upload is stored as a secure attachment and this field is ignored.",
      +      "example": "false",
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "filePath": {
      +          "type": "string"
      +        },
      +        "filename": {
      +          "type": "string"
      +        },
      +        "mimeType": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "filePath"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Set to true to upload the file as a secure attachment. Defaults to false. Currently supported for the email channel only; support for the remaining conversation channels is coming. A secure attachment URL is publicly accessible for one hour after upload, after which the file must be fetched with GET /files/d/{slug} using the files.readonly OAuth scope. Considered only until 30 November 2026; from that date every upload is stored as a secure attachment and this field is ignored."
      +}
    • addedInput schema / properties / body / properties / locationId / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "filePath": {
      +        "type": "string"
      +      },
      +      "filename": {
      +        "type": "string"
      +      },
      +      "mimeType": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "filePath"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / body / properties / locationId / description
      Removed value: -"Location ID associated with the upload request"
    • removedInput schema / properties / body / properties / locationId / example
      Removed value: -"ve9EPM428h8vShlRW1KT"
    • removedInput schema / properties / body / properties / locationId / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / workflowId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Workflow Id",
      +      "example": "ve9EPM428h8vShlRW1KT",
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "filePath": {
      +          "type": "string"
      +        },
      +        "filename": {
      +          "type": "string"
      +        },
      +        "mimeType": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "filePath"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Workflow Id"
      +}
    • changedInput schema / properties / body / required
      Previous value: -[
      -  "conversationId",
      -  "contactId",
      -  "locationId",
      -  "attachmentUrls"
      -]New value: +[
      +  "locationId",
      +  "attachmentUrls"
      +]
    • addedInput schema / properties / body / title
      Added value: +"UploadFilesDto"
  2. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Excellent disclosure beyond the annotations: it warns that the JSON schema omits the binary part and that each file must be sent as a separate multipart part keyed 'fileAttachment', and it documents the secure-attachment lifecycle (public /files/d/{slug} for one hour, then GET /files/d/{slug} with a bearer token) and that an object with URLs is returned. The one blemish is the internally inconsistent file-type lists, which undermine the otherwise precise ruleset.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The most important fact (multipart binary part not in the schema) is correctly front-loaded, but the text is bloated: secure-attachment behavior is stated twice (once in the prose, once verbatim in the isSecureAttachment parameter description), and the file-type whitelist appears twice with different contents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation upload tool with no output schema, the description covers the mechanics, limits, auth scopes, and return shape well enough to invoke it. What is missing is sibling disambiguation against ghl_conversation_add_message_attachments and resolution of the contradictory allowed-type lists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description genuinely adds value the schema cannot express: the binary 'fileAttachment' multipart part is invisible in the JSON schema and is critical to a correct call. It also restates the one-of identifier constraint, though slightly inconsistently (conversationId/contactId vs the schema's four-way one-of).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Upload file attachments' to a conversation) and the endpoint POST /conversations/messages/upload, so the agent knows exactly what the call does. However, it never distinguishes itself from the very similar sibling ghl_conversation_add_message_attachments (or ghl_media_upload_file), leaving a real ambiguity about which upload tool to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Preconditions are well covered – 'One of conversationId or contactId must be provided', 5 MB / 5 files caps, allowed types, and that isSecureAttachment only works on the email channel. But there is no explicit guidance on when to choose this tool over the sibling attachment/media upload tools, and the two conflicting 'Allowed file types' lists leave the agent unsure which rule applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools