Skip to main content
Glama

trello_create_list

Create a new list in a Trello board to organize workflow columns like "To Do", "In Progress", or "Done" for project management.

Instructions

Create a new list in a Trello board. Use this to add workflow columns like "To Do", "In Progress", or "Done".

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)
nameYesName of the new list (e.g., "To Do", "In Progress", "Done")
idBoardYesID of the board where the list will be created (you can get this from list_boards)
posNoPosition of the list in the board: "top", "bottom", or specific numberbottom

Implementation Reference

  • The handler function that performs the API call to create a Trello list.
    export async function handleTrelloCreateList(args: unknown) {
      try {
        const listData = validateCreateList(args);
        const { apiKey, token, ...createData } = listData;
        
        const client = new TrelloClient({ apiKey, token });
        const response = await client.createList({
          name: createData.name,
          idBoard: createData.idBoard,
          ...(createData.pos !== undefined && { pos: createData.pos })
        });
        const list = response.data;
        
        const result = {
          summary: `Created list: ${list.name}`,
          list: {
            id: list.id,
            name: list.name,
            boardId: list.idBoard,
            position: list.pos,
            closed: list.closed,
            subscribed: list.subscribed
          },
          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 creating list: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • Input validation schema for creating a Trello list.
    const validateCreateList = (args: unknown) => {
      const schema = z.object({
        apiKey: z.string().min(1, 'API key is required'),
        token: z.string().min(1, 'Token is required'),
        name: z.string().min(1, 'List name is required'),
        idBoard: z.string().regex(/^[a-f0-9]{24}$/, 'Invalid board ID format'),
        pos: z.union([z.number().min(0), z.enum(['top', 'bottom'])]).optional()
      });
      
      return schema.parse(args);
    };
  • Tool definition for 'trello_create_list'.
    export const trelloCreateListTool: Tool = {
      name: 'trello_create_list',
      description: 'Create a new list in a Trello board. Use this to add workflow columns like "To Do", "In Progress", or "Done".',
      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)'
          },
          name: {
            type: 'string',
            description: 'Name of the new list (e.g., "To Do", "In Progress", "Done")',
            minLength: 1
          },
          idBoard: {
            type: 'string',
            description: 'ID of the board where the list will be created (you can get this from list_boards)',
            pattern: '^[a-f0-9]{24}$'
          },
          pos: {
            oneOf: [
              { type: 'number', minimum: 0 },
              { type: 'string', enum: ['top', 'bottom'] }
            ],
            description: 'Position of the list in the board: "top", "bottom", or specific number',
            default: 'bottom'
          }
        },
        required: ['apiKey', 'token', 'name', 'idBoard']
      }
    };

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