trello_remove_member_from_card
Remove a member from a Trello card to manage card assignments and streamline workflow. Specify the card and member IDs to revoke access.
Instructions
Remove a member from a Trello card.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | Trello API key (optional if TRELLO_API_KEY env var is set) | |
| token | No | Trello API token (optional if TRELLO_TOKEN env var is set) | |
| cardId | Yes | ID or URL of the card | |
| memberId | Yes | ID of the member to remove from the card |
Implementation Reference
- src/tools/advanced.ts:1543-1566 (handler)Main handler function that removes a member from a Trello card. Extracts credentials, validates params, calls TrelloClient.removeMemberFromCard(), and returns a formatted response.
export async function handleTrelloRemoveMemberFromCard(args: unknown) { try { const { credentials, params } = extractCredentials(args); const { cardId, memberId} = validateRemoveMemberFromCard(params); const client = new TrelloClient(credentials); const response = await client.removeMemberFromCard(cardId, memberId); const result = { summary: `Removed member ${memberId} from card ${cardId}`, cardId, memberId, rateLimit: response.rateLimit }; return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2) } ] }; } catch (error) { - src/tools/advanced.ts:1425-1440 (schema)Validation schema for the remove_member_from_card tool using Zod. Validates cardId and memberId via trelloIdSchema.
const validateRemoveMemberFromCard = (args: unknown) => { const schema = z.object({ cardId: trelloIdSchema, memberId: trelloIdSchema }); return schema.parse(args); }; const validateDeleteLabel = (args: unknown) => { const schema = z.object({ labelId: trelloIdSchema }); return schema.parse(args); }; - src/tools/advanced.ts:1516-1541 (schema)Tool definition object with name 'trello_remove_member_from_card', description, and inputSchema specifying required cardId and memberId parameters.
export const trelloRemoveMemberFromCardTool: Tool = { name: 'trello_remove_member_from_card', description: 'Remove a member from a Trello card.', inputSchema: { type: 'object', properties: { apiKey: { type: 'string', description: 'Trello API key (optional if TRELLO_API_KEY env var is set)' }, token: { type: 'string', description: 'Trello API token (optional if TRELLO_TOKEN env var is set)' }, cardId: { type: 'string', description: 'ID or URL of the card' }, memberId: { type: 'string', description: 'ID of the member to remove from the card' } }, required: ['cardId', 'memberId'] } }; - src/trello/client.ts:784-790 (helper)TrelloClient method that makes a DELETE request to /cards/{cardId}/idMembers/{memberId} to remove a member from a card.
async removeMemberFromCard(cardId: string, memberId: string): Promise<TrelloApiResponse<void>> { return this.makeRequest<void>( `/cards/${cardId}/idMembers/${memberId}`, { method: 'DELETE' }, `Remove member ${memberId} from card ${cardId}` ); } - src/server.ts:323-324 (registration)Server-side route handler dispatching 'trello_remove_member_from_card' to handleTrelloRemoveMemberFromCard.
case 'trello_remove_member_from_card': return await handleTrelloRemoveMemberFromCard(args);