Skip to main content
Glama
diegofornalha

MCP Server Trello

archive_card

Move a specific Trello card to the archive using its unique ID for organized board management, ensuring efficient task cleanup and workspace maintenance.

Instructions

Send a card to the archive

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardIdYesID of the card to archive

Implementation Reference

  • MCP CallToolRequest handler for 'archive_card' tool: validates arguments and calls TrelloClient.archiveCard
    case 'archive_card': {
      const validArgs = validateArchiveCardRequest(args);
      const card = await this.trelloClient.archiveCard(validArgs.cardId);
      return {
        content: [{ type: 'text', text: JSON.stringify(card, null, 2) }],
      };
    }
  • Core implementation of archiving a Trello card by setting 'closed: true' via API PUT request
    async archiveCard(cardId: string): Promise<TrelloCard> {
      return this.handleRequest(async () => {
        const response = await this.axiosInstance.put(`/cards/${cardId}`, {
          closed: true,
        });
        return response.data;
      });
    }
  • Input schema validation function ensuring 'cardId' is provided and is a string
    export function validateArchiveCardRequest(args: Record<string, unknown>): { cardId: string } {
      if (!args.cardId) {
        throw new McpError(ErrorCode.InvalidParams, 'cardId is required');
      }
      return {
        cardId: validateString(args.cardId, 'cardId'),
      };
    }
  • src/index.ts:164-177 (registration)
    Tool registration in ListTools response, defining name, description, and input schema
    {
      name: 'archive_card',
      description: 'Send a card to the archive',
      inputSchema: {
        type: 'object',
        properties: {
          cardId: {
            type: 'string',
            description: 'ID of the card to archive',
          },
        },
        required: ['cardId'],
      },
    },
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