Skip to main content
Glama
scarecr0w12

discord-mcp

delete_invite

Remove a Discord invite link by providing its code to manage server access and maintain security.

Instructions

Delete an invite

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inviteCodeYesThe invite code to delete
reasonNoReason for deleting

Implementation Reference

  • Registration and implementation of the delete_invite tool, including schema, handler logic to fetch and delete the Discord invite.
    server.tool(
      'delete_invite',
      'Delete an invite',
      {
        inviteCode: z.string().describe('The invite code to delete'),
        reason: z.string().optional().describe('Reason for deleting'),
      },
      async ({ inviteCode, reason }) => {
        const result = await withErrorHandling(async () => {
          const client = await getDiscordClient();
          const invite = await client.fetchInvite(inviteCode);
          await invite.delete(reason);
    
          return { inviteCode, message: 'Invite deleted successfully' };
        });
    
        if (!result.success) {
          return { content: [{ type: 'text', text: result.error }], isError: true };
        }
    
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • Handler function that executes the delete_invite tool: fetches the invite via Discord client and deletes it with optional reason.
    async ({ inviteCode, reason }) => {
      const result = await withErrorHandling(async () => {
        const client = await getDiscordClient();
        const invite = await client.fetchInvite(inviteCode);
        await invite.delete(reason);
    
        return { inviteCode, message: 'Invite deleted successfully' };
      });
    
      if (!result.success) {
        return { content: [{ type: 'text', text: result.error }], isError: true };
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
  • Input schema for delete_invite tool using Zod: requires inviteCode, optional reason.
      inviteCode: z.string().describe('The invite code to delete'),
      reason: z.string().optional().describe('Reason for deleting'),
    },
  • src/index.ts:62-62 (registration)
    Calls registerInviteTools to register all invite tools including delete_invite.
    registerInviteTools(server);
Behavior1/5

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

With no annotations provided, the description carries full burden but offers no behavioral details. It doesn't disclose if deletion is permanent, requires specific permissions, affects other users, or has side effects like logging. For a destructive operation, this lack of transparency is critical.

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, direct sentence with zero waste. It's front-loaded and appropriately sized for a simple tool, though this conciseness comes at the cost of completeness.

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

Completeness2/5

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

Given the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral risks, permissions, or result expectations. For a delete operation in a Discord-like context, more context is needed for safe 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?

Schema description coverage is 100%, with clear parameter documentation in the schema itself. The description adds no meaning beyond the schema, such as explaining the 'reason' parameter's impact or format. Baseline 3 is appropriate as the schema adequately covers parameters.

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

Purpose2/5

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

The description 'Delete an invite' is a tautology that merely restates the tool name without adding specificity. It doesn't clarify what type of invite (e.g., server, channel, event) or what deletion entails, though the verb 'delete' is clear. Compared to sibling tools like 'create_invite' and 'get_invite_info', it minimally distinguishes itself by action only.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin permissions), exclusions, or related tools like 'get_invite_info' for verification. The agent must infer usage from context alone.

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

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