deleteCollection
Remove a specific collection from Raindrop.io by providing its unique ID. This tool facilitates the management of your bookmark collections, ensuring a clean and organized workspace.
Instructions
Delete a collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Collection ID |
Implementation Reference
- src/services/raindrop.service.ts:102-110 (handler)Core handler function that executes the deletion of a Raindrop collection by making a DELETE request to the Raindrop API endpoint /collection/{id}./** * Delete a collection * Raindrop.io API: DELETE /collection/{id} */ async deleteCollection(id: number): Promise<void> { await this.client.DELETE('/collection/{id}', { params: { path: { id } } }); }
- Zod input schema for the collection_manage tool, which supports 'delete' operation requiring 'id' for deleteCollection functionality.export const CollectionManageInputSchema = z.object({ operation: z.enum(['create', 'update', 'delete']), id: z.number().optional(), title: z.string().optional(), parentId: z.number().optional(), });
- src/services/raindropmcp.service.ts:400-406 (registration)Declarative registration/configuration of the 'collection_manage' MCP tool, which invokes deleteCollection when operation='delete'.const collectionManageTool = defineTool({ name: 'collection_manage', description: 'Creates, updates, or deletes a collection. Use the operation parameter to specify the action.', inputSchema: CollectionManageInputSchema, outputSchema: CollectionOutputSchema, handler: handleCollectionManage, });
- MCP tool handler logic within handleCollectionManage that calls the deleteCollection service method for the delete operation.case 'delete': if (!args.id) throw new Error('id is required for delete'); await raindropService.deleteCollection(args.id); return { deleted: true }; default: throw new Error(`Unsupported operation: ${String(args.operation)}`); } }