Skip to content

feat: add update_list tool - #62

Merged
delorenj merged 1 commit into
delorenj:mainfrom
McFunshine:feature/update-list
May 23, 2026
Merged

delorenj merged 1 commit into
delorenj:mainfrom
McFunshine:feature/update-list

Conversation

@McFunshine

Copy link
Copy Markdown
Contributor

Adds an update_list tool that exposes PUT /1/lists/{id} via the MCP server.

Changes

  • src/trello-client.ts: Added updateList() method (supports name, pos, closed, subscribed, idBoard)
  • src/index.ts: Registered update_list tool with Zod schema validation
  • README.md: Added tool documentation
  • CHANGELOG.md: Added [Unreleased] entry

Use case

Enables programmatic list reordering, renaming, archiving, and moving between boards — essential for workflows like GTD tickler systems where lists need to be repositioned regularly.

Testing

  • Built successfully with bun run build
  • Lint passes on changed files (pre-existing lint issues untouched)
  • Tested locally against live Trello board via Claude Desktop

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @McFunshine, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant enhancement by adding an update_list tool, which empowers users to programmatically manage their Trello lists with greater flexibility. This new capability facilitates dynamic list operations such as reordering, archiving, and transferring lists between boards, directly supporting advanced organizational workflows. The change integrates seamlessly into the existing system, providing a robust and validated interface for list manipulation.

Highlights

  • New Tool: update_list: A new update_list tool has been added, allowing programmatic modification of Trello list properties.
  • Enhanced List Management: This tool supports updating a list's name, position, closed (archived) state, subscription status, and moving it to a different board.
  • API Integration: The functionality is exposed via a PUT /1/lists/{id} endpoint on the MCP server, leveraging the Trello API.
  • Documentation and Validation: The new tool includes Zod schema validation for its input parameters and is documented in both the README.md and CHANGELOG.md.
Changelog
  • CHANGELOG.md
    • Added an 'Unreleased' section to document upcoming changes.
    • Included an entry for the new update_list tool, detailing its parameters and capabilities for list management.
  • README.md
    • Added comprehensive documentation for the new update_list tool.
    • Provided a detailed TypeScript code block illustrating the tool's name and arguments, including optional parameters like boardId, name, pos, closed, subscribed, and idBoard.
  • src/index.ts
    • Registered the new update_list tool with the TrelloServer.
    • Implemented Zod schema validation for the tool's input, ensuring proper data types and optionality for parameters such as listId, name, pos, closed, subscribed, and idBoard.
    • Added asynchronous logic to handle the tool's execution, calling the trelloClient.updateList method and managing potential errors.
  • src/trello-client.ts
    • Introduced a new asynchronous method updateList to the TrelloClient class.
    • This method constructs and sends a PUT request to the Trello API endpoint /lists/{listId} with the provided update parameters.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5004062cd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/index.ts Outdated
Comment on lines +330 to +333
.string()
.optional()
.describe('ID of the Trello board (uses default if not provided)'),
listId: z.string().describe('ID of the Trello list to update'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove or honor unused boardId parameter

The tool schema advertises an optional boardId, but the handler never destructures or forwards it (see the handler signature around line 347). As a result, callers who pass boardId expecting it to affect the update (per the description) will see no effect, which is a silent mismatch between API contract and behavior. Consider removing boardId from the schema/README or wiring it into the request semantics.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed boardId from the input schema and updated the description. Fixed in 8b337c3.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new update_list tool, which is a valuable addition for managing Trello lists programmatically. The implementation is solid, but I've identified a few areas for improvement to enhance clarity and conciseness. My main feedback revolves around removing an unused boardId parameter from the new tool's definition and documentation to prevent user confusion. Additionally, I've suggested simplifying the tool's handler logic for better readability and to reduce code duplication. Overall, these are good changes that expand the server's capabilities.

Comment thread src/index.ts Outdated
Comment on lines +327 to +333
description: "Update a list's name, position, or closed state on a specific board",
inputSchema: {
boardId: z
.string()
.optional()
.describe('ID of the Trello board (uses default if not provided)'),
listId: z.string().describe('ID of the Trello list to update'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The boardId parameter is defined in the schema but is not used by the Trello API for updating a list (PUT /1/lists/{id}), nor is it used in the tool's implementation. The listId is sufficient to uniquely identify the list. Including boardId can be confusing for users. I've removed it and adjusted the description to be more accurate, matching the one in the README.

        description: "Update a list's name, position, or other properties",
        inputSchema: {
          listId: z.string().describe('ID of the Trello list to update'),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed boardId from the schema and changed description to "Update a list's name, position, or other properties". Fixed in 8b337c3.

Comment thread src/index.ts
Comment on lines +349 to +361
const params: {
name?: string;
pos?: number | 'top' | 'bottom';
closed?: boolean;
subscribed?: boolean;
idBoard?: string;
} = {};
if (name !== undefined) params.name = name;
if (pos !== undefined) params.pos = pos;
if (closed !== undefined) params.closed = closed;
if (subscribed !== undefined) params.subscribed = subscribed;
if (idBoard !== undefined) params.idBoard = idBoard;
const list = await this.trelloClient.updateList(listId, params);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This block can be significantly simplified. The explicit type definition for params is a duplicate of the one in trello-client.ts, and the conditional checks for undefined are verbose. You can create the parameters object inline and pass it directly to updateList. The underlying axios client will automatically omit properties with undefined values from the JSON payload.

          const list = await this.trelloClient.updateList(listId, { name, pos, closed, subscribed, idBoard });

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Replaced the explicit params object and undefined checks with a single inline call: this.trelloClient.updateList(listId, { name, pos, closed, subscribed, idBoard }). Fixed in 8b337c3.

@delorenj

Copy link
Copy Markdown
Owner

Useful tool — update_list is a real gap (PUT /1/lists/{id} was missing).

  1. Rebase needed. Main moved (notably #64 update_list_position landed, and #65 just merged); rebase against latest please.

  2. Scope vs update_list_position. update_list here includes pos, which now overlaps with the dedicated update_list_position tool. Both pathways work, but two tools writing to the same field can confuse LLM clients. Two reasonable options — your call:

    • Keep pos in update_list and deprecate update_list_position in a follow-up CHANGELOG entry.
    • Drop pos from this tool and have update_list cover only name, closed, subscribed, idBoard.

    I lean slightly toward the second (single-responsibility tools render better in MCP UIs) but either is defensible. Pick one and update the description text accordingly.

Once rebased + scope decision noted, ready to merge.

@delorenj
delorenj force-pushed the feature/update-list branch from 8b337c3 to 7507cc2 Compare May 23, 2026 03:11
@delorenj
delorenj merged commit ceeac86 into delorenj:main May 23, 2026
1 check passed
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.

2 participants