Skip to main content
Glama

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
NameRequiredDescriptionDefault
archivedYesWhether to archive (true) or unarchive (false) the list
listIdYesID of the list to archive or unarchive

Implementation Reference

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

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