Skip to content

feat(trello): expand tool coverage and fix API gaps#5357

Merged
waleedlatif1 merged 2 commits into
stagingfrom
worktree-trello-validate-integration
Jul 2, 2026
Merged

feat(trello): expand tool coverage and fix API gaps#5357
waleedlatif1 merged 2 commits into
stagingfrom
worktree-trello-validate-integration

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Ran a full /validate-integration audit on the Trello integration against Trello's live REST API docs
  • Added 8 new tools to close real endpoint gaps: delete card, remove label, remove member, update list (rename/archive/move), add checklist item, update checklist item (check off/rename), list board members, search
  • Fixed 4 warning-level issues on existing tools: exposed filter on Get Lists/List Cards (archived items were previously unreachable), added since/before paging to Get Actions, allowed assigning members on card creation, promoted "Move to List ID" out of advanced mode since it's the core mechanic of the card-router template
  • Wired everything into the tool registry, block subblocks/config, and BlockMeta skills

Type of Change

  • New feature / integration enhancement

Testing

  • 3 parallel subagent audits: live API alignment (PASS), internal block↔tool consistency (PASS), backwards compatibility vs origin/staging (PASS, purely additive)
  • bun run type-check and biome lint clean

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 2, 2026 5:35pm

Request Review

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large but additive integration surface; delete card and other write/delete APIs can mutate user Trello data when workflows run with valid OAuth tokens.

Overview
Expands the Trello integration with eight new operations—search, delete card, update list, checklist item add/update, list members, and remove label/member—each implemented as tools, registered in the tool registry, and exposed on the Trello block with matching subblocks and param wiring.

Existing operations gain API-aligned options: open/closed/all filters on Get Lists and List Cards, since / before on Get Actions, memberIds on Create Card, and Move to List ID promoted out of advanced mode on Update Card. Block outputs add success, members, boards, and checklist item; BlockMeta adds checklist and search/cleanup skills.

Risk note: Delete Card is destructive; workflows using OAuth can permanently remove cards if misconfigured.

Reviewed by Cursor Bugbot for commit f76f064. Configure here.

Comment thread apps/sim/tools/trello/shared.ts
Comment thread apps/sim/blocks/blocks/trello.ts
@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands the Trello integration from 12 to 20 tools by closing real endpoint gaps identified in a live API audit, and enhances 4 existing tools with missing parameters. Every new tool is fully wired through the complete stack: tool file → TypeScript types → barrel export → tool registry → block config (dropdown, subblock conditions, switch case, input/output schema).

  • 8 new tools added: delete card, remove label, remove member, update list (rename/archive/move-board), add checklist item, update checklist item (check-off/rename), list board members, and search — each with consistent validation, error handling, and response mapping via shared.ts helpers.
  • 4 existing tools enhanced: list_lists and list_cards gain an optional filter param (open/closed/all); get_actions gains since/before date-range params; create_card gains memberIds for immediate member assignment on creation.
  • Block UX improvements: "Move to List ID" promoted out of advanced mode; filter dropdowns added for lists/cards; since/before get AI wand configs for natural-language date input.

Confidence Score: 5/5

Purely additive — no existing tool signatures or outputs are changed, only new tools are introduced and optional params appended to existing ones.

Every new tool follows the same validated pattern as the existing twelve: IDs checked before URL construction, mapping functions guard against malformed API responses, and the block config condition/required arrays are consistent with what each tool actually needs. The idOrganization schema gap flagged in the previous review round has been resolved in search.ts. No regressions to existing operations were found.

