feat(schemas): add content filter to SearchMessagesSchema

- Added 'content' as an optional field to allow searching for messages
  containing specific text.
This commit is contained in:
Sooty 2025-10-15 16:29:31 +01:00
parent ca68246e9b
commit 457b1e11f3
2 changed files with 2 additions and 0 deletions

View File

@ -136,6 +136,7 @@ export const ListServersSchema = z.object({});
export const SearchMessagesSchema = z.object({ export const SearchMessagesSchema = z.object({
guildId: z.string().min(1, "guildId is required"), guildId: z.string().min(1, "guildId is required"),
// Optional filters // Optional filters
content: z.string().optional(),
authorId: z.string().optional(), authorId: z.string().optional(),
mentions: z.string().optional(), mentions: z.string().optional(),
has: z.enum(['link','embed','file','poll','image','video','sound','sticker','snapshot']).optional(), has: z.enum(['link','embed','file','poll','image','video','sound','sticker','snapshot']).optional(),

View File

@ -309,6 +309,7 @@ export const toolList = [
type: "object", type: "object",
properties: { properties: {
guildId: { type: "string", description: "The ID of the Discord server (guild) to search within" }, 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" }, authorId: { type: "string", description: "Filter messages by a specific user ID" },
mentions: { type: "string", description: "Filter messages that mention 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)" }, has: { type: "string", description: "Filter messages that contain specific content types (e.g., link, embed, file, poll, image, video, sound, sticker, snapshot)" },