create_sticker
Add custom stickers to Discord servers by providing an image URL, name, description, and tags for server-specific emoji creation.
Instructions
Create a custom sticker in a server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guildId | Yes | The ID of the server (guild) | |
| name | Yes | Name for the sticker (2-30 characters) | |
| description | Yes | Description of the sticker | |
| tags | Yes | Autocomplete/suggestion tags for the sticker | |
| imageUrl | Yes | URL of the image (PNG, APNG, GIF, or Lottie JSON) | |
| reason | No | Reason for creating the sticker |
Implementation Reference
- src/tools/emoji-tools.ts:187-227 (handler)Full handler implementation for the 'create_sticker' MCP tool. Includes input schema validation with Zod, fetches Discord guild, creates sticker using guild.stickers.create() with imageUrl as file, name, description, tags, optional reason; wraps in withErrorHandling utility, returns formatted MCP response with JSON data or error.server.tool( 'create_sticker', 'Create a custom sticker in a server', { guildId: z.string().describe('The ID of the server (guild)'), name: z.string().describe('Name for the sticker (2-30 characters)'), description: z.string().describe('Description of the sticker'), tags: z.string().describe('Autocomplete/suggestion tags for the sticker'), imageUrl: z.string().describe('URL of the image (PNG, APNG, GIF, or Lottie JSON)'), reason: z.string().optional().describe('Reason for creating the sticker'), }, async ({ guildId, name, description, tags, imageUrl, reason }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const sticker = await guild.stickers.create({ file: imageUrl, name, description, tags, reason, }); return { id: sticker.id, name: sticker.name, description: sticker.description, tags: sticker.tags, url: sticker.url, message: 'Sticker created successfully', }; }); if (!result.success) { return { content: [{ type: 'text', text: result.error }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] }; } );
- src/index.ts:59-59 (registration)Top-level MCP server tool registration call to registerEmojiTools(server), which registers the create_sticker tool along with other emoji/sticker tools to the MCP server instance.registerEmojiTools(server);
- src/tools/emoji-tools.ts:190-197 (schema)Input schema (Zod) for create_sticker tool parameters.{ guildId: z.string().describe('The ID of the server (guild)'), name: z.string().describe('Name for the sticker (2-30 characters)'), description: z.string().describe('Description of the sticker'), tags: z.string().describe('Autocomplete/suggestion tags for the sticker'), imageUrl: z.string().describe('URL of the image (PNG, APNG, GIF, or Lottie JSON)'), reason: z.string().optional().describe('Reason for creating the sticker'), },