Class TrelloTools

java.lang.Object
com.tnsai.tools.productivity.TrelloTools

public class TrelloTools extends Object
Function-shape Trello tools — board + card management via the Trello REST API v1. Replaces the legacy TrelloTool (single dispatched tool).
MethodEndpointIdempotent
trelloListBoards()GET /members/me/boardstrue
trelloGetBoard(java.lang.String)GET /boards/{id}true
trelloListCards(java.lang.String)GET /lists/{id}/cardstrue
trelloCreateCard(java.lang.String, java.lang.String, java.lang.String, java.lang.String)POST /cardsfalse (creates a card)
trelloMoveCard(java.lang.String, java.lang.String)PUT /cards/{id}true (state-converging)

Trello auth uses query parameters key=…&token=… on every request — there's no Authorization header. Requires TRELLO_API_KEY (from trello.com/power-ups/admin) and TRELLO_TOKEN (generated against the API key).

Since:
0.5.7 (Phase 2 batch 19b — built-in tool migration to function shape, see #188)
  • Constructor Details

    • TrelloTools

      public TrelloTools()
      Default constructor — picks TRELLO_API_KEY + TRELLO_TOKEN from env.
    • TrelloTools

      public TrelloTools(String apiKey, String token)
      Explicit-credentials constructor.
    • TrelloTools

      public TrelloTools(String apiKey, String token, okhttp3.OkHttpClient http, com.fasterxml.jackson.databind.ObjectMapper mapper)
      Full constructor for tests / shared HTTP.
  • Method Details

    • trelloListBoards

      @Tool(name="trello_list_boards", description="List all Trello boards the authenticated user has access to. Returns the raw JSON array. Requires TRELLO_API_KEY and TRELLO_TOKEN.", keywords={"trello","boards","list","kanban"}, idempotent=true) public String trelloListBoards() throws IOException
      Throws:
      IOException
    • trelloGetBoard

      @Tool(name="trello_get_board", description="Fetch a Trello board by id, including its lists. Returns the raw JSON. Useful for discovering list ids before calling trello_list_cards or trello_create_card.", keywords={"trello","board","lists"}, idempotent=true) public String trelloGetBoard(@ToolParam(description="Trello board id") String boardId) throws IOException
      Throws:
      IOException
    • trelloListCards

      @Tool(name="trello_list_cards", description="List all cards in a Trello list. Returns the raw JSON array of card objects.", keywords={"trello","cards","list","kanban"}, idempotent=true) public String trelloListCards(@ToolParam(description="Trello list id") String listId) throws IOException
      Throws:
      IOException
    • trelloCreateCard

      @Tool(name="trello_create_card", description="Create a new Trello card in a list. {name} is the card title (required). Optional {desc} is the description and {due} is an ISO-8601 due date (e.g. \"2026-12-31T17:00:00Z\"). Returns the raw JSON of the created card. NOT idempotent \u2014 every call creates a new card.", keywords={"trello","create","card","kanban"}, idempotent=false) public String trelloCreateCard(@ToolParam(description="Trello list id (where the new card lands)") String listId, @ToolParam(description="Card title") String name, @ToolParam(description="Optional card description",required=false,defaultValue="") String desc, @ToolParam(description="Optional ISO-8601 due date",required=false,defaultValue="") String due) throws IOException
      Throws:
      IOException
    • trelloMoveCard

      @Tool(name="trello_move_card", description="Move a Trello card to a different list. {cardId} is the card to move and {targetListId} is its new home. Idempotent \u2014 moving an already-in-target card is a no-op (200 OK). Returns the raw JSON of the updated card.", keywords={"trello","move","card","kanban","workflow"}, idempotent=true) public String trelloMoveCard(@ToolParam(description="Card id to move") String cardId, @ToolParam(description="Destination list id") String targetListId) throws IOException
      Throws:
      IOException