delete-record
Remove specific records from your Attio CRM system, including companies, people, lists, tasks, deals, and notes by providing the record ID and resource type.
Instructions
Delete a record of any supported type
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| record_id | Yes | Record ID to delete | |
| resource_type | Yes | Type of resource to operate on (companies, people, lists, records, tasks) |
Implementation Reference
- Core handler function for the delete-record tool. Performs DELETE request to Attio API /v2/objects/{slug}/records/{record_id} using the HttpClient.export async function handleDeleteRecord( client: HttpClient, params: { resource_type: ResourceType; record_id: string; } ): Promise<ToolResult> { try { const { resource_type, record_id } = params; const objectSlug = getObjectSlug(resource_type); await client.delete(`/v2/objects/${objectSlug}/records/${record_id}`); return structuredResult( { record_id }, `Deleted ${resource_type} record with ID: ${record_id}` ); } catch (error) { const { message, details } = extractErrorInfo(error); return errorResult(message || 'Failed to delete record', details); } }
- ToolDefinition for delete-record, including input schema (resource_type and record_id required) and formatted description.export const deleteRecordDefinition: ToolDefinition = { name: 'delete-record', description: formatDescription({ capability: 'Delete an Attio record from its object (company, person, deal, task)', boundaries: 'cascade delete related data or clean up list memberships automatically', constraints: 'Requires record_id and resource_type; operation is irreversible once confirmed', recoveryHint: 'If uncertain, fetch with records_get_details to confirm the target before deletion', }), inputSchema: { type: 'object', properties: { resource_type: RESOURCE_TYPE_SCHEMA, record_id: { type: 'string', description: 'Record ID to delete', }, }, required: ['resource_type', 'record_id'], }, };
- packages/core/src/tools/handlers.ts:1022-1026 (registration)Registration of delete-record handler in the getToolHandler dispatch map.'delete-record': async (client, params) => handleDeleteRecord( client, params as Parameters<typeof handleDeleteRecord>[1] ),
- packages/core/src/tools/definitions.ts:423-423 (registration)Export and registration of deleteRecordDefinition in coreToolDefinitions object.'delete-record': deleteRecordDefinition,