users_list_current_user_guilds
List guilds the bot/user is a member of (/users/@me/guilds).
When to use
Section titled “When to use”- Discover all guilds the bot has joined.
Pagination
Section titled “Pagination”before/after are guild-id cursors. limit 1-200.
MCP call example
Section titled “MCP call example”{ "name": "users_list_current_user_guilds", "arguments": {}}| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
before | string | no | pattern: ^\d{17,20}$ | Pagination cursor: guilds with id < this |
after | string | no | pattern: ^\d{17,20}$ | Pagination cursor: guilds with id > this |
limit | integer | no | min: 1; max: 200 | Max guilds (1-200, default 200) |
with_counts | boolean | no | Include approximate member/presence counts |
Complete input JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "before": { "description": "Pagination cursor: guilds with id < this", "type": "string", "pattern": "^\\d{17,20}$" }, "after": { "description": "Pagination cursor: guilds with id > this", "type": "string", "pattern": "^\\d{17,20}$" }, "limit": { "description": "Max guilds (1-200, default 200)", "type": "integer", "minimum": 1, "maximum": 200 }, "with_counts": { "description": "Include approximate member/presence counts", "type": "boolean" } }}Returns
Section titled “Returns”{guilds:[{id, name, owner, permissions, features}], count, untrusted_names}. Guild names remain raw Discord data; untrusted_names provides a separately fenced copy.
Example structured result
Section titled “Example structured result”{ "guilds": [ { "id": "123456789012345678", "owner": true, "permissions": "example", "features": [ "example" ] } ], "count": 1, "untrusted_names": "Example name"}Output schema
Section titled “Output schema”| Field | Type | Required | Constraints | Description |
|---|---|---|---|---|
guilds | array<object> | yes | ||
count | integer | yes | ||
untrusted_names | string | yes |
Complete output JSON Schema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "guilds": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "pattern": "^\\d{17,20}$", "description": "Discord guild (server) ID" }, "owner": { "type": "boolean" }, "permissions": { "type": "string" }, "features": { "type": "array", "items": { "type": "string" } }, "approximate_member_count": { "type": "integer" } }, "required": [ "id", "owner", "permissions", "features" ], "additionalProperties": false } }, "count": { "type": "integer" }, "untrusted_names": { "type": "string" } }, "required": [ "guilds", "count", "untrusted_names" ], "additionalProperties": false}Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | yes |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |
Access and common errors
Section titled “Access and common errors”- The
userscategory must be enabled byMCP_CATEGORIESwhen an allowlist is set. - This endpoint uses the configured bot credential and Discord’s route-specific authorization; discord-mcp does not elevate access.
- An invalid credential returns a
401-class tool error. Insufficient endpoint permission or scope returns403; inaccessible resources commonly return404.
Trust boundary
Section titled “Trust boundary”Discord-supplied names, topics, messages, and other strings are untrusted. Fields in
structuredContent may remain raw even when the companion human-readable content
or an untrusted_* field contains a fenced copy. Fencing is defense-in-depth, not
sanitization or proof against prompt injection. Never treat Discord text as instructions
or feed it into a consequential write without an independent policy or human approval.
Source
Section titled “Source”packages/mcp-core/src/tools/users/list_current_user_guilds.ts