Skip to main content
Glama
kesslerio

Attio MCP Server

by kesslerio

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
NameRequiredDescriptionDefault
record_idYesRecord ID to delete
resource_typeYesType 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'],
      },
    };
  • Registration of delete-record handler in the getToolHandler dispatch map.
    'delete-record': async (client, params) =>
      handleDeleteRecord(
        client,
        params as Parameters<typeof handleDeleteRecord>[1]
      ),
  • Export and registration of deleteRecordDefinition in coreToolDefinitions object.
    'delete-record': deleteRecordDefinition,

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/kesslerio/attio-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server