@uniquedivine/mcp-discord 1.3.8 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +20 -2
- package/src/jiyuuMcpInfo.ts +92 -30
- package/src/toolList.ts +203 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Requirements: [Bun](https://bun.sh) 1.4.3 or newer and a Discord bot token.
|
|
|
15
15
|
published package with an exact version pin:
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
DISCORD_TOKEN=your_discord_bot_token bunx @uniquedivine/mcp-discord@1.3.
|
|
18
|
+
DISCORD_TOKEN=your_discord_bot_token bunx @uniquedivine/mcp-discord@1.3.9
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
CI in [Unique-Divine/jiyuu](https://github.com/Unique-Divine/jiyuu) builds and
|
|
@@ -26,7 +26,7 @@ version changes on `main`. The version pin selects the exact reviewed release th
|
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
28
|
claude mcp add discord --env DISCORD_TOKEN=your_discord_bot_token \
|
|
29
|
-
-- bunx @uniquedivine/mcp-discord@1.3.
|
|
29
|
+
-- bunx @uniquedivine/mcp-discord@1.3.9
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
### Codex
|
|
@@ -36,7 +36,7 @@ Add this entry to file `~/.codex/config.toml`:
|
|
|
36
36
|
```toml
|
|
37
37
|
[mcp_servers.discord]
|
|
38
38
|
command = "bunx"
|
|
39
|
-
args = ["@uniquedivine/mcp-discord@1.3.
|
|
39
|
+
args = ["@uniquedivine/mcp-discord@1.3.9"]
|
|
40
40
|
env = { DISCORD_TOKEN = "your_discord_bot_token" }
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -50,7 +50,7 @@ a project:
|
|
|
50
50
|
"mcpServers": {
|
|
51
51
|
"discord": {
|
|
52
52
|
"command": "bunx",
|
|
53
|
-
"args": ["@uniquedivine/mcp-discord@1.3.
|
|
53
|
+
"args": ["@uniquedivine/mcp-discord@1.3.9"],
|
|
54
54
|
"env": { "DISCORD_TOKEN": "your_discord_bot_token" }
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -61,7 +61,7 @@ a project:
|
|
|
61
61
|
|
|
62
62
|
1. Find the newest version with command
|
|
63
63
|
`npm view @uniquedivine/mcp-discord version`.
|
|
64
|
-
2. Change the `@1.3.
|
|
64
|
+
2. Change the `@1.3.9` pin in the client configuration to that version.
|
|
65
65
|
3. Restart the MCP server in the client, or restart the client. In Claude
|
|
66
66
|
Code, run `/mcp` and reconnect the server. Command `bunx` downloads the new
|
|
67
67
|
version on the next launch.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniquedivine/mcp-discord",
|
|
3
3
|
"mcpName": "io.github.unique-divine/mcp-discord",
|
|
4
|
-
"version": "1.3.
|
|
5
|
-
"description": "Discord MCP server maintained in Jiyuu",
|
|
4
|
+
"version": "1.3.9",
|
|
5
|
+
"description": "Discord MCP server maintained in Jiyuu. Manages channels, forums, messages, reactions, roles, and webhooks through a Discord bot.",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"mcp-discord": "src/index.ts"
|
|
@@ -67,6 +67,24 @@
|
|
|
67
67
|
"version": "1.3.8",
|
|
68
68
|
"tag": "v1.4.0",
|
|
69
69
|
"commit": "5c67e9d714971490aaedf8fab21753d7704bd4fa"
|
|
70
|
+
},
|
|
71
|
+
"site": {
|
|
72
|
+
"tools": [
|
|
73
|
+
"src/toolList.ts#toolList",
|
|
74
|
+
"src/jiyuuMcpInfo.ts#MCP_INFO_TOOL"
|
|
75
|
+
],
|
|
76
|
+
"env": [
|
|
77
|
+
{
|
|
78
|
+
"name": "DISCORD_TOKEN",
|
|
79
|
+
"required": false,
|
|
80
|
+
"secret": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "JIYUU_MCP_NO_UPDATE_CHECK",
|
|
84
|
+
"required": false,
|
|
85
|
+
"secret": false
|
|
86
|
+
}
|
|
87
|
+
]
|
|
70
88
|
}
|
|
71
89
|
}
|
|
72
90
|
}
|
package/src/jiyuuMcpInfo.ts
CHANGED
|
@@ -8,11 +8,19 @@
|
|
|
8
8
|
* tests fail when the copies drift apart.
|
|
9
9
|
*
|
|
10
10
|
* The server never updates itself: the client config pins an exact version,
|
|
11
|
-
* so what runs is what was reviewed.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* so what runs is what was reviewed. Two callers read the npm registry's
|
|
12
|
+
* latest version, each with a 2 s timeout:
|
|
13
|
+
*
|
|
14
|
+
* - At startup, in the background, through a 1 h cache. The first successful
|
|
15
|
+
* tool result after that check carries a one-line notice when the running
|
|
16
|
+
* version is behind. Failures are silent.
|
|
17
|
+
* - Tool mcp_info reads the registry on every call and rewrites the cache.
|
|
18
|
+
* When the registry can't be read, it reports the cached answer and marks
|
|
19
|
+
* it with source "cache".
|
|
20
|
+
*
|
|
21
|
+
* A cached latest version older than the running version is out of date, so
|
|
22
|
+
* both callers ignore it. Set JIYUU_MCP_NO_UPDATE_CHECK=1 to turn the check
|
|
23
|
+
* off.
|
|
16
24
|
*/
|
|
17
25
|
import { execFile } from "node:child_process";
|
|
18
26
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
@@ -20,7 +28,7 @@ import { homedir } from "node:os";
|
|
|
20
28
|
import { dirname, join, resolve, sep } from "node:path";
|
|
21
29
|
|
|
22
30
|
export const OPT_OUT_ENV = "JIYUU_MCP_NO_UPDATE_CHECK";
|
|
23
|
-
export const CACHE_TTL_MS =
|
|
31
|
+
export const CACHE_TTL_MS = 60 * 60 * 1000;
|
|
24
32
|
export const FETCH_TIMEOUT_MS = 2000;
|
|
25
33
|
/** Only names Jiyuu publishes are checked; upstream names are someone else's. */
|
|
26
34
|
export const PUBLISHED_SCOPE = "@uniquedivine/";
|
|
@@ -44,6 +52,8 @@ export interface UpdateStatus {
|
|
|
44
52
|
runningVersion: string;
|
|
45
53
|
latestVersion: string;
|
|
46
54
|
checkedAt: string;
|
|
55
|
+
/** "live" when this call read the registry; "cache" for a cached answer. */
|
|
56
|
+
source: "live" | "cache";
|
|
47
57
|
}
|
|
48
58
|
|
|
49
59
|
export interface GitState {
|
|
@@ -156,7 +166,7 @@ export function isNewer(candidate: string, running: string): boolean {
|
|
|
156
166
|
return compareIdentifiers(c.prerelease, r.prerelease) > 0;
|
|
157
167
|
}
|
|
158
168
|
|
|
159
|
-
export function updateAvailable(status: UpdateStatus | null):
|
|
169
|
+
export function updateAvailable(status: UpdateStatus | null): status is UpdateStatus {
|
|
160
170
|
return status !== null && isNewer(status.latestVersion, status.runningVersion);
|
|
161
171
|
}
|
|
162
172
|
|
|
@@ -181,16 +191,26 @@ export function cacheFile(cacheDir: string, name: string): string {
|
|
|
181
191
|
return join(cacheDir, `${name.replace(/[^A-Za-z0-9._-]/g, "_")}.json`);
|
|
182
192
|
}
|
|
183
193
|
|
|
194
|
+
export interface CacheReadOptions {
|
|
195
|
+
/** A cached latest version older than this one is out of date. */
|
|
196
|
+
runningVersion?: string;
|
|
197
|
+
/** Maximum entry age; null accepts any age. */
|
|
198
|
+
maxAgeMs?: number | null;
|
|
199
|
+
}
|
|
200
|
+
|
|
184
201
|
export function readCache(
|
|
185
202
|
path: string,
|
|
186
203
|
name: string,
|
|
187
204
|
now: Date,
|
|
205
|
+
options: CacheReadOptions = {},
|
|
188
206
|
): { latestVersion: string; checkedAt: string } | null {
|
|
189
207
|
try {
|
|
190
208
|
const data = JSON.parse(readFileSync(path, "utf8"));
|
|
191
209
|
if (data?.name !== name || typeof data.latestVersion !== "string") return null;
|
|
210
|
+
const { runningVersion, maxAgeMs = CACHE_TTL_MS } = options;
|
|
211
|
+
if (runningVersion !== undefined && isNewer(runningVersion, data.latestVersion)) return null;
|
|
192
212
|
const age = now.getTime() - Date.parse(data.checkedAt);
|
|
193
|
-
if (!(age >= 0 && age <
|
|
213
|
+
if (!(age >= 0 && (maxAgeMs === null || age < maxAgeMs))) return null;
|
|
194
214
|
return { latestVersion: data.latestVersion, checkedAt: data.checkedAt };
|
|
195
215
|
} catch {
|
|
196
216
|
return null;
|
|
@@ -225,23 +245,15 @@ export interface CheckOptions {
|
|
|
225
245
|
timeoutMs?: number;
|
|
226
246
|
}
|
|
227
247
|
|
|
228
|
-
/**
|
|
229
|
-
|
|
230
|
-
* null when the check is off, the name isn't Jiyuu's, or the registry can't be
|
|
231
|
-
* read. Never throws.
|
|
232
|
-
*/
|
|
233
|
-
export async function checkForUpdate(
|
|
248
|
+
/** Read the registry and rewrite the cache; null on any failure. */
|
|
249
|
+
async function readRegistry(
|
|
234
250
|
name: string,
|
|
235
251
|
runningVersion: string,
|
|
236
|
-
|
|
252
|
+
path: string,
|
|
253
|
+
now: Date,
|
|
254
|
+
options: CheckOptions,
|
|
237
255
|
): Promise<UpdateStatus | null> {
|
|
238
|
-
const env = options.env ?? process.env;
|
|
239
|
-
if (checkDisabled(env) || !isPublishedName(name)) return null;
|
|
240
256
|
try {
|
|
241
|
-
const now = options.now ?? new Date();
|
|
242
|
-
const path = cacheFile(options.cacheDir ?? defaultCacheDir(env), name);
|
|
243
|
-
const cached = readCache(path, name, now);
|
|
244
|
-
if (cached) return { name, runningVersion, ...cached };
|
|
245
257
|
const body = await (options.fetch ?? fetchText)(
|
|
246
258
|
latestVersionUrl(name),
|
|
247
259
|
options.timeoutMs ?? FETCH_TIMEOUT_MS,
|
|
@@ -250,12 +262,51 @@ export async function checkForUpdate(
|
|
|
250
262
|
if (!latestVersion) return null;
|
|
251
263
|
const checkedAt = now.toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
252
264
|
writeCache(path, { name, latestVersion, checkedAt });
|
|
253
|
-
return { name, runningVersion, latestVersion, checkedAt };
|
|
265
|
+
return { name, runningVersion, latestVersion, checkedAt, source: "live" };
|
|
254
266
|
} catch {
|
|
255
267
|
return null;
|
|
256
268
|
}
|
|
257
269
|
}
|
|
258
270
|
|
|
271
|
+
/**
|
|
272
|
+
* The startup check: a fresh cache entry if one exists, else the registry.
|
|
273
|
+
* Returns null when the check is off, the name isn't Jiyuu's, or the registry
|
|
274
|
+
* can't be read. Never throws.
|
|
275
|
+
*/
|
|
276
|
+
export async function checkForUpdate(
|
|
277
|
+
name: string,
|
|
278
|
+
runningVersion: string,
|
|
279
|
+
options: CheckOptions = {},
|
|
280
|
+
): Promise<UpdateStatus | null> {
|
|
281
|
+
const env = options.env ?? process.env;
|
|
282
|
+
if (checkDisabled(env) || !isPublishedName(name)) return null;
|
|
283
|
+
const now = options.now ?? new Date();
|
|
284
|
+
const path = cacheFile(options.cacheDir ?? defaultCacheDir(env), name);
|
|
285
|
+
const cached = readCache(path, name, now, { runningVersion });
|
|
286
|
+
if (cached) return { name, runningVersion, ...cached, source: "cache" };
|
|
287
|
+
return await readRegistry(name, runningVersion, path, now, options);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The mcp_info check: always the registry, then the cache of any age when the
|
|
292
|
+
* registry can't be read. Returns null when the check is off, the name isn't
|
|
293
|
+
* Jiyuu's, or neither source has an answer. Never throws.
|
|
294
|
+
*/
|
|
295
|
+
export async function checkLatest(
|
|
296
|
+
name: string,
|
|
297
|
+
runningVersion: string,
|
|
298
|
+
options: CheckOptions = {},
|
|
299
|
+
): Promise<UpdateStatus | null> {
|
|
300
|
+
const env = options.env ?? process.env;
|
|
301
|
+
if (checkDisabled(env) || !isPublishedName(name)) return null;
|
|
302
|
+
const now = options.now ?? new Date();
|
|
303
|
+
const path = cacheFile(options.cacheDir ?? defaultCacheDir(env), name);
|
|
304
|
+
const live = await readRegistry(name, runningVersion, path, now, options);
|
|
305
|
+
if (live) return live;
|
|
306
|
+
const cached = readCache(path, name, now, { runningVersion, maxAgeMs: null });
|
|
307
|
+
return cached ? { name, runningVersion, ...cached, source: "cache" } : null;
|
|
308
|
+
}
|
|
309
|
+
|
|
259
310
|
export function formatNotice(status: UpdateStatus): string {
|
|
260
311
|
return (
|
|
261
312
|
`Update available: ${status.name} ${status.latestVersion} ` +
|
|
@@ -351,7 +402,7 @@ export function buildMcpInfo(input: McpInfoInput): Record<string, unknown> {
|
|
|
351
402
|
if (checkDisabled(env)) notChecked = `disabled by ${OPT_OUT_ENV}`;
|
|
352
403
|
else if (!isPublishedName(identity.name))
|
|
353
404
|
notChecked = `'${identity.name}' is not a name Jiyuu publishes`;
|
|
354
|
-
else if (!status) notChecked = "
|
|
405
|
+
else if (!status) notChecked = "registry unreachable and no cached result";
|
|
355
406
|
return {
|
|
356
407
|
server: input.server,
|
|
357
408
|
name: identity.name,
|
|
@@ -366,7 +417,9 @@ export function buildMcpInfo(input: McpInfoInput): Record<string, unknown> {
|
|
|
366
417
|
latestVersion: status?.latestVersion ?? null,
|
|
367
418
|
updateAvailable: updateAvailable(status),
|
|
368
419
|
checkedAt: status?.checkedAt ?? null,
|
|
369
|
-
|
|
420
|
+
// Only an upgrade gets a command; a pin to an older release downgrades.
|
|
421
|
+
pinCommand: updateAvailable(status) ? pinCommand(status.name, status.latestVersion) : null,
|
|
422
|
+
source: status?.source ?? null,
|
|
370
423
|
notChecked,
|
|
371
424
|
},
|
|
372
425
|
runtime: {
|
|
@@ -381,27 +434,36 @@ export function buildMcpInfo(input: McpInfoInput): Record<string, unknown> {
|
|
|
381
434
|
};
|
|
382
435
|
}
|
|
383
436
|
|
|
437
|
+
export interface JiyuuMcpInfoChecks {
|
|
438
|
+
/** The startup check behind the one-time notice; default checkForUpdate. */
|
|
439
|
+
startup?: () => Promise<UpdateStatus | null>;
|
|
440
|
+
/** The check each mcp_info call runs; default checkLatest. */
|
|
441
|
+
live?: (env: Env) => Promise<UpdateStatus | null>;
|
|
442
|
+
}
|
|
443
|
+
|
|
384
444
|
/** Wire-up for one server process: identity, notifier and the tool body. */
|
|
385
445
|
export class JiyuuMcpInfo {
|
|
386
446
|
readonly identity: PackageIdentity;
|
|
387
447
|
readonly notifier: UpdateNotifier;
|
|
448
|
+
private readonly liveCheck: (env: Env) => Promise<UpdateStatus | null>;
|
|
388
449
|
|
|
389
450
|
constructor(
|
|
390
451
|
private readonly server: string,
|
|
391
452
|
packageRoot: string,
|
|
392
453
|
private readonly envPrefixes: string[],
|
|
393
|
-
|
|
454
|
+
checks: JiyuuMcpInfoChecks = {},
|
|
394
455
|
) {
|
|
395
456
|
this.identity = readPackageIdentity(packageRoot);
|
|
396
457
|
const { name, version } = this.identity;
|
|
397
|
-
this.notifier = new UpdateNotifier(
|
|
458
|
+
this.notifier = new UpdateNotifier(checks.startup ?? (() => checkForUpdate(name, version)));
|
|
459
|
+
this.liveCheck = checks.live ?? ((env) => checkLatest(name, version, { env }));
|
|
398
460
|
}
|
|
399
461
|
|
|
400
462
|
async callTool(env: Env = process.env) {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
463
|
+
const [status, git] = await Promise.all([
|
|
464
|
+
this.liveCheck(env).catch(() => null),
|
|
465
|
+
this.identity.provenance === "source-checkout" ? gitState(this.identity.root) : null,
|
|
466
|
+
]);
|
|
405
467
|
const report = buildMcpInfo({
|
|
406
468
|
server: this.server,
|
|
407
469
|
identity: this.identity,
|
package/src/toolList.ts
CHANGED
|
@@ -11,6 +11,11 @@ export const toolList = [
|
|
|
11
11
|
reason: { type: "string" }
|
|
12
12
|
},
|
|
13
13
|
required: ["guildId", "name"]
|
|
14
|
+
},
|
|
15
|
+
annotations: {
|
|
16
|
+
title: "Create Category",
|
|
17
|
+
readOnlyHint: false,
|
|
18
|
+
destructiveHint: false
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
21
|
{
|
|
@@ -25,6 +30,11 @@ export const toolList = [
|
|
|
25
30
|
reason: { type: "string" }
|
|
26
31
|
},
|
|
27
32
|
required: ["categoryId"]
|
|
33
|
+
},
|
|
34
|
+
annotations: {
|
|
35
|
+
title: "Edit Category",
|
|
36
|
+
readOnlyHint: false,
|
|
37
|
+
destructiveHint: true
|
|
28
38
|
}
|
|
29
39
|
},
|
|
30
40
|
{
|
|
@@ -37,6 +47,11 @@ export const toolList = [
|
|
|
37
47
|
reason: { type: "string" }
|
|
38
48
|
},
|
|
39
49
|
required: ["categoryId"]
|
|
50
|
+
},
|
|
51
|
+
annotations: {
|
|
52
|
+
title: "Delete Category",
|
|
53
|
+
readOnlyHint: false,
|
|
54
|
+
destructiveHint: true
|
|
40
55
|
}
|
|
41
56
|
},
|
|
42
57
|
{
|
|
@@ -48,6 +63,11 @@ export const toolList = [
|
|
|
48
63
|
token: { type: "string" }
|
|
49
64
|
},
|
|
50
65
|
required: []
|
|
66
|
+
},
|
|
67
|
+
annotations: {
|
|
68
|
+
title: "Log In",
|
|
69
|
+
readOnlyHint: false,
|
|
70
|
+
destructiveHint: false
|
|
51
71
|
}
|
|
52
72
|
},
|
|
53
73
|
{
|
|
@@ -61,6 +81,11 @@ export const toolList = [
|
|
|
61
81
|
replyToMessageId: { type: "string" }
|
|
62
82
|
},
|
|
63
83
|
required: ["channelId", "message"]
|
|
84
|
+
},
|
|
85
|
+
annotations: {
|
|
86
|
+
title: "Send Message",
|
|
87
|
+
readOnlyHint: false,
|
|
88
|
+
destructiveHint: false
|
|
64
89
|
}
|
|
65
90
|
},
|
|
66
91
|
{
|
|
@@ -72,6 +97,10 @@ export const toolList = [
|
|
|
72
97
|
guildId: { type: "string" }
|
|
73
98
|
},
|
|
74
99
|
required: ["guildId"]
|
|
100
|
+
},
|
|
101
|
+
annotations: {
|
|
102
|
+
title: "List Forum Channels",
|
|
103
|
+
readOnlyHint: true
|
|
75
104
|
}
|
|
76
105
|
},
|
|
77
106
|
{
|
|
@@ -89,6 +118,11 @@ export const toolList = [
|
|
|
89
118
|
}
|
|
90
119
|
},
|
|
91
120
|
required: ["forumChannelId", "title", "content"]
|
|
121
|
+
},
|
|
122
|
+
annotations: {
|
|
123
|
+
title: "Create Forum Post",
|
|
124
|
+
readOnlyHint: false,
|
|
125
|
+
destructiveHint: false
|
|
92
126
|
}
|
|
93
127
|
},
|
|
94
128
|
{
|
|
@@ -100,6 +134,10 @@ export const toolList = [
|
|
|
100
134
|
threadId: { type: "string" }
|
|
101
135
|
},
|
|
102
136
|
required: ["threadId"]
|
|
137
|
+
},
|
|
138
|
+
annotations: {
|
|
139
|
+
title: "Get Forum Post",
|
|
140
|
+
readOnlyHint: true
|
|
103
141
|
}
|
|
104
142
|
},
|
|
105
143
|
{
|
|
@@ -113,6 +151,10 @@ export const toolList = [
|
|
|
113
151
|
limit: { type: "number", description: "Maximum number of archived threads to fetch (default: 100, max: 100)", minimum: 1, maximum: 100, default: 100 }
|
|
114
152
|
},
|
|
115
153
|
required: ["forumChannelId"]
|
|
154
|
+
},
|
|
155
|
+
annotations: {
|
|
156
|
+
title: "List Forum Threads",
|
|
157
|
+
readOnlyHint: true
|
|
116
158
|
}
|
|
117
159
|
},
|
|
118
160
|
{
|
|
@@ -125,6 +167,11 @@ export const toolList = [
|
|
|
125
167
|
message: { type: "string" }
|
|
126
168
|
},
|
|
127
169
|
required: ["threadId", "message"]
|
|
170
|
+
},
|
|
171
|
+
annotations: {
|
|
172
|
+
title: "Reply to Forum Post",
|
|
173
|
+
readOnlyHint: false,
|
|
174
|
+
destructiveHint: false
|
|
128
175
|
}
|
|
129
176
|
},
|
|
130
177
|
{
|
|
@@ -139,6 +186,11 @@ export const toolList = [
|
|
|
139
186
|
categoryId: { type: "string", description: "Parent category ID to place the channel under" }
|
|
140
187
|
},
|
|
141
188
|
required: ["guildId", "channelName"]
|
|
189
|
+
},
|
|
190
|
+
annotations: {
|
|
191
|
+
title: "Create Text Channel",
|
|
192
|
+
readOnlyHint: false,
|
|
193
|
+
destructiveHint: false
|
|
142
194
|
}
|
|
143
195
|
},
|
|
144
196
|
{
|
|
@@ -153,6 +205,11 @@ export const toolList = [
|
|
|
153
205
|
categoryId: { type: "string", description: "The ID of the parent category to create the channel under" }
|
|
154
206
|
},
|
|
155
207
|
required: ["guildId", "name"]
|
|
208
|
+
},
|
|
209
|
+
annotations: {
|
|
210
|
+
title: "Create Forum Channel",
|
|
211
|
+
readOnlyHint: false,
|
|
212
|
+
destructiveHint: false
|
|
156
213
|
}
|
|
157
214
|
},
|
|
158
215
|
{
|
|
@@ -169,6 +226,11 @@ export const toolList = [
|
|
|
169
226
|
reason: { type: "string", description: "Reason for editing (shown in audit log)" }
|
|
170
227
|
},
|
|
171
228
|
required: ["channelId"]
|
|
229
|
+
},
|
|
230
|
+
annotations: {
|
|
231
|
+
title: "Edit Channel",
|
|
232
|
+
readOnlyHint: false,
|
|
233
|
+
destructiveHint: true
|
|
172
234
|
}
|
|
173
235
|
},
|
|
174
236
|
{
|
|
@@ -181,6 +243,11 @@ export const toolList = [
|
|
|
181
243
|
reason: { type: "string" }
|
|
182
244
|
},
|
|
183
245
|
required: ["channelId"]
|
|
246
|
+
},
|
|
247
|
+
annotations: {
|
|
248
|
+
title: "Delete Channel",
|
|
249
|
+
readOnlyHint: false,
|
|
250
|
+
destructiveHint: true
|
|
184
251
|
}
|
|
185
252
|
},
|
|
186
253
|
{
|
|
@@ -201,6 +268,10 @@ export const toolList = [
|
|
|
201
268
|
around: { type: "string", description: "Snowflake ID or ISO 8601 date (e.g. '2025-03-01T00:00:00Z'). Get messages around this point." }
|
|
202
269
|
},
|
|
203
270
|
required: ["channelId"]
|
|
271
|
+
},
|
|
272
|
+
annotations: {
|
|
273
|
+
title: "Read Messages",
|
|
274
|
+
readOnlyHint: true
|
|
204
275
|
}
|
|
205
276
|
},
|
|
206
277
|
{
|
|
@@ -212,6 +283,10 @@ export const toolList = [
|
|
|
212
283
|
guildId: { type: "string" }
|
|
213
284
|
},
|
|
214
285
|
required: ["guildId"]
|
|
286
|
+
},
|
|
287
|
+
annotations: {
|
|
288
|
+
title: "Get Server Info",
|
|
289
|
+
readOnlyHint: true
|
|
215
290
|
}
|
|
216
291
|
},
|
|
217
292
|
{
|
|
@@ -225,6 +300,11 @@ export const toolList = [
|
|
|
225
300
|
emoji: { type: "string" }
|
|
226
301
|
},
|
|
227
302
|
required: ["channelId", "messageId", "emoji"]
|
|
303
|
+
},
|
|
304
|
+
annotations: {
|
|
305
|
+
title: "Add Reaction",
|
|
306
|
+
readOnlyHint: false,
|
|
307
|
+
destructiveHint: false
|
|
228
308
|
}
|
|
229
309
|
},
|
|
230
310
|
{
|
|
@@ -241,6 +321,11 @@ export const toolList = [
|
|
|
241
321
|
}
|
|
242
322
|
},
|
|
243
323
|
required: ["channelId", "messageId", "emojis"]
|
|
324
|
+
},
|
|
325
|
+
annotations: {
|
|
326
|
+
title: "Add Multiple Reactions",
|
|
327
|
+
readOnlyHint: false,
|
|
328
|
+
destructiveHint: false
|
|
244
329
|
}
|
|
245
330
|
},
|
|
246
331
|
{
|
|
@@ -255,6 +340,11 @@ export const toolList = [
|
|
|
255
340
|
userId: { type: "string" }
|
|
256
341
|
},
|
|
257
342
|
required: ["channelId", "messageId", "emoji"]
|
|
343
|
+
},
|
|
344
|
+
annotations: {
|
|
345
|
+
title: "Remove Reaction",
|
|
346
|
+
readOnlyHint: false,
|
|
347
|
+
destructiveHint: true
|
|
258
348
|
}
|
|
259
349
|
},
|
|
260
350
|
{
|
|
@@ -274,6 +364,10 @@ export const toolList = [
|
|
|
274
364
|
}
|
|
275
365
|
},
|
|
276
366
|
required: ["channelId", "messageId", "emoji"]
|
|
367
|
+
},
|
|
368
|
+
annotations: {
|
|
369
|
+
title: "List Reaction Users",
|
|
370
|
+
readOnlyHint: true
|
|
277
371
|
}
|
|
278
372
|
},
|
|
279
373
|
{
|
|
@@ -286,6 +380,11 @@ export const toolList = [
|
|
|
286
380
|
reason: { type: "string" }
|
|
287
381
|
},
|
|
288
382
|
required: ["threadId"]
|
|
383
|
+
},
|
|
384
|
+
annotations: {
|
|
385
|
+
title: "Delete Forum Post",
|
|
386
|
+
readOnlyHint: false,
|
|
387
|
+
destructiveHint: true
|
|
289
388
|
}
|
|
290
389
|
},
|
|
291
390
|
{
|
|
@@ -297,6 +396,10 @@ export const toolList = [
|
|
|
297
396
|
forumChannelId: { type: "string", description: "The ID of the forum channel to get tags from" }
|
|
298
397
|
},
|
|
299
398
|
required: ["forumChannelId"]
|
|
399
|
+
},
|
|
400
|
+
annotations: {
|
|
401
|
+
title: "Get Forum Tags",
|
|
402
|
+
readOnlyHint: true
|
|
300
403
|
}
|
|
301
404
|
},
|
|
302
405
|
{
|
|
@@ -321,6 +424,11 @@ export const toolList = [
|
|
|
321
424
|
}
|
|
322
425
|
},
|
|
323
426
|
required: ["forumChannelId", "tags"]
|
|
427
|
+
},
|
|
428
|
+
annotations: {
|
|
429
|
+
title: "Set Forum Tags",
|
|
430
|
+
readOnlyHint: false,
|
|
431
|
+
destructiveHint: true
|
|
324
432
|
}
|
|
325
433
|
},
|
|
326
434
|
{
|
|
@@ -336,6 +444,11 @@ export const toolList = [
|
|
|
336
444
|
locked: { type: "boolean", description: "Whether to lock or unlock the post" }
|
|
337
445
|
},
|
|
338
446
|
required: ["threadId"]
|
|
447
|
+
},
|
|
448
|
+
annotations: {
|
|
449
|
+
title: "Update Forum Post",
|
|
450
|
+
readOnlyHint: false,
|
|
451
|
+
destructiveHint: true
|
|
339
452
|
}
|
|
340
453
|
},
|
|
341
454
|
{
|
|
@@ -349,6 +462,11 @@ export const toolList = [
|
|
|
349
462
|
content: { type: "string", description: "The new content for the message" }
|
|
350
463
|
},
|
|
351
464
|
required: ["channelId", "messageId", "content"]
|
|
465
|
+
},
|
|
466
|
+
annotations: {
|
|
467
|
+
title: "Edit Message",
|
|
468
|
+
readOnlyHint: false,
|
|
469
|
+
destructiveHint: true
|
|
352
470
|
}
|
|
353
471
|
},
|
|
354
472
|
{
|
|
@@ -362,6 +480,11 @@ export const toolList = [
|
|
|
362
480
|
reason: { type: "string" }
|
|
363
481
|
},
|
|
364
482
|
required: ["channelId", "messageId"]
|
|
483
|
+
},
|
|
484
|
+
annotations: {
|
|
485
|
+
title: "Delete Message",
|
|
486
|
+
readOnlyHint: false,
|
|
487
|
+
destructiveHint: true
|
|
365
488
|
}
|
|
366
489
|
},
|
|
367
490
|
{
|
|
@@ -376,6 +499,11 @@ export const toolList = [
|
|
|
376
499
|
reason: { type: "string" }
|
|
377
500
|
},
|
|
378
501
|
required: ["channelId", "name"]
|
|
502
|
+
},
|
|
503
|
+
annotations: {
|
|
504
|
+
title: "Create Webhook",
|
|
505
|
+
readOnlyHint: false,
|
|
506
|
+
destructiveHint: false
|
|
379
507
|
}
|
|
380
508
|
},
|
|
381
509
|
{
|
|
@@ -392,6 +520,11 @@ export const toolList = [
|
|
|
392
520
|
threadId: { type: "string" }
|
|
393
521
|
},
|
|
394
522
|
required: ["webhookId", "webhookToken", "content"]
|
|
523
|
+
},
|
|
524
|
+
annotations: {
|
|
525
|
+
title: "Send Webhook Message",
|
|
526
|
+
readOnlyHint: false,
|
|
527
|
+
destructiveHint: false
|
|
395
528
|
}
|
|
396
529
|
},
|
|
397
530
|
{
|
|
@@ -408,6 +541,11 @@ export const toolList = [
|
|
|
408
541
|
reason: { type: "string" }
|
|
409
542
|
},
|
|
410
543
|
required: ["webhookId"]
|
|
544
|
+
},
|
|
545
|
+
annotations: {
|
|
546
|
+
title: "Edit Webhook",
|
|
547
|
+
readOnlyHint: false,
|
|
548
|
+
destructiveHint: true
|
|
411
549
|
}
|
|
412
550
|
},
|
|
413
551
|
{
|
|
@@ -421,6 +559,11 @@ export const toolList = [
|
|
|
421
559
|
reason: { type: "string" }
|
|
422
560
|
},
|
|
423
561
|
required: ["webhookId"]
|
|
562
|
+
},
|
|
563
|
+
annotations: {
|
|
564
|
+
title: "Delete Webhook",
|
|
565
|
+
readOnlyHint: false,
|
|
566
|
+
destructiveHint: true
|
|
424
567
|
}
|
|
425
568
|
},
|
|
426
569
|
{
|
|
@@ -430,6 +573,10 @@ export const toolList = [
|
|
|
430
573
|
type: "object",
|
|
431
574
|
properties: {},
|
|
432
575
|
required: []
|
|
576
|
+
},
|
|
577
|
+
annotations: {
|
|
578
|
+
title: "List Servers",
|
|
579
|
+
readOnlyHint: true
|
|
433
580
|
}
|
|
434
581
|
},
|
|
435
582
|
{
|
|
@@ -454,6 +601,10 @@ export const toolList = [
|
|
|
454
601
|
offset: { type: "number", description: "Number of messages to skip (for pagination)" }
|
|
455
602
|
},
|
|
456
603
|
required: ["guildId"]
|
|
604
|
+
},
|
|
605
|
+
annotations: {
|
|
606
|
+
title: "Search Messages",
|
|
607
|
+
readOnlyHint: true
|
|
457
608
|
}
|
|
458
609
|
},
|
|
459
610
|
{
|
|
@@ -465,6 +616,10 @@ export const toolList = [
|
|
|
465
616
|
guildId: { type: "string" }
|
|
466
617
|
},
|
|
467
618
|
required: ["guildId"]
|
|
619
|
+
},
|
|
620
|
+
annotations: {
|
|
621
|
+
title: "List Roles",
|
|
622
|
+
readOnlyHint: true
|
|
468
623
|
}
|
|
469
624
|
},
|
|
470
625
|
{
|
|
@@ -482,6 +637,11 @@ export const toolList = [
|
|
|
482
637
|
reason: { type: "string" }
|
|
483
638
|
},
|
|
484
639
|
required: ["guildId", "name"]
|
|
640
|
+
},
|
|
641
|
+
annotations: {
|
|
642
|
+
title: "Create Role",
|
|
643
|
+
readOnlyHint: false,
|
|
644
|
+
destructiveHint: false
|
|
485
645
|
}
|
|
486
646
|
},
|
|
487
647
|
{
|
|
@@ -501,6 +661,11 @@ export const toolList = [
|
|
|
501
661
|
reason: { type: "string" }
|
|
502
662
|
},
|
|
503
663
|
required: ["guildId", "roleId"]
|
|
664
|
+
},
|
|
665
|
+
annotations: {
|
|
666
|
+
title: "Edit Role",
|
|
667
|
+
readOnlyHint: false,
|
|
668
|
+
destructiveHint: true
|
|
504
669
|
}
|
|
505
670
|
},
|
|
506
671
|
{
|
|
@@ -514,6 +679,11 @@ export const toolList = [
|
|
|
514
679
|
reason: { type: "string" }
|
|
515
680
|
},
|
|
516
681
|
required: ["guildId", "roleId"]
|
|
682
|
+
},
|
|
683
|
+
annotations: {
|
|
684
|
+
title: "Delete Role",
|
|
685
|
+
readOnlyHint: false,
|
|
686
|
+
destructiveHint: true
|
|
517
687
|
}
|
|
518
688
|
},
|
|
519
689
|
{
|
|
@@ -528,6 +698,11 @@ export const toolList = [
|
|
|
528
698
|
reason: { type: "string" }
|
|
529
699
|
},
|
|
530
700
|
required: ["guildId", "userId", "roleId"]
|
|
701
|
+
},
|
|
702
|
+
annotations: {
|
|
703
|
+
title: "Assign Role",
|
|
704
|
+
readOnlyHint: false,
|
|
705
|
+
destructiveHint: false
|
|
531
706
|
}
|
|
532
707
|
},
|
|
533
708
|
{
|
|
@@ -542,6 +717,11 @@ export const toolList = [
|
|
|
542
717
|
reason: { type: "string" }
|
|
543
718
|
},
|
|
544
719
|
required: ["guildId", "userId", "roleId"]
|
|
720
|
+
},
|
|
721
|
+
annotations: {
|
|
722
|
+
title: "Remove Role",
|
|
723
|
+
readOnlyHint: false,
|
|
724
|
+
destructiveHint: true
|
|
545
725
|
}
|
|
546
726
|
},
|
|
547
727
|
{
|
|
@@ -555,6 +735,10 @@ export const toolList = [
|
|
|
555
735
|
after: { type: "string", description: "User ID to paginate after" }
|
|
556
736
|
},
|
|
557
737
|
required: ["guildId"]
|
|
738
|
+
},
|
|
739
|
+
annotations: {
|
|
740
|
+
title: "List Members",
|
|
741
|
+
readOnlyHint: true
|
|
558
742
|
}
|
|
559
743
|
},
|
|
560
744
|
{
|
|
@@ -567,6 +751,10 @@ export const toolList = [
|
|
|
567
751
|
userId: { type: "string" }
|
|
568
752
|
},
|
|
569
753
|
required: ["guildId", "userId"]
|
|
754
|
+
},
|
|
755
|
+
annotations: {
|
|
756
|
+
title: "Get Member",
|
|
757
|
+
readOnlyHint: true
|
|
570
758
|
}
|
|
571
759
|
},
|
|
572
760
|
{
|
|
@@ -582,6 +770,11 @@ export const toolList = [
|
|
|
582
770
|
reason: { type: "string" }
|
|
583
771
|
},
|
|
584
772
|
required: ["guildId", "channelName"]
|
|
773
|
+
},
|
|
774
|
+
annotations: {
|
|
775
|
+
title: "Create Voice Channel",
|
|
776
|
+
readOnlyHint: false,
|
|
777
|
+
destructiveHint: false
|
|
585
778
|
}
|
|
586
779
|
},
|
|
587
780
|
{
|
|
@@ -597,6 +790,11 @@ export const toolList = [
|
|
|
597
790
|
reason: { type: "string" }
|
|
598
791
|
},
|
|
599
792
|
required: ["channelId", "roleId"]
|
|
793
|
+
},
|
|
794
|
+
annotations: {
|
|
795
|
+
title: "Set Channel Permissions",
|
|
796
|
+
readOnlyHint: false,
|
|
797
|
+
destructiveHint: true
|
|
600
798
|
}
|
|
601
799
|
},
|
|
602
800
|
{
|
|
@@ -610,6 +808,11 @@ export const toolList = [
|
|
|
610
808
|
reason: { type: "string" }
|
|
611
809
|
},
|
|
612
810
|
required: ["channelId", "roleId"]
|
|
811
|
+
},
|
|
812
|
+
annotations: {
|
|
813
|
+
title: "Remove Channel Permissions",
|
|
814
|
+
readOnlyHint: false,
|
|
815
|
+
destructiveHint: true
|
|
613
816
|
}
|
|
614
817
|
}
|
|
615
818
|
];
|