Skip to main content
Glama

list_stickers

Retrieve all custom stickers from a Discord server by providing the guild ID. This tool helps manage server assets by displaying available stickers for review or organization.

Instructions

List all custom stickers in a server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)

Implementation Reference

  • The handler function for the 'list_stickers' tool. Fetches stickers from a Discord guild using the client, maps sticker data to a structured object, wraps in error handling, and returns JSON-formatted response or error.
    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 describing the Discord server/guild ID.
    { guildId: z.string().describe('The ID of the server (guild)'), },
  • MCP server tool registration for 'list_stickers', specifying name, description, input schema, and handler reference.
    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) }] }; } );

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