List bans
discord_
Read-only
- Toolset
- Members
members - Context cost
- 321 tokens, estimated1,283 bytes of definition, divided by 4
List the users banned from the server, with their ban reasons. Returns { bans: [...], nextCursor }. A page holds up to 1000 bans; if nextCursor is non-null, pass it back as `after` to fetch the next page. Requires the Ban Members or View Audit Log permission. Read-only.
Risk and annotations
Read-onlyreadOnlyHint | yes | Does not modify your server. |
|---|---|---|
DestructivedestructiveHint | n/a | Not declared: it only applies to tools that write. |
IdempotentidempotentHint | n/a | Not declared. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| guild_ | string | pattern ^\d{17,20}$ | Discord server (guild) ID (snowflake). |
| limitoptional | integer | 1 to 1000default 1000 | Max bans per page (1–1000). Default 1000. |
| afteroptional | string | pattern ^\d{17,20}$ | Pagination cursor: a user ID (snowflake). Pass the previous response's nextCursor to fetch the next page. |
Output
Declared by outputSchema: clients receive this shape as structuredContent.
| Field | Type |
|---|---|
| bansrequired | array of objects |
| user_ | string |
| username (nested, level 1)required | string |
| reason (nested, level 1)required | string or null |
| nextCursorrequired | string or null |
Related tools
Also in Members
-
List members, Read-only
discord_list_ members -
Get member info, Read-only
discord_get_ member_ info -
Kick member, Destructive
discord_kick_ member -
Ban member, Destructive
discord_ban_ member -
Unban member, Write
discord_unban_ member -
Timeout member, Write
discord_timeout_ member -
Search members, Read-only
discord_search_ members -
Set nickname, Write
discord_set_ nickname -
Bulk ban, Destructive
discord_bulk_ ban -
Prune inactive members, Destructive
discord_prune_ members
Raw definition (1,283 bytes)
{
"name": "discord_list_bans",
"description": "List the users banned from the server, with their ban reasons. Returns { bans: [...], nextCursor }. A page holds up to 1000 bans; if nextCursor is non-null, pass it back as `after` to fetch the next page. Requires the Ban Members or View Audit Log permission. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"guild_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord server (guild) ID (snowflake)."
},
"limit": {
"default": 1000,
"description": "Max bans per page (1–1000). Default 1000.",
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"after": {
"description": "Pagination cursor: a user ID (snowflake). Pass the previous response's nextCursor to fetch the next page.",
"type": "string",
"pattern": "^\\d{17,20}$"
}
},
"required": [
"guild_id"
],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"bans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string"
},
"username": {
"type": "string"
},
"reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"user_id",
"username",
"reason"
],
"additionalProperties": false
}
},
"nextCursor": {
"type": [
"string",
"null"
]
}
},
"required": [
"bans",
"nextCursor"
],
"additionalProperties": false
},
"annotations": {
"title": "List bans",
"readOnlyHint": true,
"openWorldHint": true
}
}