feat: implement Trello board management
Add 5 board management tools extending the Trello client: - trello_create_board — create a new board - trello_rename_board — rename an existing board - trello_archive_board — close/archive a board - trello_open_board — re-open a closed board - trello_board_details — view board with lists and members Includes board name-to-ID resolution, 16 new tests, and spec doc. Issue: #2
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
# Trello Plugin — Manage Trello Boards
|
||||
|
||||
**Feature:** US: Manage Trello Boards
|
||||
**Issue:** #2
|
||||
**Branch:** `feature/manage-boards`
|
||||
|
||||
## Overview
|
||||
|
||||
Extends the Trello plugin with board management capabilities: create, rename, close/archive, open, and view details of Trello boards.
|
||||
|
||||
## Design Decisions
|
||||
|
||||
- **Extends existing TrelloClient** — All board operations go through the same `TrelloClient` class from the auth feature.
|
||||
- **Board selection by ID** — The Trello API identifies boards by ID. The tool accepts both ID and name (client resolves name to ID).
|
||||
- **Resolves board name to ID** — When a user provides a board name instead of ID, the client fetches all boards and matches by name.
|
||||
|
||||
## Tools
|
||||
|
||||
### `trello_create_board`
|
||||
Create a new Trello board.
|
||||
|
||||
**Parameters:**
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `name` | string | Yes | Board name |
|
||||
| `default_lists` | bool | No | Whether to create the default lists (default: true) |
|
||||
|
||||
**Returns:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"board": {"id": "abc123", "name": "My Board", "url": "https://trello.com/b/abc123"}
|
||||
}
|
||||
```
|
||||
|
||||
### `trello_rename_board`
|
||||
|
||||
Rename an existing board.
|
||||
|
||||
**Parameters:**
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `board_id` | string | Yes | Board ID or name |
|
||||
| `name` | string | Yes | New board name |
|
||||
|
||||
**Returns:**
|
||||
```json
|
||||
{"success": true, "board": {"id": "abc123", "name": "New Name"}}
|
||||
```
|
||||
|
||||
### `trello_archive_board`
|
||||
|
||||
Close/archive a board.
|
||||
|
||||
**Parameters:**
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `board_id` | string | Yes | Board ID or name |
|
||||
|
||||
**Returns:**
|
||||
```json
|
||||
{"success": true, "message": "Board 'My Board' archived."}
|
||||
```
|
||||
|
||||
### `trello_open_board`
|
||||
|
||||
Re-open a closed/archived board.
|
||||
|
||||
**Parameters:**
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `board_id` | string | Yes | Board ID or name |
|
||||
|
||||
**Returns:**
|
||||
```json
|
||||
{"success": true, "message": "Board 'My Board' opened."}
|
||||
```
|
||||
|
||||
### `trello_board_details`
|
||||
|
||||
View details of a specific board, including its lists and members.
|
||||
|
||||
**Parameters:**
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `board_id` | string | Yes | Board ID or name |
|
||||
|
||||
**Returns:**
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"board": {
|
||||
"id": "abc123",
|
||||
"name": "My Board",
|
||||
"url": "https://trello.com/b/abc123",
|
||||
"desc": "",
|
||||
"closed": false,
|
||||
"starred": false,
|
||||
"lists": [{"id": "l1", "name": "To Do"}, {"id": "l2", "name": "In Progress"}],
|
||||
"members": [{"id": "m1", "username": "user1", "full_name": "User One"}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Trello API Endpoints
|
||||
|
||||
| Purpose | Method | Endpoint |
|
||||
|---------|--------|----------|
|
||||
| Create board | POST | `/1/boards/` |
|
||||
| Update board | PUT | `/1/boards/{id}` |
|
||||
| Get board details | GET | `/1/boards/{id}` (with lists and members fields) |
|
||||
|
||||
## Error Handling
|
||||
|
||||
- Board not found → clear message suggesting `trello_list_boards` to find the ID
|
||||
- Validation errors → surfaced directly from Trello API
|
||||
Reference in New Issue
Block a user