Skip to content

Phase 2: Roles and Channels Modules #2

@johansabent

Description

@johansabent

Agent Task Prompt: Phase 2 - Roles and Channels Modules

Goal: Implement modules and MCP tools for reading and modifying Discord roles and channels.

Acceptance Criteria:

  • Implement src/modules/roles.ts exposing listRoles, createRole, deleteRole, updateRole, assignRole, and removeRole using getDiscordClient().
  • Implement src/tools/roles.tools.ts registering the corresponding MCP tools (e.g., roles.list_roles, roles.create_role) with inputs and outputs validated via zod. Default guild_id to config.DEFAULT_GUILD_ID if absent.
  • Implement src/modules/channels.ts exposing listChannels, listCategories, and serverStructure (returns the category tree mapped with channels).
  • Implement src/tools/channels.tools.ts registering channels.list_channels, channels.list_categories, and channels.server_structure with explicit input and output schemas.
  • Any module or tool accepting guild_id must fall back to config.DEFAULT_GUILD_ID when it is omitted.
  • Before closing the issue, run local verification (npm run build and npm run lint), commit the issue-scoped changes, and ensure the GitHub Actions checks pass if the branch is pushed.

Technical Context:

  • Validate parameters strictly. Provide descriptive error handling if permissions fail or entities are not found.
  • Use guild.roles.fetch() to ensure data is fresh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions