Skip to content

members_search

Members Read only

Fuzzy-search guild members by username/nick prefix.

convert “find @alice” or “users named bob” into snowflake IDs.

5/sec/guild.

Tool-authored shorthand: {guild_id:"999000999000999000", query:"alice", limit:25}

{
"name": "members_search",
"arguments": {
"guild_id": "123456789012345678",
"query": "example"
}
}
FieldTypeRequiredConstraintsDescription
guild_idstringyespattern: ^\d{17,20}$Guild to search
querystringyesmin length: 1; max length: 100Username/nick prefix or substring
limitintegernodefault: 25; min: 1; max: 1000Max matches (1-1000, default 25)
Complete input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"guild_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Guild to search"
},
"query": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"description": "Username/nick prefix or substring"
},
"limit": {
"default": 25,
"description": "Max matches (1-1000, default 25)",
"type": "integer",
"minimum": 1,
"maximum": 1000
}
},
"required": [
"guild_id",
"query"
]
}

{matches:[{user_id, username, global_name, nick}], count}.

{
"matches": [
{
"user_id": "123456789012345678",
"username": "Example name",
"global_name": "Example name",
"nick": "example"
}
],
"count": 1
}
FieldTypeRequiredConstraintsDescription
matchesarray<object>yes
countnumberyes
Complete output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"matches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "Discord user ID"
},
"username": {
"type": "string"
},
"global_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"nick": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"user_id",
"username",
"global_name",
"nick"
],
"additionalProperties": false
}
},
"count": {
"type": "number"
}
},
"required": [
"matches",
"count"
],
"additionalProperties": false
}
PropertyValue
Read-onlyyes
Destructiveno
Idempotentyes
Open-worldyes
Confirmation requiredno
  • The members category must be enabled by MCP_CATEGORIES when 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 returns 403; inaccessible resources commonly return 404.

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.

packages/mcp-core/src/tools/members/search.ts