Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Drata

Scalekit connector
Open markdown

The Drata connector lets your AI agent act in each user's Drata account. Each user connects their own Drata access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 30 tools.

Tools
30
What they doRead · write · destructive
26 · 4 · 026 read4 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Drata connection

    In AgentKit > Connections, create a Drata connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'drata'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Drata:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'drata_company_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Drata credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • drata_company_getGet the Drata account's company profile.Read-only

    Get Company

    Get the Drata account's company profile. Returns the company name, legal name, domain, description, training and background-check settings, and entitlements. Use this to confirm which Drata account the connection uses.

    Inputs

    This tool takes no inputs.

  • drata_control_getGet one control in a Drata workspace by ID.Read-only

    Get Control

    Get one control in a Drata workspace by ID. Returns the control's code, name, description, question, activity, rationale, framework tags, owners, linked requirement, test and evidence IDs, and timestamps. Use this when you have a control ID. Use drata_controls_list to find one.

    Inputs

    controlIdstringrequired
    The ID of the control. Get it from drata_controls_list. Example: 101.
    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    expandarray
    List of subcollections and sub-objects to expand. Valid values: customFields, evidenceIds, flags, frameworkTags, owners, requirements, testIds, topics. Example: ["customFields"].
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Which field to sort by. Example: createdAt.one of createdAtupdatedAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
  • drata_control_owners_listList the users who own a Drata control.Read-only

    List Control Owners

    List the users who own a Drata control. Returns each owner's user id, name and email. Use this to find who is responsible for a control.

    Inputs

    controlIdintegerrequired
    The ID of the control. Get it from drata_controls_list. Example: 101.
    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    excludeUserIdsarray
    User IDs of the Control Owners to exclude. Example: [].
    frameworkSlugstring
    Filter data by Users associated with this Control Requirement Framework slug. Example: soc2.
    includeTotalCountboolean
    Include total count of all matching records in response. Only honored on first page (when cursor is null). Example: false.
    includeUserIdsarray
    User IDs of the Control Owners to return. Example: [1, 2, 3].
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Which field to sort by. Example: createdAt.one of createdAtupdatedAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
  • drata_control_requirements_listList the framework requirements mapped to a Drata control.Read-only

    List Control Requirements

    List the framework requirements mapped to a Drata control. Returns each requirement's id, name, description and framework, with pagination. Use this to see which framework requirements a control satisfies.

    Inputs

    controlIdintegerrequired
    The ID of the control. Get it from drata_controls_list. Example: 101.
    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    excludeIdsarray
    Exclude requirements by array of IDs. Example: [].
    frameworkSlugstring
    Filter data by controls associated with these framework slugs. This parameter is intended to be used only for custom frameworks. Example: slug.
    frameworkTagarray
    Filter data by controls associated with these framework tags. Valid values include NONE, SOC_2, ISO27001, CCPA, GDPR, HIPAA, PCI, SCF, NIST80053, NISTCSF, CMMC, NIST800171 and more. Example: ["SOC_2", "ISO27001"].
    includeTotalCountboolean
    Include total count of all matching records in response. Only honored on first page (when cursor is null). Example: false.
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Which field to sort by. Example: createdAt.one of createdAtupdatedAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
  • drata_controls_listList the controls in a Drata workspace, filtered by readiness, monitoring, evidence, policy, test results or approval status.Read-only

    List Controls

    List the controls in a Drata workspace, filtered by readiness, monitoring, evidence, policy, test results or approval status. Returns each control's id, code, name, description, framework tags, owners and linked test and evidence IDs, with a cursor for the next page. Use this to review control status. Use drata_control_get for one control.

    Inputs

    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    expandarray
    List of subcollections and sub-objects to expand. Valid values: customFields, evidenceIds, flags, frameworkTags, owners, requirements, testIds, topics. Example: ["customFields"].
    hasEvidenceboolean
    Filter to Controls with or without Evidence. Example: true.
    hasPassingTestboolean
    Filter to Controls with at least one passing Test. Example: true.
    hasPolicyboolean
    Filter to Controls with or without Policy. Example: true.
    includeTotalCountboolean
    Include total count of all matching records in response. Only honored on first page (when cursor is null). Example: false.
    isArchivedboolean
    Filter Controls that are or are not archived. Example: false.
    isEnabledboolean
    Filter Controls that are or are not enabled. Example: true.
    isMonitoredboolean
    Filter Controls that have or do not have a Monitor. Example: false.
    isReadyboolean
    Filter Controls that are or are not ready. Example: false.
    policyIdinteger
    The ID of the policy. Get it from drata_policies_list. Example: 301.
    requiredApprovalsstring
    Filter Controls by the status of their required approval. CHANGES_REQUESTED, NEEDS_APPROVAL and PREPARE_FOR_APPROVERS identify Controls that are not ready because their approval is still in progress; APPROVED and NO_REVIEW do not block readiness. Approval status only applies to enabled Controls, so this filter cannot be combined with isEnabled=false. Example: PREPARE_FOR_APPROVERS.one of PREPARE_FOR_APPROVERSNEEDS_APPROVALAPPROVEDCHANGES_REQUESTEDNO_REVIEW
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Which field to sort by. Example: createdAt.one of createdAtupdatedAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
    ticketStatusstring
    Only include Controls with an associated Task Management Ticket. Example: IN_PROGRESS.one of IN_PROGRESSARCHIVED
  • drata_events_listList Drata events (the audit trail of changes, test runs and syncs), filtered by type, source, category, connection, user, workspace or date.Read-only

    List Events

    List Drata events (the audit trail of changes, test runs and syncs), filtered by type, source, category, connection, user, workspace or date. Returns each event's id, type, category, source, description, user and time, with a cursor for the next page. Use this to see what changed recently in Drata.

    Inputs

    categorystring
    Filter data to events of this category. Valid values include AUTOPILOT, AGENT, POLICY, PERSONNEL, REPORT, VENDOR, ASSET, COMPANY, ASSESSMENT, AUDIT, MONITOR, USER and more. Example: AUTOPILOT.
    connectionIdinteger
    The connection to filter events by. A null/blank value will return events without a connection. Example: 123.
    createdAtEndDatestring
    Filters the events to those with a creation date less than or equal to this date and time. Example: 2026-01-15.
    createdAtStartDatestring
    Filters the events to those with a creation date greater than or equal to this date and time. Example: 2026-01-15.
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    expandarray
    List of subcollections and sub-objects to expand. Valid values: connection, issues, metadata, testId, testName, user. Example: ["connection"].
    includeTotalCountboolean
    Include total count of all matching records in response. Only honored on first page (when cursor is null). Example: false.
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Events can only be sorted by create date. Example: createdAt.one of createdAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
    sourcestring
    Filter data to events of this source. Example: APP.one of APPAUTOPILOTPUBLIC_APIVENDOR_QUESTIONNAIRESCHEDULEDWORKFLOWDRATA_POLICYAUDIT_AGENTDRATA_MIGRATION
    typestring
    Filter data to events of this type. Valid values include COMPANY_DATA_UPDATED, COMPANY_LOGO_UPDATED, COMPANY_KEY_PERSONNEL_UPDATED, COMPANY_ROLES_UPDATED, COMPANY_SECURITY_DATA_UPDATED, COMPANY_DOCUMENT_UPLOADED, COMPANY_DOCUMENT_DOWNLOADED, COMPANY_DOCUMENT_DELETED, COMPANY_HUMAN_RESOURCES_DATA_UPDATED, EMPLOYMENT_STATUS_UPDATED, REMINDER_EMAIL_SENT, POLICIES_DOWNLOAD_ALL and more. Example: COMPANY_DATA_UPDATED.
    userIdinteger
    The Drata user ID. Get it from drata_users_list. Example: 456.
    workspaceIdinteger
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
  • drata_evidence_artifacts_listList the artifacts (files, URLs or text) attached to a Drata evidence item.Read-only

    List Evidence Artifacts

    List the artifacts (files, URLs or text) attached to a Drata evidence item. Returns each artifact's id, name, extension, version, source, type and dates, with pagination. Use this to see what has been uploaded as proof for an evidence item.

    Inputs

    evidenceIdintegerrequired
    The ID of the evidence item. Get it from drata_evidence_list. Example: 789.
    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    artifactTypesarray
    Filter artifacts by type. Valid values: URL, S3_FILE, TICKET_PROVIDER, NONE, GOOGLE_DRIVE, ONE_DRIVE, BOX, DROPBOX, SHARE_POINT, TEST_RESULT. Example: ["URL"].
    cursorstring
    This parameter is used to paginate through results. No value is needed for the first request. If there are additional results, the response will contain a `pagination.cursor` value that can be used in the subsequent request to retrieve the next page of results. Example: eyJpZCI6MTAwfQ==.
    isArchivedboolean
    True returns only archived (past) artifacts, false only active ones. Omit to return both. Example: false.
    namestring
    Filter artifacts by name (prefix match). Example: Q4-2024-Security-Audit.
    sizeinteger
    Number of results to return. Example: 50.
    sortstring
    Which field to sort by. Example: createdAt.one of createdAtupdatedAt
    sortDirstring
    The direction to sort the data. Example: ASC.one of ASCDESC
  • drata_evidence_getGet one evidence item in a Drata workspace by ID.Read-only

    Get Evidence

    Get one evidence item in a Drata workspace by ID. Returns the evidence item's name, description, implementation guidance, status, renewal date and schedule, owners, artifacts and linked controls. Use this when you have an evidence ID. Use drata_evidence_artifacts_list for its files and links.

    Inputs

    evidenceIdintegerrequired
    The ID of the evidence item. Get it from drata_evidence_list. Example: 789.
    workspaceIdintegerrequired
    The ID of the Drata workspace. Get it from drata_workspaces_list. Example: 1.
    expandarray
    List of subcollections and sub-objects to expand. Valid values: owners, artifacts, controls. Example: ["owners"].