Add source filters and a full-window media view
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user