@@ -38,16 +38,18 @@ function createMcpServer(client: Client) {
3838 // Zod schemas from `schemas.ts` where available.
3939 const toolMap : Array < { name : string ; schema ?: any ; handler : any } > = [
4040 { name : 'discord_login' , schema : schemas . DiscordLoginSchema , handler : handlers . loginHandler } ,
41+ { name : 'discord_list_servers' , schema : schemas . ListServersSchema , handler : handlers . listServersHandler } ,
4142 { name : 'discord_send' , schema : schemas . SendMessageSchema , handler : handlers . sendMessageHandler } ,
43+ { name : 'discord_get_server_info' , schema : schemas . GetServerInfoSchema , handler : handlers . getServerInfoHandler } ,
44+ { name : 'discord_create_text_channel' , schema : schemas . CreateTextChannelSchema , handler : handlers . createTextChannelHandler } ,
45+ { name : 'discord_delete_channel' , schema : schemas . DeleteChannelSchema , handler : handlers . deleteChannelHandler } ,
4246 { name : 'discord_get_forum_channels' , schema : schemas . GetForumChannelsSchema , handler : handlers . getForumChannelsHandler } ,
4347 { name : 'discord_create_forum_post' , schema : schemas . CreateForumPostSchema , handler : handlers . createForumPostHandler } ,
4448 { name : 'discord_get_forum_post' , schema : schemas . GetForumPostSchema , handler : handlers . getForumPostHandler } ,
4549 { name : 'discord_reply_to_forum' , schema : schemas . ReplyToForumSchema , handler : handlers . replyToForumHandler } ,
4650 { name : 'discord_delete_forum_post' , schema : schemas . DeleteForumPostSchema , handler : handlers . deleteForumPostHandler } ,
47- { name : 'discord_create_text_channel' , schema : schemas . CreateTextChannelSchema , handler : handlers . createTextChannelHandler } ,
48- { name : 'discord_delete_channel' , schema : schemas . DeleteChannelSchema , handler : handlers . deleteChannelHandler } ,
51+ { name : 'discord_search_messages' , schema : schemas . SearchMessagesSchema , handler : handlers . searchMessagesHandler } ,
4952 { name : 'discord_read_messages' , schema : schemas . ReadMessagesSchema , handler : handlers . readMessagesHandler } ,
50- { name : 'discord_get_server_info' , schema : schemas . GetServerInfoSchema , handler : handlers . getServerInfoHandler } ,
5153 { name : 'discord_add_reaction' , schema : schemas . AddReactionSchema , handler : handlers . addReactionHandler } ,
5254 { name : 'discord_add_multiple_reactions' , schema : schemas . AddMultipleReactionsSchema , handler : handlers . addMultipleReactionsHandler } ,
5355 { name : 'discord_remove_reaction' , schema : schemas . RemoveReactionSchema , handler : handlers . removeReactionHandler } ,
@@ -56,7 +58,6 @@ function createMcpServer(client: Client) {
5658 { name : 'discord_send_webhook_message' , schema : schemas . SendWebhookMessageSchema , handler : handlers . sendWebhookMessageHandler } ,
5759 { name : 'discord_edit_webhook' , schema : schemas . EditWebhookSchema , handler : handlers . editWebhookHandler } ,
5860 { name : 'discord_delete_webhook' , schema : schemas . DeleteWebhookSchema , handler : handlers . deleteWebhookHandler } ,
59- { name : 'discord_list_servers' , schema : schemas . ListServersSchema , handler : handlers . listServersHandler } ,
6061 { name : 'discord_create_category' , schema : schemas . CreateCategorySchema , handler : handlers . createCategoryHandler } ,
6162 { name : 'discord_edit_category' , schema : schemas . EditCategorySchema , handler : handlers . editCategoryHandler } ,
6263 { name : 'discord_delete_category' , schema : schemas . DeleteCategorySchema , handler : handlers . deleteCategoryHandler } ,
@@ -66,12 +67,12 @@ function createMcpServer(client: Client) {
6667 for ( const t of toolMap ) {
6768 try {
6869 server . tool (
69- t . name ,
70+ t . name ,
7071 t . schema ? t . schema . description ?? '' : '' ,
7172 t . schema ? t . schema . shape ?? t . schema : undefined , async ( args : any ) => {
72- // Handlers follow the signature: (args, context) => Promise<ToolResponse>
73- return await t . handler ( args , toolContext ) ;
74- } ) ;
73+ // Handlers follow the signature: (args, context) => Promise<ToolResponse>
74+ return await t . handler ( args , toolContext ) ;
75+ } ) ;
7576 } catch ( err ) {
7677 // If a particular tool registration fails, log and continue (keeps boot resilient)
7778 // eslint-disable-next-line no-console
0 commit comments