Skip to main content
Glama

create_sticker

Create custom stickers for Discord servers by providing an image URL, name, description, and tags to enhance server customization and communication.

Instructions

Create a custom sticker in a server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)
nameYesName for the sticker (2-30 characters)
descriptionYesDescription of the sticker
tagsYesAutocomplete/suggestion tags for the sticker
imageUrlYesURL of the image (PNG, APNG, GIF, or Lottie JSON)
reasonNoReason for creating the sticker

Implementation Reference

  • The handler function that performs the core logic of creating a custom sticker in a Discord server using the guild.stickers.create method, wrapped in error handling, and returns a formatted JSON response.
    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) }] }; }
  • Zod schema validating the input parameters for the create_sticker tool.
    { 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'), },
  • Registers the create_sticker tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
    '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:60-60 (registration)
    Invokes registerEmojiTools to register the emoji and sticker tools, including create_sticker, on the main MCP server instance.
    registerEmojiTools(server);

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/scarecr0w12/discord-mcp'

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