Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Canvas Medical

Scalekit connector
Open markdown

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

Tools
74
What they doRead · write · destructive
58 · 16 · 058 read16 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 Canvas Medical connection

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

    Console steps with screenshots

    Canvas Medical connections use SMART on FHIR and act as the signed-in Canvas staff user. Each Canvas customer runs its own instance: sign-in happens on <instance>.canvasmedical.com and the FHIR API is on fumage-<instance>.canvasmedical.com. Each connection carries that instance’s endpoints, audience (aud) and FHIR server domain, the client ID and secret of an OAuth app on the instance, and one extra authorization parameter.

    1. Create the connection and copy the redirect URI

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

    2. Register an OAuth app on the Canvas instance

      Open https://<instance>.canvasmedical.com/auth/applications/ and add an application:

      • Client type: Confidential
      • Authorization grant type: Authorization code
      • Redirect URIs: the redirect URI you copied

      Note the client ID and client secret.

    3. Enter the values on the connection

      Back on the Canvas Medical connection, enter these values, replacing <instance> with your instance name:

      FieldValue
      Client IDthe client ID from step 2
      Client Secretthe client secret from step 2
      Authorization Endpointhttps://<instance>.canvasmedical.com/auth/authorize/
      Token Endpointhttps://<instance>.canvasmedical.com/auth/token/
      Audience (aud)https://fumage-<instance>.canvasmedical.com
      FHIR Server Domainfumage-<instance>.canvasmedical.com

      Canvas publishes the same endpoints at https://fumage-<instance>.canvasmedical.com/.well-known/smart-configuration.

      Select openid, fhirUser, offline_access and launch, plus user/*.* or narrower scopes for the resources your agent uses. Click Save.

    4. Ask Scalekit to add the launch authorization parameter

      Email support@scalekit.com with the connection’s ID and ask for the extra authorization parameter launch set to e30K. The dashboard has no field for it. Connect accounts only after support confirms the change.

      Canvas denies a staff user’s sign-in with error=access_denied unless the authorization request carries a launch parameter. e30K is an empty launch context; it leaves the patient out, because Canvas refuses staff API calls from a token whose launch context names a patient.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • canvasmedical_allergy_intolerance_readGet one allergy or intolerance record by Canvas ID.Read-only

    Get Allergy or Intolerance

    Get one allergy or intolerance record by Canvas ID. Returns the AllergyIntolerance resource with allergen code, type, clinical and verification status, onset, reaction and notes. Use it before canvasmedical_allergy_intolerance_mark_entered_in_error, which needs the current record.

    Inputs

    allergy_intolerance_idstringrequired
    Canvas ID of the AllergyIntolerance to fetch, as returned by canvasmedical_allergy_intolerance_search, e.g. 12345.
  • canvasmedical_appointment_readGet one appointment by Canvas ID.Read-only

    Get Appointment

    Get one appointment by Canvas ID. Returns the Appointment resource with status, appointment type, reason, start and end times, location, meeting link and participants. Use it before canvasmedical_appointment_update to copy the fields you keep. Use canvasmedical_appointment_search to find the ID.

    Inputs

    appointment_idstringrequired
    Canvas ID of the Appointment to fetch, as returned by canvasmedical_appointment_search, e.g. 12345.
  • canvasmedical_care_plan_readGet one care plan by Canvas ID.Read-only

    Get Care Plan

    Get one care plan by Canvas ID. Returns the CarePlan resource with status, intent, category, subject and narrative text. Use canvasmedical_care_plan_search to list a patient's care plans.

    Inputs

    care_plan_idstringrequired
    Canvas ID of the CarePlan to fetch, as returned by canvasmedical_care_plan_search, e.g. 12345.
  • canvasmedical_care_team_readGet one care team by Canvas ID.Read-only

    Get Care Team

    Get one care team by Canvas ID. Returns the CareTeam resource with status, subject and participants with their roles. Use canvasmedical_care_team_search to find a patient's care team.

    Inputs

    care_team_idstringrequired
    Canvas ID of the CareTeam to fetch, as returned by canvasmedical_care_team_search, e.g. 12345.