@metronome/mcp 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -21
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/server.ts +1 -1
- package/src/tools/index.ts +6 -0
- package/src/tools/v1/contracts/amend-v1-contracts.ts +1 -1
- package/src/tools/v1/contracts/create-v1-contracts.ts +9 -6
- package/src/tools/v1/contracts/list-balances-v1-contracts.ts +4 -0
- package/src/tools/v1/credit-grants/create-v1-credit-grants.ts +1 -1
- package/src/tools/v1/credit-grants/edit-v1-credit-grants.ts +1 -1
- package/src/tools/v1/credit-grants/list-entries-v1-credit-grants.ts +1 -1
- package/src/tools/v1/credit-grants/list-v1-credit-grants.ts +1 -1
- package/src/tools/v1/credit-grants/void-v1-credit-grants.ts +1 -1
- package/src/tools/v1/customers/alerts/list-customers-v1-alerts.ts +1 -1
- package/src/tools/v1/customers/billing-config/create-customers-v1-billing-config.ts +5 -1
- package/src/tools/v1/customers/billing-config/delete-customers-v1-billing-config.ts +2 -1
- package/src/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.ts +2 -1
- package/src/tools/v1/customers/commits/create-customers-v1-commits.ts +2 -2
- package/src/tools/v1/customers/create-v1-customers.ts +3 -0
- package/src/tools/v1/customers/invoices/add-charge-customers-v1-invoices.ts +1 -1
- package/src/tools/v1/customers/list-costs-v1-customers.ts +1 -1
- package/src/tools/v1/customers/plans/add-customers-v1-plans.ts +1 -1
- package/src/tools/v1/customers/plans/end-customers-v1-plans.ts +1 -1
- package/src/tools/v1/customers/plans/list-customers-v1-plans.ts +1 -1
- package/src/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.ts +1 -1
- package/src/tools/v1/customers/preview-events-v1-customers.ts +5 -3
- package/src/tools/v1/customers/retrieve-billing-configurations-v1-customers.ts +1 -1
- package/src/tools/v1/customers/set-billing-configurations-v1-customers.ts +1 -0
- package/src/tools/v1/payments/attempt-v1-payments.ts +1 -1
- package/src/tools/v1/payments/cancel-v1-payments.ts +1 -1
- package/src/tools/v1/payments/list-v1-payments.ts +1 -1
- package/src/tools/v1/plans/get-details-v1-plans.ts +1 -1
- package/src/tools/v1/plans/list-charges-v1-plans.ts +1 -1
- package/src/tools/v1/plans/list-customers-v1-plans.ts +1 -1
- package/src/tools/v1/plans/list-v1-plans.ts +1 -1
- package/src/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.ts +60 -0
- package/src/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.ts +48 -0
- package/src/tools/v1/settings/upsert-avalara-credentials-v1-settings.ts +65 -0
- package/src/tools/v2/contracts/edit-v2-contracts.ts +6 -3
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +6 -0
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +6 -0
- package/tools/index.mjs.map +1 -1
- package/tools/v1/contracts/amend-v1-contracts.js +1 -1
- package/tools/v1/contracts/amend-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/amend-v1-contracts.mjs +1 -1
- package/tools/v1/contracts/amend-v1-contracts.mjs.map +1 -1
- package/tools/v1/contracts/create-v1-contracts.d.mts.map +1 -1
- package/tools/v1/contracts/create-v1-contracts.d.ts.map +1 -1
- package/tools/v1/contracts/create-v1-contracts.js +6 -6
- package/tools/v1/contracts/create-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/create-v1-contracts.mjs +6 -6
- package/tools/v1/contracts/create-v1-contracts.mjs.map +1 -1
- package/tools/v1/contracts/list-balances-v1-contracts.d.mts.map +1 -1
- package/tools/v1/contracts/list-balances-v1-contracts.d.ts.map +1 -1
- package/tools/v1/contracts/list-balances-v1-contracts.js +4 -0
- package/tools/v1/contracts/list-balances-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/list-balances-v1-contracts.mjs +4 -0
- package/tools/v1/contracts/list-balances-v1-contracts.mjs.map +1 -1
- package/tools/v1/credit-grants/create-v1-credit-grants.js +1 -1
- package/tools/v1/credit-grants/create-v1-credit-grants.js.map +1 -1
- package/tools/v1/credit-grants/create-v1-credit-grants.mjs +1 -1
- package/tools/v1/credit-grants/create-v1-credit-grants.mjs.map +1 -1
- package/tools/v1/credit-grants/edit-v1-credit-grants.js +1 -1
- package/tools/v1/credit-grants/edit-v1-credit-grants.js.map +1 -1
- package/tools/v1/credit-grants/edit-v1-credit-grants.mjs +1 -1
- package/tools/v1/credit-grants/edit-v1-credit-grants.mjs.map +1 -1
- package/tools/v1/credit-grants/list-entries-v1-credit-grants.js +1 -1
- package/tools/v1/credit-grants/list-entries-v1-credit-grants.js.map +1 -1
- package/tools/v1/credit-grants/list-entries-v1-credit-grants.mjs +1 -1
- package/tools/v1/credit-grants/list-entries-v1-credit-grants.mjs.map +1 -1
- package/tools/v1/credit-grants/list-v1-credit-grants.js +1 -1
- package/tools/v1/credit-grants/list-v1-credit-grants.js.map +1 -1
- package/tools/v1/credit-grants/list-v1-credit-grants.mjs +1 -1
- package/tools/v1/credit-grants/list-v1-credit-grants.mjs.map +1 -1
- package/tools/v1/credit-grants/void-v1-credit-grants.js +1 -1
- package/tools/v1/credit-grants/void-v1-credit-grants.js.map +1 -1
- package/tools/v1/credit-grants/void-v1-credit-grants.mjs +1 -1
- package/tools/v1/credit-grants/void-v1-credit-grants.mjs.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.js +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.js.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs.map +1 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.d.mts.map +1 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.d.ts.map +1 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.js +3 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.js.map +1 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.mjs +3 -1
- package/tools/v1/customers/billing-config/create-customers-v1-billing-config.mjs.map +1 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.d.mts.map +1 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.d.ts.map +1 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.js +2 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.js.map +1 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.mjs +2 -1
- package/tools/v1/customers/billing-config/delete-customers-v1-billing-config.mjs.map +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.d.mts.map +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.d.ts.map +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.js +2 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.js.map +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.mjs +2 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.mjs.map +1 -1
- package/tools/v1/customers/commits/create-customers-v1-commits.js +2 -2
- package/tools/v1/customers/commits/create-customers-v1-commits.js.map +1 -1
- package/tools/v1/customers/commits/create-customers-v1-commits.mjs +2 -2
- package/tools/v1/customers/commits/create-customers-v1-commits.mjs.map +1 -1
- package/tools/v1/customers/create-v1-customers.d.mts.map +1 -1
- package/tools/v1/customers/create-v1-customers.d.ts.map +1 -1
- package/tools/v1/customers/create-v1-customers.js +2 -0
- package/tools/v1/customers/create-v1-customers.js.map +1 -1
- package/tools/v1/customers/create-v1-customers.mjs +2 -0
- package/tools/v1/customers/create-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.js +1 -1
- package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.js.map +1 -1
- package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.mjs +1 -1
- package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.mjs.map +1 -1
- package/tools/v1/customers/list-costs-v1-customers.js +1 -1
- package/tools/v1/customers/list-costs-v1-customers.js.map +1 -1
- package/tools/v1/customers/list-costs-v1-customers.mjs +1 -1
- package/tools/v1/customers/list-costs-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/plans/add-customers-v1-plans.js +1 -1
- package/tools/v1/customers/plans/add-customers-v1-plans.js.map +1 -1
- package/tools/v1/customers/plans/add-customers-v1-plans.mjs +1 -1
- package/tools/v1/customers/plans/add-customers-v1-plans.mjs.map +1 -1
- package/tools/v1/customers/plans/end-customers-v1-plans.js +1 -1
- package/tools/v1/customers/plans/end-customers-v1-plans.js.map +1 -1
- package/tools/v1/customers/plans/end-customers-v1-plans.mjs +1 -1
- package/tools/v1/customers/plans/end-customers-v1-plans.mjs.map +1 -1
- package/tools/v1/customers/plans/list-customers-v1-plans.js +1 -1
- package/tools/v1/customers/plans/list-customers-v1-plans.js.map +1 -1
- package/tools/v1/customers/plans/list-customers-v1-plans.mjs +1 -1
- package/tools/v1/customers/plans/list-customers-v1-plans.mjs.map +1 -1
- package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.js +1 -1
- package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.js.map +1 -1
- package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.mjs +1 -1
- package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.mjs.map +1 -1
- package/tools/v1/customers/preview-events-v1-customers.d.mts.map +1 -1
- package/tools/v1/customers/preview-events-v1-customers.d.ts.map +1 -1
- package/tools/v1/customers/preview-events-v1-customers.js +4 -3
- package/tools/v1/customers/preview-events-v1-customers.js.map +1 -1
- package/tools/v1/customers/preview-events-v1-customers.mjs +4 -3
- package/tools/v1/customers/preview-events-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/retrieve-billing-configurations-v1-customers.js +1 -1
- package/tools/v1/customers/retrieve-billing-configurations-v1-customers.js.map +1 -1
- package/tools/v1/customers/retrieve-billing-configurations-v1-customers.mjs +1 -1
- package/tools/v1/customers/retrieve-billing-configurations-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.d.mts.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.d.ts.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.js +1 -0
- package/tools/v1/customers/set-billing-configurations-v1-customers.js.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.mjs +1 -0
- package/tools/v1/customers/set-billing-configurations-v1-customers.mjs.map +1 -1
- package/tools/v1/payments/attempt-v1-payments.js +1 -1
- package/tools/v1/payments/attempt-v1-payments.js.map +1 -1
- package/tools/v1/payments/attempt-v1-payments.mjs +1 -1
- package/tools/v1/payments/attempt-v1-payments.mjs.map +1 -1
- package/tools/v1/payments/cancel-v1-payments.js +1 -1
- package/tools/v1/payments/cancel-v1-payments.js.map +1 -1
- package/tools/v1/payments/cancel-v1-payments.mjs +1 -1
- package/tools/v1/payments/cancel-v1-payments.mjs.map +1 -1
- package/tools/v1/payments/list-v1-payments.js +1 -1
- package/tools/v1/payments/list-v1-payments.js.map +1 -1
- package/tools/v1/payments/list-v1-payments.mjs +1 -1
- package/tools/v1/payments/list-v1-payments.mjs.map +1 -1
- package/tools/v1/plans/get-details-v1-plans.js +1 -1
- package/tools/v1/plans/get-details-v1-plans.js.map +1 -1
- package/tools/v1/plans/get-details-v1-plans.mjs +1 -1
- package/tools/v1/plans/get-details-v1-plans.mjs.map +1 -1
- package/tools/v1/plans/list-charges-v1-plans.js +1 -1
- package/tools/v1/plans/list-charges-v1-plans.js.map +1 -1
- package/tools/v1/plans/list-charges-v1-plans.mjs +1 -1
- package/tools/v1/plans/list-charges-v1-plans.mjs.map +1 -1
- package/tools/v1/plans/list-customers-v1-plans.js +1 -1
- package/tools/v1/plans/list-customers-v1-plans.js.map +1 -1
- package/tools/v1/plans/list-customers-v1-plans.mjs +1 -1
- package/tools/v1/plans/list-customers-v1-plans.mjs.map +1 -1
- package/tools/v1/plans/list-v1-plans.js +1 -1
- package/tools/v1/plans/list-v1-plans.js.map +1 -1
- package/tools/v1/plans/list-v1-plans.mjs +1 -1
- package/tools/v1/plans/list-v1-plans.mjs.map +1 -1
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.d.mts +45 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.d.mts.map +1 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.d.ts +45 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.d.ts.map +1 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.js +52 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.js.map +1 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.mjs +48 -0
- package/tools/v1/settings/billing-providers/create-settings-v1-billing-providers.mjs.map +1 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.d.mts +45 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.d.mts.map +1 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.d.ts +45 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.d.ts.map +1 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.js +41 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.js.map +1 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.mjs +37 -0
- package/tools/v1/settings/billing-providers/list-settings-v1-billing-providers.mjs.map +1 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.d.mts +45 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.d.mts.map +1 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.d.ts +45 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.d.ts.map +1 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.js +57 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.js.map +1 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.mjs +53 -0
- package/tools/v1/settings/upsert-avalara-credentials-v1-settings.mjs.map +1 -0
- package/tools/v2/contracts/edit-v2-contracts.d.mts.map +1 -1
- package/tools/v2/contracts/edit-v2-contracts.d.ts.map +1 -1
- package/tools/v2/contracts/edit-v2-contracts.js +4 -3
- package/tools/v2/contracts/edit-v2-contracts.js.map +1 -1
- package/tools/v2/contracts/edit-v2-contracts.mjs +4 -3
- package/tools/v2/contracts/edit-v2-contracts.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -333,18 +333,18 @@ The following tools are available in this MCP server.
|
|
|
333
333
|
|
|
334
334
|
### Resource `v1.plans`:
|
|
335
335
|
|
|
336
|
-
- `list_v1_plans` (`read`): List all available plans.
|
|
337
|
-
- `get_details_v1_plans` (`read`): Fetch high level details of a specific plan.
|
|
338
|
-
- `list_charges_v1_plans` (`read`): Fetches a list of charges of a specific plan.
|
|
339
|
-
- `list_customers_v1_plans` (`read`): Fetches a list of customers on a specific plan (by default, only currently active plans are included)
|
|
336
|
+
- `list_v1_plans` (`read`): List all available plans. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
337
|
+
- `get_details_v1_plans` (`read`): Fetch high level details of a specific plan. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
338
|
+
- `list_charges_v1_plans` (`read`): Fetches a list of charges of a specific plan. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
339
|
+
- `list_customers_v1_plans` (`read`): Fetches a list of customers on a specific plan (by default, only currently active plans are included). This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
340
340
|
|
|
341
341
|
### Resource `v1.credit_grants`:
|
|
342
342
|
|
|
343
|
-
- `create_v1_credit_grants` (`write`): Create a new credit grant
|
|
344
|
-
- `list_v1_credit_grants` (`write`): List credit grants. This list does not included voided grants.
|
|
345
|
-
- `edit_v1_credit_grants` (`write`): Edit an existing credit grant
|
|
346
|
-
- `list_entries_v1_credit_grants` (`write`): Fetches a list of credit ledger entries. Returns lists of ledgers per customer. Ledger entries are returned in chronological order. Ledger entries associated with voided credit grants are not included.
|
|
347
|
-
- `void_v1_credit_grants` (`write`): Void a credit grant
|
|
343
|
+
- `create_v1_credit_grants` (`write`): Create a new credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
344
|
+
- `list_v1_credit_grants` (`write`): List credit grants. This list does not included voided grants. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
345
|
+
- `edit_v1_credit_grants` (`write`): Edit an existing credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
346
|
+
- `list_entries_v1_credit_grants` (`write`): Fetches a list of credit ledger entries. Returns lists of ledgers per customer. Ledger entries are returned in chronological order. Ledger entries associated with voided credit grants are not included. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
347
|
+
- `void_v1_credit_grants` (`write`): Void a credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
348
348
|
|
|
349
349
|
### Resource `v1.pricing_units`:
|
|
350
350
|
|
|
@@ -389,8 +389,8 @@ The following tools are available in this MCP server.
|
|
|
389
389
|
- Any notifications associated with the customer will no longer be triggered.
|
|
390
390
|
|
|
391
391
|
- `list_billable_metrics_v1_customers` (`read`): Get all billable metrics available for a specific customer. Supports pagination and filtering by current plan status or archived metrics. Use this endpoint to see which metrics are being tracked for billing calculations for a given customer.
|
|
392
|
-
- `list_costs_v1_customers` (`read`): Fetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric.
|
|
393
|
-
- `preview_events_v1_customers` (`write`): Preview how a set of events will affect a customer's invoices. Generates draft invoices for a customer using their current contract configuration and the provided events. This is useful for testing how new events will affect the customer's invoices before they are actually processed.
|
|
392
|
+
- `list_costs_v1_customers` (`read`): Fetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
393
|
+
- `preview_events_v1_customers` (`write`): Preview how a set of events will affect a customer's invoices. Generates draft invoices for a customer using their current contract configuration and the provided events. This is useful for testing how new events will affect the customer's invoices before they are actually processed. Customers on contracts with SQL billable metrics are not supported.
|
|
394
394
|
- `retrieve_billing_configurations_v1_customers` (`write`): Returns all billing configurations previously set for the customer. Use during the contract provisioning process to fetch the `billing_provider_configuration_id` needed to set the contract billing configuration.
|
|
395
395
|
- `set_billing_configurations_v1_customers` (`write`): Create a billing configuration for a customer. Once created, these configurations are available to associate to a contract and dictates which downstream system to collect payment in or send the invoice to. You can create multiple configurations per customer. The configuration formats are distinct for each downstream provider.
|
|
396
396
|
|
|
@@ -514,10 +514,10 @@ The following tools are available in this MCP server.
|
|
|
514
514
|
|
|
515
515
|
### Resource `v1.customers.plans`:
|
|
516
516
|
|
|
517
|
-
- `list_customers_v1_plans` (`read`): List the given customer's plans in reverse-chronological order.
|
|
518
|
-
- `add_customers_v1_plans` (`write`): Associate an existing customer with a plan for a specified date range. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details on the price adjustments.
|
|
519
|
-
- `end_customers_v1_plans` (`write`): Change the end date of a customer's plan.
|
|
520
|
-
- `list_price_adjustments_customers_v1_plans` (`read`): Lists a customer plans adjustments. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details.
|
|
517
|
+
- `list_customers_v1_plans` (`read`): List the given customer's plans in reverse-chronological order. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
518
|
+
- `add_customers_v1_plans` (`write`): Associate an existing customer with a plan for a specified date range. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details on the price adjustments. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
519
|
+
- `end_customers_v1_plans` (`write`): Change the end date of a customer's plan. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
520
|
+
- `list_price_adjustments_customers_v1_plans` (`read`): Lists a customer plans adjustments. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
521
521
|
|
|
522
522
|
### Resource `v1.customers.invoices`:
|
|
523
523
|
|
|
@@ -586,7 +586,7 @@ The following tools are available in this MCP server.
|
|
|
586
586
|
External billing provider statuses (like Stripe payment status) are included when applicable
|
|
587
587
|
- Voided invoices are included in results by default unless filtered out by status
|
|
588
588
|
|
|
589
|
-
- `add_charge_customers_v1_invoices` (`write`): Add a one time charge to the specified invoice
|
|
589
|
+
- `add_charge_customers_v1_invoices` (`write`): Add a one time charge to the specified invoice. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
590
590
|
- `list_breakdowns_customers_v1_invoices` (`read`): Retrieve granular time-series breakdowns of invoice data at hourly or daily intervals. This endpoint transforms standard invoices into detailed timelines, enabling you to track usage patterns, identify consumption spikes, and provide customers with transparency into their billing details throughout the billing period.
|
|
591
591
|
|
|
592
592
|
### Use this endpoint to:
|
|
@@ -638,9 +638,10 @@ The following tools are available in this MCP server.
|
|
|
638
638
|
|
|
639
639
|
### Resource `v1.customers.billing_config`:
|
|
640
640
|
|
|
641
|
-
- `create_customers_v1_billing_config` (`write`): Set the billing configuration for a given customer.
|
|
642
|
-
- `retrieve_customers_v1_billing_config` (`read`): Fetch the billing configuration for the given customer.
|
|
643
|
-
- `delete_customers_v1_billing_config` (`write`): Delete the billing configuration for a given customer.
|
|
641
|
+
- `create_customers_v1_billing_config` (`write`): Set the billing configuration for a given customer. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
642
|
+
- `retrieve_customers_v1_billing_config` (`read`): Fetch the billing configuration for the given customer. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
643
|
+
- `delete_customers_v1_billing_config` (`write`): Delete the billing configuration for a given customer.
|
|
644
|
+
Note: this is unsupported for Azure and AWS Marketplace customers. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.
|
|
644
645
|
|
|
645
646
|
### Resource `v1.customers.commits`:
|
|
646
647
|
|
|
@@ -664,7 +665,7 @@ The following tools are available in this MCP server.
|
|
|
664
665
|
|
|
665
666
|
#### Billing configuration:
|
|
666
667
|
|
|
667
|
-
- invoice_contract_id is required for postpaid commits and for prepaid commits with billing (only optional for free prepaid commits)
|
|
668
|
+
- invoice_contract_id is required for postpaid commits and for prepaid commits with billing (only optional for free prepaid commits) unless do_not_invoice is set to true
|
|
668
669
|
- For postpaid commits: access_schedule and invoice_schedule must have matching amounts
|
|
669
670
|
- For postpaid commits: only one schedule item is allowed in both schedules.
|
|
670
671
|
|
|
@@ -1187,7 +1188,7 @@ The following tools are available in this MCP server.
|
|
|
1187
1188
|
|
|
1188
1189
|
Manual ledger entries can be extremely useful for resolving discrepancies in Metronome. However, most corrections to inaccurate billings can be modified upstream of the commit, whether that is via contract editing, rate editing, or other actions that cause an invoice to be recalculated.
|
|
1189
1190
|
|
|
1190
|
-
- `amend_v1_contracts` (`write`): Amendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](
|
|
1191
|
+
- `amend_v1_contracts` (`write`): Amendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.
|
|
1191
1192
|
- `archive_v1_contracts` (`write`): Permanently end and archive a contract along with all its terms. Any draft invoices will be canceled, and all upcoming scheduled invoices will be voided–also all finalized invoices can optionally be voided. Use this in the event a contract was incorrectly created and needed to be removed from a customer.
|
|
1192
1193
|
|
|
1193
1194
|
#### Impact on commits and credits:
|
|
@@ -1362,3 +1363,12 @@ The following tools are available in this MCP server.
|
|
|
1362
1363
|
Attempting to payment on an ineligible Invoice or Customer will result in a `400` response.
|
|
1363
1364
|
|
|
1364
1365
|
- `cancel_v1_payments` (`write`): Cancel an existing payment attempt for an invoice.
|
|
1366
|
+
|
|
1367
|
+
### Resource `v1.settings`:
|
|
1368
|
+
|
|
1369
|
+
- `upsert_avalara_credentials_v1_settings` (`write`): Set the Avalara credentials for some specified `delivery_method_ids`, which can be found in the `/listConfiguredBillingProviders` response. This maps the Avalara credentials to the appropriate billing entity. These credentials are only used for PLG Invoicing today.
|
|
1370
|
+
|
|
1371
|
+
### Resource `v1.settings.billing_providers`:
|
|
1372
|
+
|
|
1373
|
+
- `create_settings_v1_billing_providers` (`write`): Set up account-level configuration for a billing provider. Once configured, individual contracts across customers can be mapped to this configuration using the returned delivery_method_id.
|
|
1374
|
+
- `list_settings_v1_billing_providers` (`write`): Lists all configured billing providers and their delivery method configurations for your account. Returns provider details, delivery method IDs, and configuration settings needed for mapping individual customer contracts to billing integrations.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metronome/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The official MCP Server for the Metronome API",
|
|
5
5
|
"author": "Metronome <dev-feedback@metronome.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"fix": "eslint --fix --ext ts,js ."
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@metronome/sdk": "^2.
|
|
30
|
+
"@metronome/sdk": "^2.1.0",
|
|
31
31
|
"@cloudflare/cabidela": "^0.2.4",
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.11.5",
|
|
33
33
|
"@valtown/deno-http-worker": "^0.0.21",
|
package/server.js
CHANGED
|
@@ -22,7 +22,7 @@ var tools_2 = require("./tools.js");
|
|
|
22
22
|
Object.defineProperty(exports, "endpoints", { enumerable: true, get: function () { return tools_2.endpoints; } });
|
|
23
23
|
const newMcpServer = () => new mcp_js_1.McpServer({
|
|
24
24
|
name: 'metronome_sdk_api',
|
|
25
|
-
version: '2.
|
|
25
|
+
version: '2.1.0',
|
|
26
26
|
}, { capabilities: { tools: {}, logging: {} } });
|
|
27
27
|
exports.newMcpServer = newMcpServer;
|
|
28
28
|
// Create server instance
|
package/server.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export { ClientType } from "./compat.mjs";
|
|
|
11
11
|
export { endpoints } from "./tools.mjs";
|
|
12
12
|
export const newMcpServer = () => new McpServer({
|
|
13
13
|
name: 'metronome_sdk_api',
|
|
14
|
-
version: '2.
|
|
14
|
+
version: '2.1.0',
|
|
15
15
|
}, { capabilities: { tools: {}, logging: {} } });
|
|
16
16
|
// Create server instance
|
|
17
17
|
export const server = newMcpServer();
|
package/src/server.ts
CHANGED
package/src/tools/index.ts
CHANGED
|
@@ -111,6 +111,9 @@ import update_contracts_v1_named_schedules from './v1/contracts/named-schedules/
|
|
|
111
111
|
import list_v1_payments from './v1/payments/list-v1-payments';
|
|
112
112
|
import attempt_v1_payments from './v1/payments/attempt-v1-payments';
|
|
113
113
|
import cancel_v1_payments from './v1/payments/cancel-v1-payments';
|
|
114
|
+
import upsert_avalara_credentials_v1_settings from './v1/settings/upsert-avalara-credentials-v1-settings';
|
|
115
|
+
import create_settings_v1_billing_providers from './v1/settings/billing-providers/create-settings-v1-billing-providers';
|
|
116
|
+
import list_settings_v1_billing_providers from './v1/settings/billing-providers/list-settings-v1-billing-providers';
|
|
114
117
|
|
|
115
118
|
export const endpoints: Endpoint[] = [];
|
|
116
119
|
|
|
@@ -225,6 +228,9 @@ addEndpoint(update_contracts_v1_named_schedules);
|
|
|
225
228
|
addEndpoint(list_v1_payments);
|
|
226
229
|
addEndpoint(attempt_v1_payments);
|
|
227
230
|
addEndpoint(cancel_v1_payments);
|
|
231
|
+
addEndpoint(upsert_avalara_credentials_v1_settings);
|
|
232
|
+
addEndpoint(create_settings_v1_billing_providers);
|
|
233
|
+
addEndpoint(list_settings_v1_billing_providers);
|
|
228
234
|
|
|
229
235
|
export type Filter = {
|
|
230
236
|
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'amend_v1_contracts',
|
|
19
19
|
description:
|
|
20
|
-
'Amendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](
|
|
20
|
+
'Amendments will be replaced by Contract editing. New clients should implement using the `editContract` endpoint. Read more about the migration to contract editing [here](/guides/implement-metronome/migrate-amendments-to-edits/) and reach out to your Metronome representative for more details. Once contract editing is enabled, access to this endpoint will be removed.\n',
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -554,20 +554,21 @@ export const tool: Tool = {
|
|
|
554
554
|
invoice_consolidation_type: {
|
|
555
555
|
type: 'string',
|
|
556
556
|
description:
|
|
557
|
-
'Indicates the desired behavior of consolidated invoices generated by the parent in a customer hierarchy\n**CONCATENATE**: Statements on the invoices of child customers will be appended to the consolidated invoice\n**NONE**: Do not generate consolidated invoices',
|
|
557
|
+
'Account hierarchy M3 - Indicates the desired behavior of consolidated invoices generated by the parent in a customer hierarchy\n\n**CONCATENATE**: Statements on the invoices of child customers will be appended to the consolidated invoice\n\n**NONE**: Do not generate consolidated invoices',
|
|
558
558
|
enum: ['CONCATENATE', 'NONE'],
|
|
559
559
|
},
|
|
560
560
|
},
|
|
561
561
|
},
|
|
562
562
|
payer: {
|
|
563
563
|
type: 'string',
|
|
564
|
-
description:
|
|
564
|
+
description:
|
|
565
|
+
"Account hierarchy M3 - Indicates which customer should pay for the child's invoice charges\n\n**SELF**: The child pays for its own invoice charges\n\n**PARENT**: The parent pays for the child's invoice charges",
|
|
565
566
|
enum: ['SELF', 'PARENT'],
|
|
566
567
|
},
|
|
567
568
|
usage_statement_behavior: {
|
|
568
569
|
type: 'string',
|
|
569
570
|
description:
|
|
570
|
-
"Indicates the behavior of the child's invoice statements on the parent's invoices\n**CONSOLIDATE**: Child's invoice statements will be added to parent's consolidated invoices\n**SEPARATE**: Child's invoice statements will appear not appear on parent's consolidated invoices",
|
|
571
|
+
"Account hierarchy M3 - Indicates the behavior of the child's invoice statements on the parent's invoices.\n\n**CONSOLIDATE**: Child's invoice statements will be added to parent's consolidated invoices\n\n**SEPARATE**: Child's invoice statements will appear not appear on parent's consolidated invoices",
|
|
571
572
|
enum: ['CONSOLIDATE', 'SEPARATE'],
|
|
572
573
|
},
|
|
573
574
|
},
|
|
@@ -971,7 +972,8 @@ export const tool: Tool = {
|
|
|
971
972
|
},
|
|
972
973
|
allocation: {
|
|
973
974
|
type: 'string',
|
|
974
|
-
description:
|
|
975
|
+
description:
|
|
976
|
+
'If set to POOLED, allocation added per seat is pooled across the account. (BETA) If set to INDIVIDUAL, each seat in the subscription will have its own allocation.',
|
|
975
977
|
enum: ['INDIVIDUAL', 'POOLED'],
|
|
976
978
|
},
|
|
977
979
|
},
|
|
@@ -1120,7 +1122,8 @@ export const tool: Tool = {
|
|
|
1120
1122
|
},
|
|
1121
1123
|
allocation: {
|
|
1122
1124
|
type: 'string',
|
|
1123
|
-
description:
|
|
1125
|
+
description:
|
|
1126
|
+
'If set to POOLED, allocation added per seat is pooled across the account. (BETA) If set to INDIVIDUAL, each seat in the subscription will have its own allocation.',
|
|
1124
1127
|
enum: ['INDIVIDUAL', 'POOLED'],
|
|
1125
1128
|
},
|
|
1126
1129
|
},
|
|
@@ -1396,7 +1399,7 @@ export const tool: Tool = {
|
|
|
1396
1399
|
quantity_management_mode: {
|
|
1397
1400
|
type: 'string',
|
|
1398
1401
|
description:
|
|
1399
|
-
"Determines how the subscription's quantity is controlled. Defaults to QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified directly on the subscription. `initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation.",
|
|
1402
|
+
"Determines how the subscription's quantity is controlled. Defaults to QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified directly on the subscription. `initial_quantity` must be provided with this option. Compatible with recurring commits/credits that use POOLED allocation. **SEAT_BASED**: (BETA) Use when you want to pass specific seat identifiers (e.g. add user_123) to increment and decrement a subscription quantity, rather than directly providing the quantity. You must use a **SEAT_BASED** subscription to use a linked recurring credit with an allocation per seat. `seat_config` must be provided with this option.",
|
|
1400
1403
|
enum: ['SEAT_BASED', 'QUANTITY_ONLY'],
|
|
1401
1404
|
},
|
|
1402
1405
|
starting_at: {
|
|
@@ -37,6 +37,10 @@ export const tool: Tool = {
|
|
|
37
37
|
description: 'Include only balances that have any access before the provided date (exclusive)',
|
|
38
38
|
format: 'date-time',
|
|
39
39
|
},
|
|
40
|
+
exclude_zero_balances: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'Exclude balances with zero amounts from the response.',
|
|
43
|
+
},
|
|
40
44
|
include_archived: {
|
|
41
45
|
type: 'boolean',
|
|
42
46
|
description: 'Include archived credits and credits from archived contracts.',
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'create_v1_credit_grants',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new credit grant\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_create_response',\n $defs: {\n credit_grant_create_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate a new credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_create_response',\n $defs: {\n credit_grant_create_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'edit_v1_credit_grants',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEdit an existing credit grant\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_edit_response',\n $defs: {\n credit_grant_edit_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nEdit an existing credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_edit_response',\n $defs: {\n credit_grant_edit_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'list_entries_v1_credit_grants',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetches a list of credit ledger entries. Returns lists of ledgers per customer. Ledger entries are returned in chronological order. Ledger entries associated with voided credit grants are not included.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_grant_list_entries_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n credit_grant_list_entries_response: {\n type: 'object',\n properties: {\n customer_id: {\n type: 'string'\n },\n ledgers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n ending_balance: {\n type: 'object',\n description: 'the effective balances at the end of the specified time window',\n properties: {\n effective_at: {\n type: 'string',\n description: 'the ending_before request parameter (if supplied) or the current billing period\\'s end date',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'the ending balance, including the balance of all grants that have not expired before the effective_at date and deductions that happened before the effective_at date'\n },\n including_pending: {\n type: 'number',\n description: 'the excluding_pending balance plus any pending invoice deductions and expirations that will happen by the effective_at date'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n },\n entries: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n pending_entries: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n starting_balance: {\n type: 'object',\n properties: {\n effective_at: {\n type: 'string',\n description: 'the starting_on request parameter (if supplied) or the first credit grant\\'s effective_at date',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'the starting balance, including all posted grants, deductions, and expirations that happened at or before the effective_at timestamp'\n },\n including_pending: {\n type: 'number',\n description: 'the excluding_pending balance plus any pending activity that has not been posted at the time of the query'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n }\n },\n required: [ 'credit_type',\n 'ending_balance',\n 'entries',\n 'pending_entries',\n 'starting_balance'\n ]\n }\n }\n },\n required: [ 'customer_id',\n 'ledgers'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n },\n credit_ledger_entry: {\n type: 'object',\n properties: {\n amount: {\n type: 'number',\n description: 'an amount representing the change to the customer\\'s credit balance'\n },\n created_by: {\n type: 'string'\n },\n credit_grant_id: {\n type: 'string',\n description: 'the credit grant this entry is related to'\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n reason: {\n type: 'string'\n },\n running_balance: {\n type: 'number',\n description: 'the running balance for this credit type at the time of the ledger entry, including all preceding charges'\n },\n invoice_id: {\n type: 'string',\n description: 'if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant\\'s paid_amount was charged'\n }\n },\n required: [ 'amount',\n 'created_by',\n 'credit_grant_id',\n 'effective_at',\n 'reason',\n 'running_balance'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetches a list of credit ledger entries. Returns lists of ledgers per customer. Ledger entries are returned in chronological order. Ledger entries associated with voided credit grants are not included. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_grant_list_entries_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n credit_grant_list_entries_response: {\n type: 'object',\n properties: {\n customer_id: {\n type: 'string'\n },\n ledgers: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n ending_balance: {\n type: 'object',\n description: 'the effective balances at the end of the specified time window',\n properties: {\n effective_at: {\n type: 'string',\n description: 'the ending_before request parameter (if supplied) or the current billing period\\'s end date',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'the ending balance, including the balance of all grants that have not expired before the effective_at date and deductions that happened before the effective_at date'\n },\n including_pending: {\n type: 'number',\n description: 'the excluding_pending balance plus any pending invoice deductions and expirations that will happen by the effective_at date'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n },\n entries: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n pending_entries: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n starting_balance: {\n type: 'object',\n properties: {\n effective_at: {\n type: 'string',\n description: 'the starting_on request parameter (if supplied) or the first credit grant\\'s effective_at date',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'the starting balance, including all posted grants, deductions, and expirations that happened at or before the effective_at timestamp'\n },\n including_pending: {\n type: 'number',\n description: 'the excluding_pending balance plus any pending activity that has not been posted at the time of the query'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n }\n },\n required: [ 'credit_type',\n 'ending_balance',\n 'entries',\n 'pending_entries',\n 'starting_balance'\n ]\n }\n }\n },\n required: [ 'customer_id',\n 'ledgers'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n },\n credit_ledger_entry: {\n type: 'object',\n properties: {\n amount: {\n type: 'number',\n description: 'an amount representing the change to the customer\\'s credit balance'\n },\n created_by: {\n type: 'string'\n },\n credit_grant_id: {\n type: 'string',\n description: 'the credit grant this entry is related to'\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n reason: {\n type: 'string'\n },\n running_balance: {\n type: 'number',\n description: 'the running balance for this credit type at the time of the ledger entry, including all preceding charges'\n },\n invoice_id: {\n type: 'string',\n description: 'if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant\\'s paid_amount was charged'\n }\n },\n required: [ 'amount',\n 'created_by',\n 'credit_grant_id',\n 'effective_at',\n 'reason',\n 'running_balance'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'list_v1_credit_grants',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList credit grants. This list does not included voided grants.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_grant_list_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n credit_grant_list_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the credit grant'\n },\n balance: {\n type: 'object',\n description: 'The effective balance of the grant as of the end of the customer\\'s current billing period. Expiration deductions will be included only if the grant expires before the end of the current billing period.',\n properties: {\n effective_at: {\n type: 'string',\n description: 'The end_date of the customer\\'s current billing period.',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'The grant\\'s current balance including all posted deductions. If the grant has expired, this amount will be 0.'\n },\n including_pending: {\n type: 'number',\n description: 'The grant\\'s current balance including all posted and pending deductions. If the grant expires before the end of the customer\\'s current billing period, this amount will be 0.'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n customer_id: {\n type: 'string',\n description: 'the Metronome ID of the customer'\n },\n deductions: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n expires_at: {\n type: 'string',\n format: 'date-time'\n },\n grant_amount: {\n type: 'object',\n description: 'the amount of credits initially granted',\n properties: {\n amount: {\n type: 'number'\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n }\n },\n required: [ 'amount',\n 'credit_type'\n ]\n },\n name: {\n type: 'string'\n },\n paid_amount: {\n type: 'object',\n description: 'the amount paid for this credit grant',\n properties: {\n amount: {\n type: 'number'\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n }\n },\n required: [ 'amount',\n 'credit_type'\n ]\n },\n pending_deductions: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n priority: {\n type: 'number'\n },\n credit_grant_type: {\n type: 'string'\n },\n invoice_id: {\n type: 'string',\n description: 'the Metronome ID of the invoice with the purchase charge for this credit grant, if applicable'\n },\n products: {\n type: 'array',\n description: 'The products which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.)',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n },\n reason: {\n type: 'string'\n },\n uniqueness_key: {\n type: 'string',\n description: 'Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.'\n }\n },\n required: [ 'id',\n 'balance',\n 'custom_fields',\n 'customer_id',\n 'deductions',\n 'effective_at',\n 'expires_at',\n 'grant_amount',\n 'name',\n 'paid_amount',\n 'pending_deductions',\n 'priority'\n ]\n },\n credit_ledger_entry: {\n type: 'object',\n properties: {\n amount: {\n type: 'number',\n description: 'an amount representing the change to the customer\\'s credit balance'\n },\n created_by: {\n type: 'string'\n },\n credit_grant_id: {\n type: 'string',\n description: 'the credit grant this entry is related to'\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n reason: {\n type: 'string'\n },\n running_balance: {\n type: 'number',\n description: 'the running balance for this credit type at the time of the ledger entry, including all preceding charges'\n },\n invoice_id: {\n type: 'string',\n description: 'if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant\\'s paid_amount was charged'\n }\n },\n required: [ 'amount',\n 'created_by',\n 'credit_grant_id',\n 'effective_at',\n 'reason',\n 'running_balance'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nList credit grants. This list does not included voided grants. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_grant_list_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n credit_grant_list_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the credit grant'\n },\n balance: {\n type: 'object',\n description: 'The effective balance of the grant as of the end of the customer\\'s current billing period. Expiration deductions will be included only if the grant expires before the end of the current billing period.',\n properties: {\n effective_at: {\n type: 'string',\n description: 'The end_date of the customer\\'s current billing period.',\n format: 'date-time'\n },\n excluding_pending: {\n type: 'number',\n description: 'The grant\\'s current balance including all posted deductions. If the grant has expired, this amount will be 0.'\n },\n including_pending: {\n type: 'number',\n description: 'The grant\\'s current balance including all posted and pending deductions. If the grant expires before the end of the customer\\'s current billing period, this amount will be 0.'\n }\n },\n required: [ 'effective_at',\n 'excluding_pending',\n 'including_pending'\n ]\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n customer_id: {\n type: 'string',\n description: 'the Metronome ID of the customer'\n },\n deductions: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n expires_at: {\n type: 'string',\n format: 'date-time'\n },\n grant_amount: {\n type: 'object',\n description: 'the amount of credits initially granted',\n properties: {\n amount: {\n type: 'number'\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n }\n },\n required: [ 'amount',\n 'credit_type'\n ]\n },\n name: {\n type: 'string'\n },\n paid_amount: {\n type: 'object',\n description: 'the amount paid for this credit grant',\n properties: {\n amount: {\n type: 'number'\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n }\n },\n required: [ 'amount',\n 'credit_type'\n ]\n },\n pending_deductions: {\n type: 'array',\n items: {\n $ref: '#/$defs/credit_ledger_entry'\n }\n },\n priority: {\n type: 'number'\n },\n credit_grant_type: {\n type: 'string'\n },\n invoice_id: {\n type: 'string',\n description: 'the Metronome ID of the invoice with the purchase charge for this credit grant, if applicable'\n },\n products: {\n type: 'array',\n description: 'The products which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.)',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n },\n reason: {\n type: 'string'\n },\n uniqueness_key: {\n type: 'string',\n description: 'Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.'\n }\n },\n required: [ 'id',\n 'balance',\n 'custom_fields',\n 'customer_id',\n 'deductions',\n 'effective_at',\n 'expires_at',\n 'grant_amount',\n 'name',\n 'paid_amount',\n 'pending_deductions',\n 'priority'\n ]\n },\n credit_ledger_entry: {\n type: 'object',\n properties: {\n amount: {\n type: 'number',\n description: 'an amount representing the change to the customer\\'s credit balance'\n },\n created_by: {\n type: 'string'\n },\n credit_grant_id: {\n type: 'string',\n description: 'the credit grant this entry is related to'\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n },\n reason: {\n type: 'string'\n },\n running_balance: {\n type: 'number',\n description: 'the running balance for this credit type at the time of the ledger entry, including all preceding charges'\n },\n invoice_id: {\n type: 'string',\n description: 'if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant\\'s paid_amount was charged'\n }\n },\n required: [ 'amount',\n 'created_by',\n 'credit_grant_id',\n 'effective_at',\n 'reason',\n 'running_balance'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'void_v1_credit_grants',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nVoid a credit grant\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_void_response',\n $defs: {\n credit_grant_void_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nVoid a credit grant. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/credit_grant_void_response',\n $defs: {\n credit_grant_void_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'list_customers_v1_alerts',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve all threshold notification configurations and their current statuses for a specific customer in a single API call. This endpoint provides a comprehensive view of all threshold notification monitoring a customer account.\n\n### Use this endpoint to:\n- Display all active threshold notifications for a customer in dashboards or admin panels\n- Quickly identify which threshold notifications a customer is currently triggering\n- Audit threshold notification coverage for specific accounts\n- Filter threshold notifications by status (enabled, disabled, or archived)\n\n### Key response fields:\n- data: Array of CustomerAlert objects, each containing:\n - Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)\n - Complete threshold notification configuration and threshold details\n - Threshold notification metadata including type, name, and last update time\n- next_page: Pagination cursor for retrieving additional results\n\n### Usage guidelines:\n- Default behavior: Returns only enabled threshold notifications unless `alert_statuses` filter is specified\n- Pagination: Use the `next_page` cursor to retrieve all results for customers with many notifications\n- Performance: Efficiently retrieves multiple threshold notification statuses in a single request instead of making individual calls\n- Filtering: Pass the `alert_statuses` array to include disabled or archived threshold notifications in results\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_alert'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n customer_alert: {\n type: 'object',\n properties: {\n alert: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the threshold notification'\n },\n name: {\n type: 'string',\n description: 'Name of the threshold notification'\n },\n status: {\n type: 'string',\n description: 'Status of the threshold notification',\n enum: [ 'enabled',\n 'archived',\n 'disabled'\n ]\n },\n threshold: {\n type: 'number',\n description: 'Threshold value of the notification policy'\n },\n type: {\n type: 'string',\n description: 'Type of the threshold notification',\n enum: [ 'low_credit_balance_reached',\n 'spend_threshold_reached',\n 'monthly_invoice_total_spend_threshold_reached',\n 'low_remaining_days_in_plan_reached',\n 'low_remaining_credit_percentage_reached',\n 'usage_threshold_reached',\n 'low_remaining_days_for_commit_segment_reached',\n 'low_remaining_commit_balance_reached',\n 'low_remaining_commit_percentage_reached',\n 'low_remaining_days_for_contract_credit_segment_reached',\n 'low_remaining_contract_credit_balance_reached',\n 'low_remaining_contract_credit_percentage_reached',\n 'low_remaining_contract_credit_and_commit_balance_reached',\n 'invoice_total_reached'\n ]\n },\n updated_at: {\n type: 'string',\n description: 'Timestamp for when the threshold notification was last updated',\n format: 'date-time'\n },\n credit_grant_type_filters: {\n type: 'array',\n description: 'An array of strings, representing a way to filter the credit grant this threshold notification applies to, by looking at the credit_grant_type field on the credit grant. This field is only defined for CreditPercentage and CreditBalance notifications',\n items: {\n type: 'string'\n }\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n custom_field_filters: {\n type: 'array',\n description: 'A list of custom field filters for notification types that support advanced filtering',\n items: {\n type: 'object',\n properties: {\n entity: {\n type: 'string',\n enum: [ 'Contract',\n 'Commit',\n 'ContractCredit'\n ]\n },\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'entity',\n 'key',\n 'value'\n ]\n }\n },\n group_key_filter: {\n type: 'object',\n description: 'Scopes threshold notification evaluation to a specific presentation group key on individual line items. Only present for spend notifications.',\n properties: {\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'key',\n 'value'\n ]\n },\n group_values: {\n type: 'array',\n description: 'Only present for `spend_threshold_reached` notifications. Scope notification to a specific group key on individual line items.',\n items: {\n type: 'object',\n properties: {\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'key'\n ]\n }\n },\n invoice_types_filter: {\n type: 'array',\n description: 'Only supported for invoice_total_reached threshold notifications. A list of invoice types to evaluate.',\n items: {\n type: 'string'\n }\n },\n uniqueness_key: {\n type: 'string',\n description: 'Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.'\n }\n },\n required: [ 'id',\n 'name',\n 'status',\n 'threshold',\n 'type',\n 'updated_at'\n ]\n },\n customer_status: {\n type: 'string',\n description: 'The status of the threshold notification. If the notification is archived, null will be returned.',\n enum: [ 'ok',\n 'in_alarm',\n 'evaluating'\n ]\n },\n triggered_by: {\n type: 'string',\n description: 'If present, indicates the reason the threshold notification was triggered.'\n }\n },\n required: [ 'alert',\n 'customer_status'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve all threshold notification configurations and their current statuses for a specific customer in a single API call. This endpoint provides a comprehensive view of all threshold notification monitoring a customer account.\n\n### Use this endpoint to:\n- Display all active threshold notifications for a customer in dashboards or admin panels\n- Quickly identify which threshold notifications a customer is currently triggering\n- Audit threshold notification coverage for specific accounts\n- Filter threshold notifications by status (enabled, disabled, or archived)\n\n### Key response fields:\n- data: Array of CustomerAlert objects, each containing:\n - Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)\n - Complete threshold notification configuration and threshold details\n - Threshold notification metadata including type, name, and last update time\n- next_page: Pagination cursor for retrieving additional results\n\n### Usage guidelines:\n- Default behavior: Returns only enabled threshold notifications unless `alert_statuses` filter is specified\n- Pagination: Use the `next_page` cursor to retrieve all results for customers with many notifications\n- Performance: Efficiently retrieves multiple threshold notification statuses in a single request instead of making individual calls\n- Filtering: Pass the `alert_statuses` array to include disabled or archived threshold notifications in results\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_alert'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n customer_alert: {\n type: 'object',\n properties: {\n alert: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the threshold notification'\n },\n name: {\n type: 'string',\n description: 'Name of the threshold notification'\n },\n status: {\n type: 'string',\n description: 'Status of the threshold notification',\n enum: [ 'enabled',\n 'archived',\n 'disabled'\n ]\n },\n threshold: {\n type: 'number',\n description: 'Threshold value of the notification policy'\n },\n type: {\n type: 'string',\n description: 'Type of the threshold notification',\n enum: [ 'low_credit_balance_reached',\n 'spend_threshold_reached',\n 'monthly_invoice_total_spend_threshold_reached',\n 'low_remaining_days_in_plan_reached',\n 'low_remaining_credit_percentage_reached',\n 'usage_threshold_reached',\n 'low_remaining_days_for_commit_segment_reached',\n 'low_remaining_commit_balance_reached',\n 'low_remaining_commit_percentage_reached',\n 'low_remaining_days_for_contract_credit_segment_reached',\n 'low_remaining_contract_credit_balance_reached',\n 'low_remaining_contract_credit_percentage_reached',\n 'low_remaining_contract_credit_and_commit_balance_reached',\n 'low_remaining_seat_balance_reached',\n 'invoice_total_reached'\n ]\n },\n updated_at: {\n type: 'string',\n description: 'Timestamp for when the threshold notification was last updated',\n format: 'date-time'\n },\n credit_grant_type_filters: {\n type: 'array',\n description: 'An array of strings, representing a way to filter the credit grant this threshold notification applies to, by looking at the credit_grant_type field on the credit grant. This field is only defined for CreditPercentage and CreditBalance notifications',\n items: {\n type: 'string'\n }\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n custom_field_filters: {\n type: 'array',\n description: 'A list of custom field filters for notification types that support advanced filtering',\n items: {\n type: 'object',\n properties: {\n entity: {\n type: 'string',\n enum: [ 'Contract',\n 'Commit',\n 'ContractCredit'\n ]\n },\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'entity',\n 'key',\n 'value'\n ]\n }\n },\n group_key_filter: {\n type: 'object',\n description: 'Scopes threshold notification evaluation to a specific presentation group key on individual line items. Only present for spend notifications.',\n properties: {\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'key',\n 'value'\n ]\n },\n group_values: {\n type: 'array',\n description: 'Only present for `spend_threshold_reached` notifications. Scope notification to a specific group key on individual line items.',\n items: {\n type: 'object',\n properties: {\n key: {\n type: 'string'\n },\n value: {\n type: 'string'\n }\n },\n required: [ 'key'\n ]\n }\n },\n invoice_types_filter: {\n type: 'array',\n description: 'Only supported for invoice_total_reached threshold notifications. A list of invoice types to evaluate.',\n items: {\n type: 'string'\n }\n },\n uniqueness_key: {\n type: 'string',\n description: 'Prevents the creation of duplicates. If a request to create a record is made with a previously used uniqueness key, a new record will not be created and the request will fail with a 409 error.'\n }\n },\n required: [ 'id',\n 'name',\n 'status',\n 'threshold',\n 'type',\n 'updated_at'\n ]\n },\n customer_status: {\n type: 'string',\n description: 'The status of the threshold notification. If the notification is archived, null will be returned.',\n enum: [ 'ok',\n 'in_alarm',\n 'evaluating'\n ]\n },\n triggered_by: {\n type: 'string',\n description: 'If present, indicates the reason the threshold notification was triggered.'\n }\n },\n required: [ 'alert',\n 'customer_status'\n ]\n },\n credit_type_data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -16,7 +16,8 @@ export const metadata: Metadata = {
|
|
|
16
16
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'create_customers_v1_billing_config',
|
|
19
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
'Set the billing configuration for a given customer. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n',
|
|
20
21
|
inputSchema: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
@@ -34,6 +35,7 @@ export const tool: Tool = {
|
|
|
34
35
|
'quickbooks_online',
|
|
35
36
|
'workday',
|
|
36
37
|
'gcp_marketplace',
|
|
38
|
+
'metronome',
|
|
37
39
|
],
|
|
38
40
|
},
|
|
39
41
|
billing_provider_customer_id: {
|
|
@@ -76,6 +78,8 @@ export const tool: Tool = {
|
|
|
76
78
|
},
|
|
77
79
|
stripe_collection_method: {
|
|
78
80
|
type: 'string',
|
|
81
|
+
description:
|
|
82
|
+
"The collection method for the customer's invoices.\nNOTE: `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.",
|
|
79
83
|
enum: [
|
|
80
84
|
'charge_automatically',
|
|
81
85
|
'send_invoice',
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'delete_customers_v1_billing_config',
|
|
19
19
|
description:
|
|
20
|
-
'Delete the billing configuration for a given customer
|
|
20
|
+
'Delete the billing configuration for a given customer.\nNote: this is unsupported for Azure and AWS Marketplace customers. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n',
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -35,6 +35,7 @@ export const tool: Tool = {
|
|
|
35
35
|
'quickbooks_online',
|
|
36
36
|
'workday',
|
|
37
37
|
'gcp_marketplace',
|
|
38
|
+
'metronome',
|
|
38
39
|
],
|
|
39
40
|
},
|
|
40
41
|
},
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'retrieve_customers_v1_billing_config',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetch the billing configuration for the given customer.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/billing_config_retrieve_response',\n $defs: {\n billing_config_retrieve_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n aws_expiration_date: {\n type: 'string',\n description: 'Contract expiration date for the customer. The expected format is RFC 3339 and can be retrieved from [AWS\\'s GetEntitlements API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).',\n format: 'date-time'\n },\n aws_is_subscription_product: {\n type: 'boolean',\n description: 'True if the aws_product_code is a SAAS subscription product, false otherwise.'\n },\n aws_product_code: {\n type: 'string'\n },\n aws_region: {\n type: 'string',\n enum: [ 'af-south-1',\n 'ap-east-1',\n 'ap-northeast-1',\n 'ap-northeast-2',\n 'ap-northeast-3',\n 'ap-south-1',\n 'ap-southeast-1',\n 'ap-southeast-2',\n 'ca-central-1',\n 'cn-north-1',\n 'cn-northwest-1',\n 'eu-central-1',\n 'eu-north-1',\n 'eu-south-1',\n 'eu-west-1',\n 'eu-west-2',\n 'eu-west-3',\n 'me-south-1',\n 'sa-east-1',\n 'us-east-1',\n 'us-east-2',\n 'us-gov-east-1',\n 'us-gov-west-1',\n 'us-west-1',\n 'us-west-2'\n ]\n },\n azure_expiration_date: {\n type: 'string',\n description: 'Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from [Azure\\'s Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).',\n format: 'date-time'\n },\n azure_plan_id: {\n type: 'string'\n },\n azure_start_date: {\n type: 'string',\n description: 'Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from [Azure\\'s Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).',\n format: 'date-time'\n },\n azure_subscription_status: {\n type: 'string',\n enum: [ 'Subscribed',\n 'Unsubscribed',\n 'Suspended',\n 'PendingFulfillmentStart'\n ]\n },\n billing_provider_customer_id: {\n type: 'string'\n },\n stripe_collection_method: {\n type: 'string',\n enum: [ 'charge_automatically',\n 'send_invoice',\n 'auto_charge_payment_intent',\n 'manually_charge_payment_intent'\n ]\n }\n }\n }\n },\n required: [ 'data'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetch the billing configuration for the given customer. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/billing_config_retrieve_response',\n $defs: {\n billing_config_retrieve_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n aws_expiration_date: {\n type: 'string',\n description: 'Contract expiration date for the customer. The expected format is RFC 3339 and can be retrieved from [AWS\\'s GetEntitlements API](https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html).',\n format: 'date-time'\n },\n aws_is_subscription_product: {\n type: 'boolean',\n description: 'True if the aws_product_code is a SAAS subscription product, false otherwise.'\n },\n aws_product_code: {\n type: 'string'\n },\n aws_region: {\n type: 'string',\n enum: [ 'af-south-1',\n 'ap-east-1',\n 'ap-northeast-1',\n 'ap-northeast-2',\n 'ap-northeast-3',\n 'ap-south-1',\n 'ap-southeast-1',\n 'ap-southeast-2',\n 'ca-central-1',\n 'cn-north-1',\n 'cn-northwest-1',\n 'eu-central-1',\n 'eu-north-1',\n 'eu-south-1',\n 'eu-west-1',\n 'eu-west-2',\n 'eu-west-3',\n 'me-south-1',\n 'sa-east-1',\n 'us-east-1',\n 'us-east-2',\n 'us-gov-east-1',\n 'us-gov-west-1',\n 'us-west-1',\n 'us-west-2'\n ]\n },\n azure_expiration_date: {\n type: 'string',\n description: 'Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from [Azure\\'s Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).',\n format: 'date-time'\n },\n azure_plan_id: {\n type: 'string'\n },\n azure_start_date: {\n type: 'string',\n description: 'Subscription term start/end date for the customer. The expected format is RFC 3339 and can be retrieved from [Azure\\'s Get Subscription API](https://learn.microsoft.com/en-us/partner-center/marketplace/partner-center-portal/pc-saas-fulfillment-subscription-api#get-subscription).',\n format: 'date-time'\n },\n azure_subscription_status: {\n type: 'string',\n enum: [ 'Subscribed',\n 'Unsubscribed',\n 'Suspended',\n 'PendingFulfillmentStart'\n ]\n },\n billing_provider_customer_id: {\n type: 'string'\n },\n stripe_collection_method: {\n type: 'string',\n description: 'The collection method for the customer\\'s invoices.\\nNOTE: `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.',\n enum: [ 'charge_automatically',\n 'send_invoice',\n 'auto_charge_payment_intent',\n 'manually_charge_payment_intent'\n ]\n }\n }\n }\n },\n required: [ 'data'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -36,6 +36,7 @@ export const tool: Tool = {
|
|
|
36
36
|
'quickbooks_online',
|
|
37
37
|
'workday',
|
|
38
38
|
'gcp_marketplace',
|
|
39
|
+
'metronome',
|
|
39
40
|
],
|
|
40
41
|
},
|
|
41
42
|
jq_filter: {
|
|
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
|
|
|
17
17
|
export const tool: Tool = {
|
|
18
18
|
name: 'create_customers_v1_commits',
|
|
19
19
|
description:
|
|
20
|
-
'Creates customer-level commits that establish spending commitments for customers across their Metronome usage. Commits represent contracted spending obligations that can be either prepaid (paid upfront) or postpaid (billed later). \n\nNote: In most cases, you should add commitments directly to customer contracts using the contract/create or contract/edit APIs.\n\n### Use this endpoint to:\nUse this endpoint when you need to establish customer-level spending commitments that can be applied across multiple contracts or scoped to specific contracts. Customer-level commits are ideal for:\n- Enterprise-wide minimum spending agreements that span multiple contracts\n- Multi-contract volume commitments with shared spending pools\n- Cross-contract discount tiers based on aggregate usage\n\n#### Commit type Requirements: \n- You must specify either "prepaid" or "postpaid" as the commit type:\n- Prepaid commits: Customer pays upfront; invoice_schedule is optional (if omitted, creates a commit without an invoice)\n- Postpaid commits: Customer pays when the commitment expires (the end of the access_schedule); invoice_schedule is required and must match access_schedule totals. \n\n#### Billing configuration:\n- invoice_contract_id is required for postpaid commits and for prepaid commits with billing (only optional for free prepaid commits)\n- For postpaid commits: access_schedule and invoice_schedule must have matching amounts\n- For postpaid commits: only one schedule item is allowed in both schedules.\n\n#### Scoping flexibility:\nCustomer-level commits can be configured in a few ways:\n- Contract-specific: Use the `applicable_contract_ids` field to limit the commit to specific contracts\n- Cross-contract: Leave `applicable_contract_ids` empty to allow the commit to be used across all of the customer\'s contracts\n\n#### Product targeting:\nCommits can be scoped to specific products using applicable_product_ids, applicable_product_tags, or specifiers, or left unrestricted to apply to all products.\n\n#### Priority considerations:\nWhen multiple commits are applicable, the one with the lower priority value will be consumed first. If there is a tie, contract level commits and credits will be applied before customer level commits and credits. Plan your priority scheme carefully to ensure commits are applied in the desired order.\n\n### Usage guidelines:\n⚠️ Preferred Alternative: In most cases, you should add commits directly to contracts using the create contract or edit contract APIs instead of creating customer-level commits. Contract-level commits provide better organization and are the recommended approach for standard use cases.\n',
|
|
20
|
+
'Creates customer-level commits that establish spending commitments for customers across their Metronome usage. Commits represent contracted spending obligations that can be either prepaid (paid upfront) or postpaid (billed later). \n\nNote: In most cases, you should add commitments directly to customer contracts using the contract/create or contract/edit APIs.\n\n### Use this endpoint to:\nUse this endpoint when you need to establish customer-level spending commitments that can be applied across multiple contracts or scoped to specific contracts. Customer-level commits are ideal for:\n- Enterprise-wide minimum spending agreements that span multiple contracts\n- Multi-contract volume commitments with shared spending pools\n- Cross-contract discount tiers based on aggregate usage\n\n#### Commit type Requirements: \n- You must specify either "prepaid" or "postpaid" as the commit type:\n- Prepaid commits: Customer pays upfront; invoice_schedule is optional (if omitted, creates a commit without an invoice)\n- Postpaid commits: Customer pays when the commitment expires (the end of the access_schedule); invoice_schedule is required and must match access_schedule totals. \n\n#### Billing configuration:\n- invoice_contract_id is required for postpaid commits and for prepaid commits with billing (only optional for free prepaid commits) unless do_not_invoice is set to true\n- For postpaid commits: access_schedule and invoice_schedule must have matching amounts\n- For postpaid commits: only one schedule item is allowed in both schedules.\n\n#### Scoping flexibility:\nCustomer-level commits can be configured in a few ways:\n- Contract-specific: Use the `applicable_contract_ids` field to limit the commit to specific contracts\n- Cross-contract: Leave `applicable_contract_ids` empty to allow the commit to be used across all of the customer\'s contracts\n\n#### Product targeting:\nCommits can be scoped to specific products using applicable_product_ids, applicable_product_tags, or specifiers, or left unrestricted to apply to all products.\n\n#### Priority considerations:\nWhen multiple commits are applicable, the one with the lower priority value will be consumed first. If there is a tie, contract level commits and credits will be applied before customer level commits and credits. Plan your priority scheme carefully to ensure commits are applied in the desired order.\n\n### Usage guidelines:\n⚠️ Preferred Alternative: In most cases, you should add commits directly to contracts using the create contract or edit contract APIs instead of creating customer-level commits. Contract-level commits provide better organization and are the recommended approach for standard use cases.\n',
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: 'object',
|
|
23
23
|
properties: {
|
|
@@ -108,7 +108,7 @@ export const tool: Tool = {
|
|
|
108
108
|
invoice_contract_id: {
|
|
109
109
|
type: 'string',
|
|
110
110
|
description:
|
|
111
|
-
'The contract that this commit will be billed on. This is required for "POSTPAID" commits and for "PREPAID" commits unless there is no invoice schedule above (i.e., the commit is \'free\').',
|
|
111
|
+
'The contract that this commit will be billed on. This is required for "POSTPAID" commits and for "PREPAID" commits unless there is no invoice schedule above (i.e., the commit is \'free\'), or if do_not_invoice is set to true.',
|
|
112
112
|
},
|
|
113
113
|
invoice_schedule: {
|
|
114
114
|
type: 'object',
|
|
@@ -43,6 +43,7 @@ export const tool: Tool = {
|
|
|
43
43
|
'quickbooks_online',
|
|
44
44
|
'workday',
|
|
45
45
|
'gcp_marketplace',
|
|
46
|
+
'metronome',
|
|
46
47
|
],
|
|
47
48
|
},
|
|
48
49
|
aws_is_subscription_product: {
|
|
@@ -84,6 +85,8 @@ export const tool: Tool = {
|
|
|
84
85
|
},
|
|
85
86
|
stripe_collection_method: {
|
|
86
87
|
type: 'string',
|
|
88
|
+
description:
|
|
89
|
+
"The collection method for the customer's invoices.\nNOTE: `auto_charge_payment_intent` and `manually_charge_payment_intent` are in beta.",
|
|
87
90
|
enum: [
|
|
88
91
|
'charge_automatically',
|
|
89
92
|
'send_invoice',
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'add_charge_customers_v1_invoices',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAdd a one time charge to the specified invoice\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/invoice_add_charge_response',\n $defs: {\n invoice_add_charge_response: {\n type: 'object',\n properties: {}\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAdd a one time charge to the specified invoice. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/invoice_add_charge_response',\n $defs: {\n invoice_add_charge_response: {\n type: 'object',\n properties: {}\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'list_costs_v1_customers',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_list_costs_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n customer_list_costs_response: {\n type: 'object',\n properties: {\n credit_types: {\n type: 'object',\n additionalProperties: true\n },\n end_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n start_timestamp: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'credit_types',\n 'end_timestamp',\n 'start_timestamp'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFetch daily pending costs for the specified customer, broken down by credit type and line items. Note: this is not supported for customers whose plan includes a UNIQUE-type billable metric. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/customer_list_costs_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n customer_list_costs_response: {\n type: 'object',\n properties: {\n credit_types: {\n type: 'object',\n additionalProperties: true\n },\n end_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n start_timestamp: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'credit_types',\n 'end_timestamp',\n 'start_timestamp'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|
|
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
|
|
|
18
18
|
export const tool: Tool = {
|
|
19
19
|
name: 'add_customers_v1_plans',
|
|
20
20
|
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAssociate an existing customer with a plan for a specified date range. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details on the price adjustments.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/plan_add_response',\n $defs: {\n plan_add_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAssociate an existing customer with a plan for a specified date range. See the [price adjustments documentation](https://plans-docs.metronome.com/pricing/managing-plans/#price-adjustments) for details on the price adjustments. This is a Plans (deprecated) endpoint. New clients should implement using Contracts.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/plan_add_response',\n $defs: {\n plan_add_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ]\n },\n id: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n}\n```",
|
|
22
22
|
inputSchema: {
|
|
23
23
|
type: 'object',
|
|
24
24
|
properties: {
|