Repository navigation
feat: add pos parameter to move_card for list position control - #52
Schutzworks wants to merge 2 commits into
Conversation
Summary of ChangesHello @Schutzworks, 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 to the card movement functionality by adding an optional position parameter. This allows users to specify where a card should be placed within a list, offering greater flexibility and control over board organization. The change involves updating both the tool's input definition and the client-side API call to accommodate this new parameter. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request adds a pos parameter to the move_card tool, which is a great feature for controlling card placement. The implementation correctly threads the new parameter through to the Trello API. My main feedback is to improve the input validation for the new pos parameter in the Zod schema to make it more strict, ensuring it only accepts valid values ("top", "bottom", or a positive number) as expected by the Trello API. This will prevent invalid data from being passed to the client and improve the tool's robustness.
| pos: z | ||
| .union([z.string(), z.number()]) | ||
| .optional() | ||
| .describe('Position in target list: "top", "bottom", or a positive number'), |
There was a problem hiding this comment.
The current Zod schema for pos is z.union([z.string(), z.number()]), which is too permissive. It allows any string (not just "top" or "bottom") and any number (including negative numbers and zero), which could lead to unexpected behavior or API errors that are not caught by validation.
According to the Trello API documentation and the description you've provided, pos should be either "top", "bottom", or a positive number.
To enforce this and provide better type safety and validation, you should refine the schema. I suggest using z.enum(['top', 'bottom']) for the string part and z.number().positive() for the number part.
| pos: z | |
| .union([z.string(), z.number()]) | |
| .optional() | |
| .describe('Position in target list: "top", "bottom", or a positive number'), | |
| pos: z | |
| .union([z.enum(['top', 'bottom']), z.number().positive()]) | |
| .optional() | |
| .describe('Position in target list: "top", "bottom", or a positive number'), |
|
Thank you for the contribution! Closing this in favor of #85, which is a strict superset — it adds the Your work isn't lost — the same feature ships via #85, which is being merged now. Appreciate you opening the conversation. |
|
Yay! Thank you! Love your work and happy to contribute more where I can.
Andrew Schutzbank MD, MPH
CEO + Founder, Schutzworks
Need Advice? Chat with Schutzduck <https://schutzduck.com> or Read the
Schutzblog <https://www.schutzblog.com>
…On Thu, May 21, 2026 at 11:04 PM delorenj ***@***.***> wrote:
*delorenj* left a comment (delorenj/mcp-server-trello#52)
<#52 (comment)>
Thank you for the contribution! Closing this in favor of #85
<#85>, which is a
strict superset — it adds the pos parameter to both move_card AND
update_card_details. As you'll see in the #85
<#85> description, the
author noted the overlap and built on top of your direction here.
Your work isn't lost — the same feature ships via #85
<#85>, which is being
merged now. Appreciate you opening the conversation.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BZU2UPSJXQXBQT4EBQRPGAD4367TRAVCNFSM6AAAAACZITC4K6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMJUGYZTMOBZGY>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closes #51
Adds an optional pos parameter to the move_card tool, allowing control over card position within the target list.
Changes:
Added pos to move_card input schema (accepts "top", "bottom", or numeric value)
Updated moveCard client method to include pos in the API request
Usage:
javascript// Move card to top of list
move_card({ cardId: "xxx", listId: "yyy", pos: "top" })
// Move card to specific position
move_card({ cardId: "xxx", listId: "yyy", pos: 140737487919104 })
Tested and working in Claude Desktop.