Add 12 card management tools: - trello_create_card — create a card on a list - trello_card_details — view card with members, checklists, comments - trello_update_card — update title, description, due date - trello_move_card — move card to a different list - trello_archive_card — archive a card - trello_assign_member / trello_remove_member — member management - trello_add_comment / trello_delete_comment — comments - trello_add_checklist_item / trello_toggle_checklist_item / trello_delete_checklist_item Also adds _delete() helper on TrelloClient for DELETE verbs. 73 total tests — all passing. Issue: #4
162 lines
4.6 KiB
Markdown
162 lines
4.6 KiB
Markdown
# Trello Plugin — Manage Trello Cards
|
|
|
|
**Feature:** US: Manage Trello Cards
|
|
**Issue:** #4
|
|
**Branch:** `feature/manage-cards`
|
|
|
|
## Overview
|
|
|
|
Extends the Trello plugin with full card management capabilities: create, view, update, move, archive, assign members, comments, and checklist management.
|
|
|
|
## Tools
|
|
|
|
### `trello_create_card`
|
|
Create a new card on a selected list.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `name` | string | Yes | Card title |
|
|
| `list_id` | string | Yes | List ID |
|
|
| `desc` | string | No | Card description |
|
|
| `due` | string | No | Due date (ISO 8601) |
|
|
|
|
**Returns:** Card ID, name, URL, and short URL.
|
|
|
|
### `trello_card_details`
|
|
View detailed information about a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
|
|
**Returns:** Card details including title, description, due date, members, checklists, comments, URL.
|
|
|
|
### `trello_update_card`
|
|
Update a card's core attributes (title, description, due date).
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `name` | string | No | New title |
|
|
| `desc` | string | No | New description |
|
|
| `due` | string | No | New due date (ISO 8601) |
|
|
|
|
**Returns:** Updated card details.
|
|
|
|
### `trello_move_card`
|
|
Move a card to a different list.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `list_id` | string | Yes | Target list ID |
|
|
|
|
**Returns:** Success message with new list location.
|
|
|
|
### `trello_archive_card`
|
|
Archive a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
|
|
**Returns:** Success message.
|
|
|
|
### `trello_assign_member`
|
|
Add a member to a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `member_id` | string | Yes | Trello member ID |
|
|
|
|
**Returns:** Success message.
|
|
|
|
### `trello_remove_member`
|
|
Remove a member from a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `member_id` | string | Yes | Trello member ID |
|
|
|
|
**Returns:** Success message.
|
|
|
|
### `trello_add_comment`
|
|
Add a comment to a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `text` | string | Yes | Comment text |
|
|
|
|
**Returns:** Comment ID and success.
|
|
|
|
### `trello_delete_comment`
|
|
Delete a comment from a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `comment_id` | string | Yes | Comment/action ID |
|
|
|
|
**Returns:** Success message.
|
|
|
|
### `trello_add_checklist_item`
|
|
Add a checklist item to a card.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `name` | string | Yes | Checklist item text |
|
|
| `checklist_id` | string | No | Specific checklist ID (if card has multiple) |
|
|
|
|
**Returns:** Checklist item details.
|
|
|
|
### `trello_toggle_checklist_item`
|
|
Mark a checklist item as complete or incomplete.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `item_id` | string | Yes | Checklist item ID |
|
|
| `checked` | bool | Yes | True = complete, False = incomplete |
|
|
|
|
**Returns:** Updated item state.
|
|
|
|
### `trello_delete_checklist_item`
|
|
Remove a checklist item.
|
|
|
|
**Parameters:**
|
|
| Param | Type | Required | Description |
|
|
|-------|------|----------|-------------|
|
|
| `card_id` | string | Yes | Card ID |
|
|
| `item_id` | string | Yes | Checklist item ID |
|
|
|
|
**Returns:** Success message.
|
|
|
|
## Trello API Endpoints
|
|
|
|
| Purpose | Method | Endpoint |
|
|
|---------|--------|----------|
|
|
| Create card | POST | `/1/cards` |
|
|
| Get card | GET | `/1/cards/{id}` |
|
|
| Update card | PUT | `/1/cards/{id}` |
|
|
| Add member | POST | `/1/cards/{id}/idMembers` |
|
|
| Remove member | DELETE | `/1/cards/{id}/idMembers/{memberId}` |
|
|
| Add comment | POST | `/1/cards/{id}/actions/comments` |
|
|
| Delete comment | DELETE | `/1/cards/{id}/actions/{commentId}/comments` |
|
|
| Add checklist item | POST | `/1/cards/{id}/checklistItems` |
|
|
| Update checklist item | PUT | `/1/cards/{id}/checklistItem/{itemId}/state` |
|
|
| Delete checklist item | DELETE | `/1/cards/{id}/checklistItems/{itemId}` |