archive-list
Archive or unarchive Trello lists directly using a specified list ID and status, streamlining project management workflows with the Advanced Trello MCP Server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| archived | Yes | Whether to archive (true) or unarchive (false) the list | |
| listId | Yes | ID of the list to archive or unarchive |
Implementation Reference
- src/tools/lists.ts:173-218 (handler)The handler function that implements the 'archive-list' tool logic. It performs a PUT request to the Trello API to set the 'closed' state of a list based on the 'archived' parameter.async ({ listId, archived }) => { 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}/closed?key=${credentials.apiKey}&token=${credentials.apiToken}`, { method: 'PUT', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ value: archived, }), } ); const data = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(data), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error archiving list: ${error}`, }, ], isError: true, }; }
- src/tools/lists.ts:170-172 (schema)Zod schema defining the input parameters for the 'archive-list' tool: listId (string) and archived (boolean).listId: z.string().describe('ID of the list to archive or unarchive'), archived: z.boolean().describe('Whether to archive (true) or unarchive (false) the list'), },
- src/tools/lists.ts:168-172 (registration)Registration of the 'archive-list' tool using server.tool(), specifying the name, input schema, and handler function.'archive-list', { listId: z.string().describe('ID of the list to archive or unarchive'), archived: z.boolean().describe('Whether to archive (true) or unarchive (false) the list'), },
- src/index.ts:89-89 (registration)Top-level call to register all lists tools, including 'archive-list', in the main server setup.registerListsTools(server, credentials);