Skip to content

webhooks_execute

Category: webhooks

Execute (send a message through) a webhook. Low-level escape hatch.

  • You need a webhook-only feature (no bot user) and already hold the token.
FieldTypeRequiredDescription
webhook_idstringyesWebhook id
tokenstringyesWebhook secret — treat as credential, do not log
contentstringnoMessage text (max 2000 chars)
usernamestringnoOverride the webhook display name for this message
avatar_urlstringnoOverride the webhook avatar URL for this message
ttsbooleanno
embedsarraynoLegacy embeds (V1 layout). For V2 layouts use components_v2_send.
allowed_mentionsobjectno
componentsarraynoV1 action rows OR raw V2 component tree. Prefer components_v2_send for V2 layouts; this is the low-level escape hatch.
attachmentsarrayno
payload_jsonstringno
flagsintegernoMessage flags bitfield. V2 layout = 1<<15 = 32768 (IS_COMPONENTS_V2).
thread_idstringnoPost into this thread (forum/text-thread channels)
thread_namestringnoWhen the parent is a forum, name the new thread
applied_tagsarraynoForum tag ids to apply when creating a thread
pollobjectno
with_componentsbooleannoQuery param: include components in the response message
waitbooleannoQuery param: wait for the message to be created and return it

When wait:true, \{message_id, channel_id, webhook_id\}. Otherwise \{enqueued:true\}.

FieldTypeRequiredDescription
enqueuedbooleanno
message_idstringnoDiscord message ID
channel_idstringnoDiscord channel ID (snowflake)
webhook_idstringnoDiscord webhook ID
PropertyValue
Read-onlyno
Destructiveno
Idempotentno
Open-worldyes
Confirmation requiredno

packages/mcp-core/src/tools/webhooks/execute.ts