No files require special attention; all 17 changed files are internally consistent and follow established codebase conventions.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/trello.ts Block config wires all 8 new operations into the dropdown, subblock conditions/required, tools.access, tools.config switch, and schema inputs/outputs; all cases are present and consistent.
apps/sim/tools/trello/search.ts New tool — GET /search; boards output schema now includes idOrganization (matching mapTrelloBoard), cards and boards parsed separately, count is their sum.
apps/sim/tools/trello/update_list.ts New tool — PUT /lists/{id} with JSON body; empty-update guard in body() function prevents no-op calls; uses mapTrelloList for type-safe response parsing.
apps/sim/tools/trello/update_checklist_item.ts New tool — PUT /cards/{id}/checkItem/{id} with query-param delivery; at-least-one guard correctly placed before URL construction, consistent with fix noted in prior thread.
apps/sim/tools/trello/shared.ts Exports mapTrelloMember (previously private) and adds new mapTrelloChecklistItem; both follow the established required/optional string pattern correctly.
apps/sim/tools/trello/types.ts Adds param/response interfaces for all 8 new tools and TrelloChecklistItem; all new types added to the TrelloResponse union.
apps/sim/tools/registry.ts All 8 new tools imported and registered with their correct tool IDs; no naming mismatches found.
apps/sim/tools/trello/add_checklist_item.ts New tool — POST /checklists/{id}/checkItems with query-param delivery; validation, mapping, and error handling are consistent with existing tools.
apps/sim/tools/trello/delete_card.ts New tool — DELETE /cards/{id}; minimal params, clean error path, returns success boolean.
apps/sim/tools/trello/remove_label.ts New tool — DELETE /cards/{id}/idLabels/{idLabel}; correct endpoint construction, both cardId and labelId validated before URL is built.
apps/sim/tools/trello/remove_member.ts New tool — DELETE /cards/{id}/idMembers/{idMember}; mirrors remove_label pattern, validates both IDs, returns success boolean.
apps/sim/tools/trello/list_members.ts New tool — GET /boards/{id}/members; uses newly-exported mapTrelloMember, handles non-array response, returns typed member array with count.
apps/sim/tools/trello/index.ts All new tool exports added; re-exports types via wildcard which remains compatible.
apps/sim/tools/trello/create_card.ts Adds memberIds array param; mapped to idMembers in the request body, guarded with length check so empty arrays are skipped cleanly.
apps/sim/tools/trello/get_actions.ts Adds since and before query params for pagination; both optional and conditionally appended, no behaviour change when omitted.
apps/sim/tools/trello/list_cards.ts Adds optional filter param (open/closed/all); conditionally appended, default Trello behaviour preserved when not set.
apps/sim/tools/trello/list_lists.ts Adds optional filter param (open/closed/all); identical pattern to list_cards; no breaking change.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant U as User / LLM
    participant B as Trello Block (trello.ts)
    participant R as Tool Registry
    participant T as Tool (e.g. search.ts)
    participant TR as Trello REST API

    U->>B: Select operation + fill subblock fields
    B->>B: tools.config switch to build typed params
    B->>R: Look up tool by id
    R->>T: Invoke ToolConfig
    T->>T: url() validate and build URL
    T->>TR: HTTP GET/POST/PUT/DELETE
    TR-->>T: JSON response
    T->>T: transformResponse via mapTrello helpers
    T-->>B: success and output
    B-->>U: Typed outputs
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant U as User / LLM
    participant B as Trello Block (trello.ts)
    participant R as Tool Registry
    participant T as Tool (e.g. search.ts)
    participant TR as Trello REST API

    U->>B: Select operation + fill subblock fields
    B->>B: tools.config switch to build typed params
    B->>R: Look up tool by id
    R->>T: Invoke ToolConfig
    T->>T: url() validate and build URL
    T->>TR: HTTP GET/POST/PUT/DELETE
    TR-->>T: JSON response
    T->>T: transformResponse via mapTrello helpers
    T-->>B: success and output
    B-->>U: Typed outputs
Loading

Reviews (5): Last reviewed commit: "fix(trello): address review feedback on ..." | Re-trigger Greptile

Comment thread apps/sim/tools/trello/update_checklist_item.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 17407c4. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Ran one more absolute-certainty pass on API alignment before merge, fetching Trello's docs endpoint-by-endpoint against every tool. Found one real gap: GET /1/cards/{id}/actions only documents filter/pagelimit/since/before are only documented on the board variant (GET /1/boards/{id}/actions). trello_get_actions was forwarding all three regardless of which ID was used. Fixed in c648610 to only send them on board-scoped queries; block field titles updated to '(Board Only)' for clarity. Also double-checked trello_search's response parsing (data.cards/data.boards) against real-world usage (py-trello source) — confirmed correct despite an ambiguous auto-generated docs page.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c648610. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Good catch — Greptile was right and my prior fix (c648610) was wrong. Reverted in a50782b. Atlassian's auto-generated docs for GET /1/cards/{id}/actions only list filter/page, but that's a documentation gap, not real API behavior: verified against py-trello's fetch_actions(), which sends limit/since/before directly on card-scoped actions requests in production. Restored the original unconditional behavior — limit/since/before now apply on both board- and card-scoped Get Actions queries again, matching what shipped in the original PR.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a50782b. Configure here.

- add delete card, remove label/member, update list, add/update checklist item, list members, and search tools
- add filter support to list lists/cards, since/before paging to get actions, member assignment on card creation
- promote move-to-list field out of advanced mode
- idChecklist can be absent on Trello checkItem responses, so stop treating it as required
- validate state/name is provided before building the update-checklist-item request URL
- reject Update Checklist Item at the block level when neither State nor New Item Name is set
- add missing idOrganization field to search's board output schema
@waleedlatif1 waleedlatif1 force-pushed the worktree-trello-validate-integration branch from a50782b to f76f064 Compare July 2, 2026 17:35
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f76f064. Configure here.

@waleedlatif1 waleedlatif1 merged commit 4988ba6 into staging Jul 2, 2026
18 checks passed
@waleedlatif1 waleedlatif1 deleted the worktree-trello-validate-integration branch July 2, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant