From 457b1e11f395749e10cc1ace67fbf779a495c68a Mon Sep 17 00:00:00 2001 From: Sooty <7614538+SootyOwl@users.noreply.github.com> Date: Wed, 15 Oct 2025 16:29:31 +0100 Subject: [PATCH] feat(schemas): add content filter to SearchMessagesSchema - Added 'content' as an optional field to allow searching for messages containing specific text. --- src/schemas.ts | 1 + src/toolList.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/schemas.ts b/src/schemas.ts index f7cadf0..474a3cd 100644 --- a/src/schemas.ts +++ b/src/schemas.ts @@ -136,6 +136,7 @@ export const ListServersSchema = z.object({}); export const SearchMessagesSchema = z.object({ guildId: z.string().min(1, "guildId is required"), // Optional filters + content: z.string().optional(), authorId: z.string().optional(), mentions: z.string().optional(), has: z.enum(['link','embed','file','poll','image','video','sound','sticker','snapshot']).optional(), diff --git a/src/toolList.ts b/src/toolList.ts index 7b4bd7b..1f2c471 100644 --- a/src/toolList.ts +++ b/src/toolList.ts @@ -309,6 +309,7 @@ export const toolList = [ type: "object", properties: { guildId: { type: "string", description: "The ID of the Discord server (guild) to search within" }, + content: { type: "string", description: "Search for messages containing specific text" }, authorId: { type: "string", description: "Filter messages by a specific user ID" }, mentions: { type: "string", description: "Filter messages that mention a specific user ID" }, has: { type: "string", description: "Filter messages that contain specific content types (e.g., link, embed, file, poll, image, video, sound, sticker, snapshot)" },