Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Metronome

Scalekit connector
Open markdown

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

Tools
104
What they doRead · write · destructive
45 · 44 · 1545 read44 write15 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 Metronome connection

    In AgentKit > Connections, create a Metronome 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 = 'metronome'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Metronome:', 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: 'metronome_audit_logs_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Metronome 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
  • metronome_audit_logs_listList audit log entries for actions in the account from the API, the app or automated processes, optionally by date range, resource type or resource ID.Read-only

    List Audit Logs

    List audit log entries for actions in the account from the API, the app or automated processes, optionally by date range, resource type or resource ID. Returns data (entries with id, timestamp, actor, request, resource_type, resource_id, action, status and description) and next_page. Use this to see who changed what and when. Audit logs may take a few minutes to appear.

    Inputs

    ending_beforestring
    RFC 3339 timestamp (exclusive). Cannot be used with 'next_page'. Example: 2026-02-01T00:00:00.000Z
    limitinteger
    Max number of results that should be returned. Example: 25
    next_pagestring
    Cursor that indicates where the next page of results should start. Example: 0c34b75b47491b73db66d46737d9a87
    resource_idstring
    Optional parameter that can be used to filter which audit logs are returned. If you specify resource_id, you must also specify resource_type. Example: 9b85c1c1-5238-4f2a-a409-61412905e1e1
    resource_typestring
    Optional parameter that can be used to filter which audit logs are returned. If you specify resource_type, you must also specify resource_id. Example: contract
    sortstring
    Sort order by timestamp, e.g. date_asc or date_desc. Defaults to date_asc. Example: date_ascone of date_ascdate_desc
    starting_onstring
    RFC 3339 timestamp of the earliest audit log to return. Cannot be used with 'next_page'. Example: 2026-01-01T00:00:00.000Z
  • metronome_balances_listList a customer's balances: commits and credits, customer-level and optionally contract-level, with optional date filters, archived items, ledgers and current balance.Read-only

    List Customer Balances

    List a customer's balances: commits and credits, customer-level and optionally contract-level, with optional date filters, archived items, ledgers and current balance. Returns data (commits and credits with id, type, name, priority, product, access_schedule, contract and, when requested, balance and ledger) and next_page. Use this for a combined view of commits and credits. Use metronome_net_balance_get for one total, or metronome_commits_list and metronome_credits_list for one kind.

    Inputs

    customer_idstringrequired
    Metronome customer ID (a UUID). Get it from metronome_customers_list or metronome_customer_create. Example: 13117714-3f05-48e5-a6e9-a66093f13b4d
    access_typestring
    Filters balances by how they are drawn down. `SPEND` deducts the dollar cost of usage. `QUANTITY` deducts the number of units used. Example: SPENDone of SPENDQUANTITY
    covering_datestring
    Return only balances that have access schedules that "cover" the provided date. Example: 2026-01-15T00:00:00.000Z
    effective_beforestring
    Include only balances that have any access before the provided date (exclusive) Example: 2026-02-01T00:00:00.000Z
    exclude_zero_balancesboolean
    Exclude balances with zero amounts from the response. Example: false
    idstring
    Return only the commit or credit with this ID. Example: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85
    include_archivedboolean
    Include archived credits and credits from archived contracts. Example: false
    include_balanceboolean
    Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower. Example: false
    include_contract_balancesboolean
    Include balances on the contract level. Example: false
    include_ledgersboolean
    Include ledgers in the response. Setting this flag may cause the query to be slower. Example: true
    limitinteger
    The maximum number of commits to return. Defaults to 25. Example: 25
    next_pagestring
    The next page token from a previous response. Example: 0c34b75b47491b73db66d46737d9a87
    starting_atstring
    Include only balances that have any access on or after the provided date. Example: 2026-01-01T00:00:00.000Z
    webhook_notification_idstring
    Indicates that this API request was triggered by a webhook notification with the provided ID. Example: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc
  • metronome_billable_metric_getGet one billable metric's full configuration.Read-only

    Get Billable Metric

    Get one billable metric's full configuration. Returns data with id, name, event_type_filter, property_filters, aggregation_type, aggregation_key, group_keys, sql, custom_fields and archived_at. Use this when you have the metric ID. Use metronome_billable_metrics_list to find it.

    Inputs

    billable_metric_idstringrequired
    Billable metric ID (a UUID). Get it from metronome_billable_metrics_list. Example: 13117714-3f05-48e5-a6e9-a66093f13b4d
  • metronome_billable_metrics_listList billable metrics (how usage events are filtered and aggregated) with their full configuration, optionally including archived ones.Read-only

    List Billable Metrics

    List billable metrics (how usage events are filtered and aggregated) with their full configuration, optionally including archived ones. Returns data (metrics with id, name, event_type_filter, property_filters, aggregation_type, aggregation_key, group_keys, sql, custom_fields and archived_at) and next_page. Use this to find metrics for usage products. Use metronome_customer_billable_metrics_list for the metrics one customer is billed on.

    Inputs

    include_archivedboolean
    If true, the list of returned metrics will include archived metrics. Example: false
    limitinteger
    Max number of results that should be returned. Example: 25
    next_pagestring
    Cursor that indicates where the next page of results should start. Example: 0c34b75b47491b73db66d46737d9a87
  • metronome_billing_providers_listList the billing providers configured for the account and their delivery methods.Read-only

    List Billing Providers

    List the billing providers configured for the account and their delivery methods. Returns data (entries with billing_provider, delivery_method, delivery_method_id and delivery_method_configuration) and next_page. Use this to find delivery_method_id values for customer billing configurations and tax credentials.

    Inputs

    next_pagestring
    The cursor to the next page of results. Example: af26878a-de62-4a0d-9b77-3936f7c2b6d6
  • metronome_commits_listList a customer's prepaid and postpaid commits, optionally one commit, contract-level commits, archived commits, ledgers and balances.Read-only

    List Commits

    List a customer's prepaid and postpaid commits, optionally one commit, contract-level commits, archived commits, ledgers and balances. Returns data (commits with id, type, name, priority, product, access_schedule, invoice_schedule, contract and, when requested, ledger and balance) and next_page. Use this to track commitment use. Use metronome_credits_list for credits and metronome_balances_list for both.

    Inputs

    customer_idstringrequired
    Metronome customer ID (a UUID). Get it from metronome_customers_list or metronome_customer_create. Example: 13117714-3f05-48e5-a6e9-a66093f13b4d
    access_typestring
    Filters commits by how their balances are drawn down. `SPEND` deducts the dollar cost of usage. `QUANTITY` deducts the number of units used. Example: SPENDone of SPENDQUANTITY
    commit_idstring
    Commit ID (a UUID). Get it from metronome_commits_list or metronome_balances_list. Example: 6162d87b-e5db-4a33-b7f2-76ce6ead4e85
    covering_datestring
    Include only commits that have access schedules that "cover" the provided date. Example: 2026-01-15T00:00:00.000Z
    effective_beforestring
    Include only commits that have any access before the provided date (exclusive) Example: 2026-02-01T00:00:00.000Z
    include_archivedboolean
    Include archived commits and commits from archived contracts. Example: false
    include_balanceboolean
    Include the balance in the response. Setting this flag may cause the query to be slower. Example: false
    include_contract_commitsboolean
    Include commits on the contract level. Example: false
    include_ledgersboolean
    Include commit ledgers in the response. Setting this flag may cause the query to be slower. Example: true
    limitinteger
    The maximum number of commits to return. Defaults to 25. Example: 25
    next_pagestring
    The next page token from a previous response. Example: 0c34b75b47491b73db66d46737d9a87
    starting_atstring
    Include only commits that have any access on or after the provided date. Example: 2026-01-01T00:00:00.000Z
  • metronome_contract_edit_history_getList every edit made to a contract since it was created, whether through the app, the edit endpoint or other update endpoints.Read-only

    Get Contract Edit History

    List every edit made to a contract since it was created, whether through the app, the edit endpoint or other update endpoints. Returns data (edits with id, timestamp, uniqueness_key and the added, updated and archived terms of each edit). Use this to audit how a contract changed. Use metronome_contract_get for the contract's current terms.

    Inputs

    contract_idstringrequired
    Metronome contract ID (a UUID). Get it from metronome_contracts_list. Example: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc
    customer_idstringrequired
    Metronome customer ID (a UUID). Get it from metronome_customers_list or metronome_customer_create. Example: 13117714-3f05-48e5-a6e9-a66093f13b4d
  • metronome_contract_getGet one contract with its full terms: rate card, commits, credits, overrides, discounts, scheduled charges, subscriptions and billing configuration, optionally as of a past date.Read-only

    Get Contract

    Get one contract with its full terms: rate card, commits, credits, overrides, discounts, scheduled charges, subscriptions and billing configuration, optionally as of a past date. Returns data with the contract (id, customer_id, name, rate_card_id, starting_at, ending_before, commits, credits, overrides, subscriptions and more). Use this when you have the customer and contract IDs. Use metronome_contracts_list to find them. Including ledgers or balances makes the call slower.

    Inputs

    contract_idstringrequired
    Metronome contract ID (a UUID). Get it from metronome_contracts_list. Example: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc
    customer_idstringrequired
    Metronome customer ID (a UUID). Get it from metronome_customers_list or metronome_customer_create. Example: 13117714-3f05-48e5-a6e9-a66093f13b4d
    as_of_datestring
    Optional RFC 3339 timestamp. Return the contract as of this date. Cannot be used with include_ledgers parameter. Example: 2026-01-15T00:00:00.000Z
    include_balanceboolean
    Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower. Example: false
    include_ledgersboolean
    Include commit/credit ledgers in the response. Setting this flag may cause the query to be slower. Cannot be used with as_of_date parameter. Example: false
    webhook_notification_idstring
    Indicates that this API request was triggered by a webhook notification with the provided ID. Example: d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc