delete_card
Remove a task from a Focalboard workspace permanently by specifying the card ID and board ID to clean up completed or unnecessary items.
Instructions
Delete a card (task) from a board permanently.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cardId | Yes | The ID of the card to delete | |
| boardId | Yes | The ID of the board the card belongs to |
Implementation Reference
- src/index.ts:437-454 (handler)The main MCP tool handler for 'delete_card'. Validates the required boardId and cardId arguments, delegates to the focalboard client's deleteCard method, and returns a standardized success response.case 'delete_card': { const cardId = args?.cardId as string; const boardId = args?.boardId as string; if (!cardId || !boardId) { throw new Error('cardId and boardId are required'); } await focalboard.deleteCard(boardId, cardId); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Card deleted successfully' }) } ] }; }
- src/index.ts:180-196 (registration)Registers the 'delete_card' tool in the tools array provided to ListToolsRequestHandler, including its description and input schema for validation.name: 'delete_card', description: 'Delete a card (task) from a board permanently.', inputSchema: { type: 'object', properties: { cardId: { type: 'string', description: 'The ID of the card to delete' }, boardId: { type: 'string', description: 'The ID of the board the card belongs to' } }, required: ['cardId', 'boardId'] } },
- src/index.ts:182-195 (schema)Defines the input schema for the delete_card tool, specifying required string parameters boardId and cardId.inputSchema: { type: 'object', properties: { cardId: { type: 'string', description: 'The ID of the card to delete' }, boardId: { type: 'string', description: 'The ID of the board the card belongs to' } }, required: ['cardId', 'boardId'] }
- src/focalboard-client.ts:270-275 (helper)Helper method in FocalboardClient that performs the actual HTTP DELETE request to remove the specified card (block) from the board.async deleteCard(boardId: string, cardId: string): Promise<void> { await this.makeRequest<void>( `/boards/${boardId}/blocks/${cardId}`, 'DELETE' ); }