Add source filters and a full-window media view

This commit is contained in:
Fisto
2026-09-16 11:11:50 +02:00
parent 2573dd4d63
commit 902646224f
12 changed files with 179 additions and 32 deletions
+7 -2
View File
@@ -823,13 +823,18 @@ function buildServer(): McpServer {
description: "Query media items across scrapes, newest scrape first.",
inputSchema: {
kind: z.enum(["image", "gif", "video", "audio"]).optional(),
source: z
.enum(["attachment", "sticker", "embed"])
.optional()
.describe("Where the item came from"),
scrapeId: z.string().optional().describe("Restrict to one scrape"),
channelId: z.string().optional().describe("Restrict to one source channel"),
limit: z.number().int().min(1).max(500).optional(),
offset: z.number().int().min(0).optional()
}
},
async ({ kind, scrapeId, limit, offset }) =>
jsonText(media.queryMedia({ kind, scrapeId, limit, offset }))
async ({ kind, source, scrapeId, channelId, limit, offset }) =>
jsonText(media.queryMedia({ kind, source, scrapeId, channelId, limit, offset }))
);
server.registerTool(