Skip to main content
Glama
benpalmer1

Gorgias MCP Server

by benpalmer1

Create Message

gorgias_create_message

Create a new message on an existing ticket to send to a customer, import an already-sent message, or add an internal note.

Instructions

POST /api/tickets/{ticket_id}/messages — Create a new message on an existing ticket. Supports three use cases: (1) Send to customer — omit sent_datetime, Gorgias sends asynchronously; (2) Import already-sent message — provide sent_datetime; (3) Internal note — set channel to 'internal-note' and public to false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viaYesHow the message was received or sent from Gorgias (e.g. 'api', 'email', 'helpdesk')
metaNoCustom structured metadata. Reserved keys: current_page, relevant_content_indexes, is_quick_reply, campaigns, campaigns_id, self_service_flow.
actionNoControls behavior when an external send action fails: 'force' bypasses the failure, 'retry' retries it, 'cancel' cancels it
macrosNoMacros to apply. Each item must have an id field (integer > 0). Example: [{"id": 42}]
publicNoWhether the message is visible to customers. Set to false for internal notes (default: true)
senderNoThe message originator (user or customer). Object with optional fields: id (integer >= 0), email (string <= 320 chars), name, external_id, channels (array of {type, address}), language, timezone, meta, note. Example: {"id": 93, "email": "agent@example.com"}
sourceNoRouting details for the message. Object with fields: type (TicketMessageSourceType string), from (object with address and name), to (array of address objects), cc (array), bcc (array), extra. Example: {"type": "email", "from": {"address": "sender@example.com", "name": "Sender"}, "to": [{"address": "receiver@example.com", "name": "Receiver"}]}
channelYesChannel used to send the message. Use 'internal-note' for agent-only notes.
headersNoMessage headers as key-value pairs (primarily for email). Example: {"X-Custom-Header": "value"}
subjectNoMessage subject line (primarily for email)
receiverNoThe primary message recipient (user or customer). Optional for internal notes. Same schema as sender: id, email, name, external_id, channels, language, timezone, meta, note. Example: {"id": 8, "email": "customer@example.com"}
body_htmlNoHTML-formatted message body
body_textNoPlain-text message body
ticket_idYesThe ID of the ticket to add the message to
from_agentYestrue if sent by your company (agent), false if sent by a customer
message_idNoID of the message on the originating external service (e.g. email Message-ID header)
attachmentsNoFiles to attach. Each item: url (required URI), name (required), content_type (required MIME type), size (bytes), public (boolean, default true), extra.
external_idNoID of the message in a foreign system (max 255 chars). Not used by Gorgias.
mention_idsNoList of User IDs to mention in an internal note. Only valid for internal-note messages.
sent_datetimeNoISO 8601 datetime when the message was sent. If omitted, Gorgias will send it and populate this field. Providing a value imports the message as already-sent.
stripped_htmlNoHTML body with signatures and prior replies removed
stripped_textNoPlain-text body with signatures and prior replies removed
integration_idNoID of the integration used to send the message (must be > 0)
failed_datetimeNoISO 8601 datetime when the send attempt failed
opened_datetimeNoISO 8601 datetime when the recipient viewed the message
created_datetimeNoISO 8601 datetime when the message was created
deleted_datetimeNoISO 8601 datetime when the message was deleted
last_sending_errorNoDetails of a known sending error. Object with an 'error' string field describing the transmission error.
stripped_signatureNoExtracted signature portion of the message
Behavior4/5

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

Adds context beyond annotations: explains asynchronous sending behavior when sent_datetime is omitted, and how to create internal notes (public=false). No contradiction with readOnlyHint=false.

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

Conciseness5/5

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

Three tightly written sentences, front-loaded with the action and endpoint. No filler.

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?

Despite 29 parameters, the schema covers all semantics and the description covers the three primary scenarios. Missing output format information, but no output schema is provided, and it doesn't hinder correct invocation.

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 has 100% description coverage, so the baseline is 3. The description adds value by grouping parameters into three use cases, clarifying the role of sent_datetime, channel, and public. However, it doesn't explain other complex params like meta or action beyond schema.

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

Purpose5/5

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

The description clearly states 'Create a new message on an existing ticket' with the HTTP endpoint, and it differentiates from sibling tools like get_message/update_message by specifying the creation action and ticket association.

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

Usage Guidelines5/5

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

It explicitly outlines three use cases with specific parameter guidance (omit sent_datetime for send, provide it for import, set channel to internal-note and public=false for notes). This is strong when-to-use guidance, though it doesn't name alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benpalmer1/Gorgias-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server