webhooks_get_with_token
Get a webhook by id + token without bot auth.
When to use
Section titled “When to use”- You hold the token (e.g. from
webhooks_create) but lack guild access.
Sends NO Authorization: Bot … header - Discord rejects bot auth on token routes.
MCP call example
Section titled “MCP call example”{ "name": "webhooks_get_with_token", "arguments": { "webhook_id": "123456789012345678", "token": "REPLACE_WITH_TOKENxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }}| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
webhook_id | string | yes | pattern: ^\d{17,20}$ | Webhook to fetch |
token | string | yes | min length: 60; max length: 100 | Webhook secret - treat as credential, do not log |
Complete input JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "webhook_id": { "type": "string", "pattern": "^\\d{17,20}$", "description": "Webhook to fetch" }, "token": { "type": "string", "minLength": 60, "maxLength": 100, "description": "Webhook secret - treat as credential, do not log" } }, "required": [ "webhook_id", "token" ]}Returns
Section titled “Returns”Webhook record. token is preserved here (the caller already has it). name remains raw creator-controlled data; untrusted_name provides a separately fenced copy.
Example structured result
Section titled “Example structured result”{ "id": "123456789012345678", "type": 1, "channel_id": "123456789012345678", "application_id": "123456789012345678", "name": "Example name", "avatar": "example", "untrusted_name": "Example name"}Output schema
Section titled “Output schema”| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string | yes | pattern: ^\d{17,20}$ | Discord webhook ID |
type | integer | yes | ||
channel_id | string | null | yes | ||
application_id | string | null | yes | ||
name | string | null | yes | ||
avatar | string | null | yes | ||
token | string | no | min length: 60; max length: 100 | Discord webhook token (secret - treat as credential, do not log) |
untrusted_name | string | yes |
Complete output JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord webhook ID" }, "type": { "type": "integer" }, "channel_id": { "anyOf": [ { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord channel ID (snowflake)" }, { "type": "null" } ] }, "application_id": { "anyOf": [ { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord application ID" }, { "type": "null" } ] }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "token": { "type": "string", "minLength": 60, "maxLength": 100, "description": "Discord webhook token (secret - treat as credential, do not log)" }, "untrusted_name": { "type": "string" } }, "required": [ "id", "type", "channel_id", "application_id", "name", "avatar", "untrusted_name" ], "additionalProperties": false}Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | yes |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |
Access and common errors
Section titled “Access and common errors”- The
webhookscategory must be enabled byMCP_CATEGORIESwhen an allowlist is set. - Discord authorizes this endpoint with the webhook token in the route; no bot authorization header is sent.
- Treat
tokenas a credential. Invalid or mismatched webhook IDs and tokens surface as authentication or not-found errors.
Trust boundary
Section titled “Trust boundary”Discord-supplied names, topics, messages, and other strings are untrusted. Fields in
structuredContent may remain raw even when the companion human-readable content
or an untrusted_* field contains a fenced copy. Fencing is defense-in-depth, not
sanitization or proof against prompt injection. Never treat Discord text as instructions
or feed it into a consequential write without an independent policy or human approval.
Source
Section titled “Source”packages/mcp-core/src/tools/webhooks/get_with_token.ts