Add message counting and date-bounded scrapes
This commit is contained in:
@@ -778,10 +778,12 @@ function buildServer(): McpServer {
|
||||
downloadDir: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe("Absolute destination for downloads; previews stay local")
|
||||
.describe("Absolute destination for downloads; previews stay local"),
|
||||
after: z.string().optional().describe("From-date ISO; the walk stops below it"),
|
||||
before: z.string().optional().describe("To-date ISO; the walk starts just below it")
|
||||
}
|
||||
},
|
||||
async ({ channelId, guildId, mode, backend, confirm, downloadDir }) =>
|
||||
async ({ channelId, guildId, mode, backend, confirm, downloadDir, after, before }) =>
|
||||
jsonText(
|
||||
await media.startScrape({
|
||||
channelId,
|
||||
@@ -789,7 +791,32 @@ function buildServer(): McpServer {
|
||||
mode,
|
||||
backend,
|
||||
confirm,
|
||||
downloadDir: downloadDir ?? null
|
||||
downloadDir: downloadDir ?? null,
|
||||
after: after ?? null,
|
||||
before: before ?? null
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
server.registerTool(
|
||||
"count_media_messages",
|
||||
{
|
||||
description:
|
||||
"Discord search total for a channel or date range. Guild channels with slopbot only; DMs and group chats are not available.",
|
||||
inputSchema: {
|
||||
channelId: z.string(),
|
||||
guildId: z.string().optional(),
|
||||
after: z.string().optional().describe("From-date ISO"),
|
||||
before: z.string().optional().describe("To-date ISO")
|
||||
}
|
||||
},
|
||||
async ({ channelId, guildId, after, before }) =>
|
||||
jsonText(
|
||||
await media.countMessages({
|
||||
channelId,
|
||||
guildId: guildId ?? null,
|
||||
after: after ?? null,
|
||||
before: before ?? null
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user