Skip to main content
Glama

move_card

Change a card's workflow status by moving it to a different list in Trello, such as from "To Do" to "In Progress".

Instructions

Move a card to a different list. Use this to change a card's workflow status (e.g., from "To Do" to "In Progress").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesTrello API key (automatically provided by Claude.app from your stored credentials)
tokenYesTrello API token (automatically provided by Claude.app from your stored credentials)
cardIdYesID of the card to move (you can get this from board details or card searches)
idListYesID of the destination list (you can get this from get_lists)
posNoPosition in the destination list: "top", "bottom", or specific number

Implementation Reference

  • The handler function for the 'move_card' tool, which validates input and calls the Trello API client.
    export async function handleMoveCard(args: unknown) {
      try {
        const moveData = validateMoveCard(args);
        const { apiKey, token, cardId, ...moveParams } = moveData;
        
        const client = new TrelloClient({ apiKey, token });
        const response = await client.moveCard(cardId, moveParams);
        const card = response.data;
        
        const result = {
          summary: `Moved card "${card.name}" to list ${card.idList}`,
          card: {
            id: card.id,
            name: card.name,
            url: card.shortUrl,
            listId: card.idList,
            boardId: card.idBoard,
            position: card.pos
          },
          rateLimit: response.rateLimit
        };
        
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      } catch (error) {
        const errorMessage = error instanceof z.ZodError 
          ? formatValidationError(error)
          : error instanceof Error 
            ? error.message 
            : 'Unknown error occurred';
            
        return {
          content: [
            {
              type: 'text' as const,
              text: `Error moving card: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • The tool definition and input schema for the 'move_card' tool.
    export const moveCardTool: Tool = {
      name: 'move_card',
      description: 'Move a card to a different list. Use this to change a card\'s workflow status (e.g., from "To Do" to "In Progress").',
      inputSchema: {
        type: 'object',
        properties: {
          apiKey: {
            type: 'string',
            description: 'Trello API key (automatically provided by Claude.app from your stored credentials)'
          },
          token: {
            type: 'string',
            description: 'Trello API token (automatically provided by Claude.app from your stored credentials)'
          },
          cardId: {
            type: 'string',
            description: 'ID of the card to move (you can get this from board details or card searches)',
            pattern: '^[a-f0-9]{24}$'
          },
          idList: {
            type: 'string',
            description: 'ID of the destination list (you can get this from get_lists)',
            pattern: '^[a-f0-9]{24}$'
          },
          pos: {
            oneOf: [
              { type: 'number', minimum: 0 },
              { type: 'string', enum: ['top', 'bottom'] }
            ],
            description: 'Position in the destination list: "top", "bottom", or specific number'
          }
        },
        required: ['apiKey', 'token', 'cardId', 'idList']
      }
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kocakli/Trello-Desktop-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server