Skip to content

Feature Request: Add Member Assignment Tools #38

@DunningKrugger

Description

@DunningKrugger

Summary

Add tools to assign and manage members on Trello cards through the MCP server. Currently, the server can read member information from cards (via get_card) but cannot modify card membership.

Motivation

When using AI assistants to manage Trello boards, the ability to assign team members to cards is essential for complete workflow automation. Currently, users must manually assign members through the Trello UI, breaking the automated workflow.

Proposed Solution

Add three new tools following the existing tool patterns in the codebase:

1. assign_members_to_card

Assign one or more members to a card, with option to replace or add to existing members.

Parameters:

  • boardId (optional): ID of the Trello board (uses default if not provided)
  • cardId (required): ID of the card to assign members to
  • memberIds (required): Array of member IDs to assign
  • replace (optional, default: false): If true, replace existing members; if false, add to existing

Example usage:

// Add members to existing assignments
await assignMembersToCard({
  cardId: "abc123",
  memberIds: ["5ac6127eb08de1e70f0319af"],
  replace: false
});

// Replace all members
await assignMembersToCard({
  cardId: "abc123",
  memberIds: ["5ac6127eb08de1e70f0319af", "660e89baf3ff82e11440ee0f"],
  replace: true
});

2. remove_member_from_card

Remove a specific member from a card.

Parameters:

  • boardId (optional): ID of the Trello board (uses default if not provided)
  • cardId (required): ID of the card
  • memberId (required): ID of the member to remove

Example usage:

await removeMemberFromCard({
  cardId: "abc123",
  memberId: "5ac6127eb08de1e70f0319af"
});

3. get_board_members

List all members of a board with their IDs and details (helpful for discovering member IDs).

Parameters:

  • boardId (optional): ID of the Trello board (uses default if not provided)

Example usage:

const members = await getBoardMembers({
  boardId: "660e876742d1f0f4f71fe310"
});
// Returns: [{ id: "...", fullName: "...", username: "..." }, ...]

Implementation Details

Following the existing codebase patterns:

Tool Registration (src/index.ts)

Register tools using this.server.registerTool() following the same pattern as update_card_details.

TrelloClient Methods (src/trello-client.ts)

Add three new methods:

  • assignMembersToCard(cardId: string, memberIds: string[], replace?: boolean): Promise<Card>
  • removeMemberFromCard(cardId: string, memberId: string): Promise<void>
  • getBoardMembers(boardId: string): Promise<Member[]>

Trello API Endpoints

  • PUT /1/cards/{cardId}/idMembers - Replace all members (when replace=true)
  • POST /1/cards/{cardId}/idMembers?value={memberId} - Add a member (when replace=false)
  • DELETE /1/cards/{cardId}/idMembers/{memberId} - Remove a member
  • GET /1/boards/{boardId}/members - Get board members

Type Definitions

Add TypeScript interfaces for member data:

interface Member {
  id: string;
  fullName: string;
  username: string;
  avatarUrl?: string;
  initials?: string;
}

Testing Requirements

Following project conventions:

  • Unit tests for each new tool
  • Integration tests with mock Trello API responses
  • Error handling tests (invalid member IDs, permissions, etc.)
  • Rate limiting compliance

Documentation Updates

  • Update README.md with new tools in the features section
  • Add examples showing member assignment workflows
  • Document member ID discovery using get_board_members

Benefits

  • Complete card management: Enables full card lifecycle automation including member assignment
  • Consistent API: Follows existing tool patterns and conventions
  • Discovery support: get_board_members helps users find member IDs without leaving the MCP context
  • Flexible workflows: Supports both adding and replacing members

Alternatives Considered

  1. Single update_card_members tool: Less intuitive for users who want to add vs. replace
  2. Member assignment via update_card_details: Would make that tool too complex and less focused

Additional Context

This feature request comes from real-world usage where AI assistants need to assign tasks to team members based on workload, expertise, or availability. The current workaround requires manual assignment through the Trello UI, which defeats the purpose of automation.

Checklist

  • Implement assign_members_to_card tool
  • Implement remove_member_from_card tool
  • Implement get_board_members tool
  • Add corresponding TrelloClient methods
  • Add TypeScript type definitions
  • Write comprehensive tests
  • Update README.md documentation
  • Verify rate limiting compliance
  • Test with real Trello boards

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