remove-record-from-list
Remove companies or people from CRM lists such as sales pipelines and lead lists by specifying the list and entry IDs.
Instructions
Remove a company or person from a CRM list (sales pipeline, lead list, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entryId | Yes | ID of the list entry to remove | |
| listId | Yes | ID of the list to remove the record from |
Implementation Reference
- MCP tool handler configuration and execution logic for 'remove-record-from-list'. Validates listId UUID and calls the core removal function.removeRecordFromList: { name: 'remove-record-from-list', handler: async (listId: string, entryId: string) => { // UUID validation - hard fail for invalid list IDs if (!isValidUUID(listId)) { return { isError: true, content: [ { type: 'text', text: `Invalid list_id: must be a UUID. Got: ${listId}`, }, ], }; } return await removeRecordFromList(listId, entryId); }, idParams: ['listId', 'entryId'], } as ListActionToolConfig,
- Input schema and description definition for the 'remove-record-from-list' MCP tool.name: 'remove-record-from-list', description: formatToolDescription({ capability: 'Remove company or person from list (membership only).', boundaries: 'delete underlying record; membership only.', requiresApproval: true, constraints: 'Requires list UUID, entry UUID (not record UUID).', recoveryHint: 'Use get-list-entries to find entry UUID.', }), inputSchema: { type: 'object', properties: { listId: { type: 'string', description: 'UUID of the list to remove the entry from', example: '550e8400-e29b-41d4-a716-446655440000', }, entryId: { type: 'string', description: 'UUID of the list entry to remove (not the record ID)', example: '770e8400-e29b-41d4-a716-446655440002', }, }, required: ['listId', 'entryId'], additionalProperties: false, }, },
- src/api/operations/lists.ts:417-429 (helper)Core API implementation: performs DELETE request to Attio API endpoint `/lists/{listId}/entries/{entryId}` to remove the list entry.export async function removeRecordFromList( listId: string, entryId: string, retryConfig?: Partial<RetryConfig> ): Promise<boolean> { const api = getLazyAttioClient(); const path = `/lists/${listId}/entries/${entryId}`; return callWithRetry(async () => { await api.delete(path); return true; }, retryConfig); }
- src/objects/lists/entries.ts:237-259 (helper)Objects layer wrapper for removeRecordFromList with fallback to direct API DELETE.export async function removeRecordFromList( listId: string, entryId: string ): Promise<boolean> { try { return await removeGenericRecordFromList(listId, entryId); } catch (error: unknown) { if (process.env.NODE_ENV === 'development') { createScopedLogger('objects.lists', 'removeRecordFromList').warn( 'Generic removeRecordFromList failed', { message: error instanceof Error ? error.message : 'Unknown error', } ); } const api = getLazyAttioClient(); const path = `/lists/${listId}/entries/${entryId}`; await api.delete(path); return true; } }