Skip to main content
Glama

list_stickers

Retrieve all custom stickers from a Discord server by providing the server ID. This tool helps users view and manage their server's sticker collection.

Instructions

List all custom stickers in a server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)

Implementation Reference

  • Registration of the 'list_stickers' MCP tool, including description, input schema (guildId), and complete handler function that lists custom stickers from a Discord guild.
    server.tool( 'list_stickers', 'List all custom stickers in a server', { guildId: z.string().describe('The ID of the server (guild)'), }, async ({ guildId }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const stickers = await guild.stickers.fetch(); return stickers.map((sticker) => ({ id: sticker.id, name: sticker.name, description: sticker.description, tags: sticker.tags, format: sticker.format, available: sticker.available, guildId: sticker.guildId, user: sticker.user ? { id: sticker.user.id, username: sticker.user.username } : null, url: sticker.url, })); }); 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)
    Top-level registration call that invokes registerEmojiTools to add the 'list_stickers' tool (among others) to the main MCP server instance.
    registerEmojiTools(server);
  • The handler function executing the 'list_stickers' tool logic: fetches Discord client, retrieves guild stickers, maps to formatted objects, handles errors with withErrorHandling, and returns JSON string.
    async ({ guildId }) => { const result = await withErrorHandling(async () => { const client = await getDiscordClient(); const guild = await client.guilds.fetch(guildId); const stickers = await guild.stickers.fetch(); return stickers.map((sticker) => ({ id: sticker.id, name: sticker.name, description: sticker.description, tags: sticker.tags, format: sticker.format, available: sticker.available, guildId: sticker.guildId, user: sticker.user ? { id: sticker.user.id, username: sticker.user.username } : null, url: sticker.url, })); }); if (!result.success) { return { content: [{ type: 'text', text: result.error }], isError: true }; } return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] }; }
  • Input schema for 'list_stickers' tool using Zod: requires guildId as string.
    { guildId: z.string().describe('The ID of the server (guild)'), },

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