Skip to main content
Glama
diegofornalha

MCP Server Trello

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
NameRequiredDescriptionDefault
listIdYesID of the list to archive

Implementation Reference

  • 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) }],
      };
    }
  • 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'),
      };
    }
Install Server

Other Tools

Related Tools

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

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