Skip to content

Recipes

The auto-generated Tools reference describes what each of the 192 tools does. These recipes describe how to compose them — the multi-step workflows that come up in real agent loops, with realistic Discord input and output.

Each recipe walks through one use case end-to-end: the user prompt, the chain of tool calls, the JSON shape of every input and output, and the failure modes the agent has to handle. The examples use realistic snowflake IDs and the same JSON envelopes the server actually returns, so they double as integration-test fixtures when you wire up a new client.

The six recipes below cover the most common composition patterns: a destructive batch operation, a rich-layout post, an atomic multi-tool chain, a zero-API-key intelligence task, a high-volume non-bot publishing path, and a push-based subscription model. Pick the closest one to your workflow and adapt from there.

Moderation — bulk ban a raid

Find raid accounts with members_search, confirm with the human, ban up to 200 users in one call. Covers __confirm:true and partial failure handling.

Read recipe →

Components V2 — rich announcement

Compose a launch announcement from sections, a media gallery, and a container; validate before sending; understand the flags = 32768 requirement.

Read recipe →

Pipeline — chain three calls atomically

Use mcp_pipeline to announce, schedule an event, and grant a role in one request. Covers {{step.path}} interpolation and the recursion guard.

Read recipe →

Intelligence — summarize a busy channel

Use MCP sampling to summarize the last 50 messages without an LLM API key. Covers the host_llm_should_process fallback for clients without sampling.

Read recipe →

Webhooks — bypass bot rate limits

Provision a webhook once, then post high-volume notifications without consuming the bot’s bucket. Covers token security and Components V2 over webhooks.

Read recipe →

Gateway — subscribe to live state

Replace REST polling with resources/subscribe backed by Discord Gateway events. Covers the five subscribable URIs, debounce, and client compatibility.

Read recipe →

  • Tool calls are shown as the JSON-RPC tools/call argument shape — the name and arguments fields. Wrap them in your client’s tools/call envelope as needed.
  • Snowflake IDs in examples are realistic 18–19 digit Discord IDs, not placeholder integers. Substitute your own when adapting.
  • Output shapes match what the server actually returns, including the untrusted_* envelopes for user-controlled fields.
  • Internal links use the /discord-mcp/ prefix because the docs site is served from a base path on GitHub Pages.
  • Single tool reference → Tools (192 auto-generated pages).
  • Operational concerns (deploy, observability, security) → Operations.
  • How the server is built → Architecture.
  • Glossary, environment variables, error codes → Reference.