Skip to main content
Glama

move-list-to-board

Transfer a Trello list to a new board by specifying the list ID and destination board ID, enabling organized project management and resource allocation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boardIdYesID of the destination board
listIdYesID of the list to move

Implementation Reference

  • The core handler function that executes the tool by performing a PUT request to the Trello API to update the board ID of the specified list.
    async ({ listId, boardId }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const response = await fetch( `https://api.trello.com/1/lists/${listId}/idBoard?key=${credentials.apiKey}&token=${credentials.apiToken}`, { method: 'PUT', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ value: boardId, }), } ); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error moving list to board: ${error}`, }, ], isError: true, }; } }
  • Zod input schema defining the required parameters listId and boardId for the tool.
    { listId: z.string().describe('ID of the list to move'), boardId: z.string().describe('ID of the destination board'), },
  • Local registration of the 'move-list-to-board' tool using server.tool() within the registerListsTools function.
    server.tool( 'move-list-to-board', { listId: z.string().describe('ID of the list to move'), boardId: z.string().describe('ID of the destination board'), }, async ({ listId, boardId }) => { try { if (!credentials.apiKey || !credentials.apiToken) { return { content: [ { type: 'text', text: 'Trello API credentials are not configured', }, ], isError: true, }; } const response = await fetch( `https://api.trello.com/1/lists/${listId}/idBoard?key=${credentials.apiKey}&token=${credentials.apiToken}`, { method: 'PUT', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ value: boardId, }), } ); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error moving list to board: ${error}`, }, ], isError: true, }; } } );
  • src/index.ts:89-89 (registration)
    Top-level call to registerListsTools which includes the 'move-list-to-board' tool registration.
    registerListsTools(server, credentials);

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/adriangrahldev/advanced-trello-mcp-server'

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