Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to DrChrono

Scalekit connector
Open markdown

The DrChrono connector lets your AI agent act in each user's DrChrono account. Each user signs in to DrChrono once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 47 tools.

Tools
47
What they doRead · write · destructive
34 · 13 · 034 read13 write0 destructive
Users sign in with
OAuth app
Your own DrChrono app

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 DrChrono connection

    In AgentKit > Connections, create a DrChrono connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    DrChrono connections use your own OAuth app. Register one with DrChrono and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the DrChrono connection.

    Console steps with screenshots

    DrChrono connections use OAuth 2.0 and act as the signed-in DrChrono provider or staff user. Register an API app in DrChrono, then enter its client ID and secret on the connection.

    1. Create the connection and copy the redirect URI

      In the Scalekit dashboard, go to AgentKit > Connections > Create Connection, find DrChrono and click Create. Copy the Redirect URI.

    2. Register an API app in DrChrono

      In DrChrono’s API settings, create an API app and add the redirect URI you copied. Note the app’s client ID and client secret.

    3. Enter the credentials on the connection

      Back on the DrChrono connection, enter the Client ID and Client Secret. Select only the scopes your agent needs, such as patients:read and calendar:read. Don’t leave the selection empty: DrChrono then grants every scope. Click Save.

  5. 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 = 'drchrono'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize DrChrono:', 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: 'drchrono_get_availability',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • drchrono_get_allergyGet one patient allergy by ID.Read-only

    Get Allergy

    Get one patient allergy by ID. Returns patient, doctor, description, reaction, SNOMED/RxNorm codes, status, verification status and notes. Use drchrono_list_allergies to find allergies for a patient.

    Inputs

    idintegerrequired
    ID of the allergy. Get it from drchrono_list_allergies. Example: 12345.
  • drchrono_get_appointmentGet one appointment or break by ID.Read-only

    Get Appointment

    Get one appointment or break by ID. Returns patient, doctor, office, exam room, scheduled time, duration, status, reason, notes, ICD-10 codes, billing status and insurer details. Use drchrono_list_appointments to find appointment IDs.

    Inputs

    idstringrequired
    ID of the appointment. Get it from drchrono_list_appointments. Example: 12345.
  • drchrono_get_appointment_profileGet one appointment profile (visit type) by ID.Read-only

    Get Appointment Profile

    Get one appointment profile (visit type) by ID. Returns its name, doctor, default duration, color, reason and online-scheduling flag. Use drchrono_list_appointment_profiles to find profile IDs.

    Inputs

    idintegerrequired
    ID of the appointment profile. Get it from drchrono_list_appointment_profiles. Example: 12345.
  • drchrono_get_availabilityGet open appointment slots for a date or date range at an office, for a doctor or exam room.Read-only

    Get Availability

    Get open appointment slots for a date or date range at an office, for a doctor or exam room. Returns open time blocks per exam room, each split into slots of the requested duration. Use this before drchrono_create_appointment to pick a free time.

    Inputs

    datestring
    Date to check (YYYY-MM-DD). Set this or date_range. Example: 2026-11-02.
    date_rangestring
    Date range to check, as YYYY-MM-DD/YYYY-MM-DD. Set this or date. Example: 2026-11-02/2026-11-06.
    doctorinteger
    Doctor to check availability for. Get doctor IDs from drchrono_list_doctors. Example: 12345.
    durationinteger
    Appointment length in minutes, used to split open time into slots. Example: 30.
    exam_roominteger
    Exam room to check. Leave empty to get availability for every exam room, grouped by room. Example: 1.
    officeinteger
    Office to check availability for. Get office IDs from drchrono_list_offices. Example: 12345.
  • drchrono_get_clinical_noteGet one clinical note by ID.Read-only

    Get Clinical Note

    Get one clinical note by ID. Returns patient, appointment, signee, archived flag and the note sections with their field values. Use drchrono_list_clinical_notes to find notes for a patient or date.

    Inputs

    idintegerrequired
    ID of the clinical note. Get it from drchrono_list_clinical_notes. Example: 12345.
  • drchrono_get_doctorGet one doctor in the practice group by ID.Read-only

    Get Doctor

    Get one doctor in the practice group by ID. Returns name, specialty, NPI, contact details, timezone, practice group and work schedule. Use drchrono_list_doctors to find doctor IDs.

    Inputs

    idintegerrequired
    ID of the doctor. Get it from drchrono_list_doctors. Example: 12345.
  • drchrono_get_eligibility_checkGet one past insurance eligibility check by ID.Read-only

    Get Eligibility Check

    Get one past insurance eligibility check by ID. Returns patient, appointment, payer name, coverage level, eligibility code, service type, subscriber and coverage details. Use drchrono_list_eligibility_checks to find checks for a patient.

    Inputs

    idintegerrequired
    ID of the eligibility check. Get it from drchrono_list_eligibility_checks. Example: 12345.
  • drchrono_get_line_itemGet one billing line item by ID.Read-only

    Get Line Item

    Get one billing line item by ID. Returns appointment, patient, procedure code, units, price, allowed and paid amounts, adjustments, balances and billing status. Use drchrono_list_line_items to find line items for an appointment.

    Inputs

    idintegerrequired
    ID of the line item. Get it from drchrono_list_line_items. Example: 12345.