Skip to main content
Glama
wowjinxy
by wowjinxy

list_invites

View active invitation links for a Discord server to manage access and share invites.

Instructions

List active invites for a server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'list_invites' tool. It fetches all active invites from the specified Discord guild using guild.invites(), formats details like code, channel, inviter, expiry, and usage, and returns a formatted string list.
    async def list_invites(server_id: str | int | None = None, ctx: Context = None) -> str:  # type: ignore[override]
        """List active invites for a server."""
    
        assert ctx is not None
        bot, config = await _acquire(ctx)
        guild_id = _resolve_guild_id(config, server_id)
        guild = await _ensure_guild(bot, guild_id)
    
        invites = await _call_discord("list invites", guild.invites())
        if not invites:
            return f"No active invites found for {guild.name}."
    
        lines = [f"**Active invites for {guild.name}:**"]
        for invite in invites:
            inviter = invite.inviter.display_name if invite.inviter else "Unknown"
            expires = _format_timestamp(invite.expires_at) if invite.expires_at else "No expiry"
            usage = f"{invite.uses or 0}/{invite.max_uses or '∞'} uses"
            lines.append(
                f"• {invite.code} – Channel: {getattr(invite.channel, 'name', invite.channel_id)} – "
                f"Inviter: {inviter} – Expires: {expires} – {usage}"
            )
    
        return "\n".join(lines)
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 states the tool lists invites but doesn't cover critical aspects like whether it requires specific permissions, how results are formatted, pagination behavior, or error conditions. This leaves significant gaps for a tool that likely involves access control.

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, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it highly concise and well-structured.

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 moderate complexity (listing invites likely involves permissions and filtering), the description is minimal. It benefits from having an output schema (which handles return values), but with no annotations and low parameter coverage, it lacks details on behavioral traits and usage context, making it incomplete for safe and effective use.

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

Parameters3/5

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

The schema description coverage is 0%, but the description mentions 'for a server', which aligns with the 'server_id' parameter in the schema. However, it doesn't explain the parameter's optional nature (default: null) or what happens when it's omitted (e.g., listing invites for all servers vs. current context). The description adds minimal value beyond the schema.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('active invites for a server'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'create_invite' or 'list_servers', but the specificity of 'active invites' provides some implicit distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing server access), exclusions, or comparisons to similar tools like 'list_servers' or 'create_invite', leaving the agent to infer usage context.

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

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/wowjinxy/mcp-discord'

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