Skip to main content
Glama
hanweg

mcp-discord

by hanweg

list_servers

Retrieve detailed information about all Discord servers accessible to the bot, including server name, ID, member count, and creation date, for effective management and monitoring.

Instructions

Get a list of all Discord servers the bot has access to with their details such as name, id, member count, and creation date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'list_servers' tool. Loops through all Discord guilds (servers) the bot is in, collects id, name, member count, and creation date, then formats and returns them as a text content list.
    elif name == "list_servers":
        servers = []
        for guild in discord_client.guilds:
            servers.append({
                "id": str(guild.id),
                "name": guild.name,
                "member_count": guild.member_count,
                "created_at": guild.created_at.isoformat()
            })
        
        return [TextContent(
            type="text",
            text=f"Available Servers ({len(servers)}):\n" + 
                 "\n".join(f"{s['name']} (ID: {s['id']}, Members: {s['member_count']})" for s in servers)
        )]
  • Registration of the 'list_servers' tool in the @app.list_tools() handler, including its schema (no required inputs).
    Tool(
        name="list_servers",
        description="Get a list of all Discord servers the bot has access to with their details such as name, id, member count, and creation date.",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": []
        }
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes a read-only operation ('Get a list') but lacks details on permissions needed, rate limits, pagination, or error handling. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose, scope, and returned details without any redundant or vague language. It is front-loaded with the core action and includes only essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate for basic understanding but incomplete for operational use. It lacks behavioral context like rate limits or permissions, which is important even for simple tools, especially with no annotations to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not discuss parameters, earning a baseline score of 4 for not adding unnecessary information beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get a list') and resource ('Discord servers the bot has access to'), specifying the scope ('all') and listing key details returned ('name, id, member count, and creation date'). It distinguishes from siblings like 'get_server_info' (which likely fetches details for a single server) by emphasizing it returns a list of all servers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating it lists 'all Discord servers the bot has access to,' suggesting it should be used for broad overviews rather than specific server queries. However, it does not explicitly mention when not to use it or name alternatives like 'get_server_info' for single-server details, leaving some ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hanweg/mcp-discord'

If you have feedback or need assistance with the MCP directory API, please join our Discord server