archive_list
Archive a Trello list by providing its ID; simplifies board management and keeps workspaces organized while integrating with MCP Server Trello.
Instructions
Send a list to the archive
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| listId | Yes | ID of the list to archive |
Implementation Reference
- src/trello-client.ts:156-163 (handler)The core handler function that archives a Trello list by sending a PUT request to set the list's closed status to true.async archiveList(listId: string): Promise<TrelloList> { return this.handleRequest(async () => { const response = await this.axiosInstance.put(`/lists/${listId}/closed`, { value: true, }); return response.data; }); }
- src/index.ts:192-205 (registration)Tool registration in the ListTools response, defining name, description, and input schema.{ name: 'archive_list', description: 'Send a list to the archive', inputSchema: { type: 'object', properties: { listId: { type: 'string', description: 'ID of the list to archive', }, }, required: ['listId'], }, },
- src/index.ts:282-288 (registration)Dispatch handler in CallToolRequest that validates args and calls the trelloClient.archiveList method.case 'archive_list': { const validArgs = validateArchiveListRequest(args); const list = await this.trelloClient.archiveList(validArgs.listId); return { content: [{ type: 'text', text: JSON.stringify(list, null, 2) }], }; }
- src/validators.ts:110-117 (schema)Input validation function ensuring listId is provided and is a string.export function validateArchiveListRequest(args: Record<string, unknown>): { listId: string } { if (!args.listId) { throw new McpError(ErrorCode.InvalidParams, 'listId is required'); } return { listId: validateString(args.listId, 'listId'), }; }