@metronome/mcp 1.0.0 → 2.0.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 +97 -55
- package/docs-search-tool.d.mts +44 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +44 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +43 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +39 -0
- package/docs-search-tool.mjs.map +1 -0
- package/options.d.mts +1 -0
- package/options.d.mts.map +1 -1
- package/options.d.ts +1 -0
- package/options.d.ts.map +1 -1
- package/options.js +13 -6
- package/options.js.map +1 -1
- package/options.mjs +13 -6
- package/options.mjs.map +1 -1
- package/package.json +12 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts.map +1 -1
- package/server.js +8 -4
- package/server.js.map +1 -1
- package/server.mjs +8 -4
- package/server.mjs.map +1 -1
- package/src/docs-search-tool.ts +48 -0
- package/src/options.ts +17 -7
- package/src/server.ts +8 -5
- package/src/tools/index.ts +8 -0
- package/src/tools/v1/alerts/archive-v1-alerts.ts +3 -3
- package/src/tools/v1/alerts/create-v1-alerts.ts +14 -13
- package/src/tools/v1/audit-logs/list-v1-audit-logs.ts +1 -1
- package/src/tools/v1/billable-metrics/archive-v1-billable-metrics.ts +1 -1
- package/src/tools/v1/billable-metrics/create-v1-billable-metrics.ts +1 -1
- package/src/tools/v1/billable-metrics/list-v1-billable-metrics.ts +1 -1
- package/src/tools/v1/billable-metrics/retrieve-v1-billable-metrics.ts +1 -1
- package/src/tools/v1/contracts/amend-v1-contracts.ts +1 -1
- package/src/tools/v1/contracts/archive-v1-contracts.ts +1 -1
- package/src/tools/v1/contracts/create-v1-contracts.ts +24 -3
- package/src/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.ts +1 -1
- package/src/tools/v1/contracts/products/archive-contracts-v1-products.ts +1 -1
- package/src/tools/v1/contracts/products/create-contracts-v1-products.ts +1 -1
- package/src/tools/v1/contracts/products/list-contracts-v1-products.ts +1 -1
- package/src/tools/v1/contracts/products/retrieve-contracts-v1-products.ts +1 -1
- package/src/tools/v1/contracts/products/update-contracts-v1-products.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.ts +1 -1
- package/src/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.ts +1 -1
- package/src/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.ts +1 -1
- package/src/tools/v1/contracts/update-end-date-v1-contracts.ts +1 -1
- 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/custom-fields/list-keys-v1-custom-fields.ts +1 -1
- package/src/tools/v1/customers/alerts/list-customers-v1-alerts.ts +3 -2
- package/src/tools/v1/customers/alerts/reset-customers-v1-alerts.ts +2 -2
- package/src/tools/v1/customers/alerts/retrieve-customers-v1-alerts.ts +7 -14
- package/src/tools/v1/customers/archive-v1-customers.ts +1 -1
- package/src/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.ts +1 -1
- package/src/tools/v1/customers/commits/update-end-date-customers-v1-commits.ts +1 -1
- package/src/tools/v1/customers/create-v1-customers.ts +1 -1
- package/src/tools/v1/customers/credits/create-customers-v1-credits.ts +1 -1
- package/src/tools/v1/customers/credits/update-end-date-customers-v1-credits.ts +1 -1
- package/src/tools/v1/customers/invoices/add-charge-customers-v1-invoices.ts +1 -1
- package/src/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.ts +43 -0
- package/src/tools/v1/customers/list-billable-metrics-v1-customers.ts +1 -1
- package/src/tools/v1/customers/list-costs-v1-customers.ts +1 -1
- package/src/tools/v1/customers/list-v1-customers.ts +1 -1
- package/src/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.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 +2 -7
- package/src/tools/v1/customers/retrieve-billing-configurations-v1-customers.ts +1 -1
- package/src/tools/v1/customers/retrieve-v1-customers.ts +1 -1
- package/src/tools/v1/customers/set-billing-configurations-v1-customers.ts +1 -1
- package/src/tools/v1/customers/set-name-v1-customers.ts +1 -1
- package/src/tools/v1/dashboards/get-embeddable-url-v1-dashboards.ts +1 -1
- package/src/tools/v1/invoices/regenerate-v1-invoices.ts +1 -1
- package/src/tools/v1/invoices/void-v1-invoices.ts +1 -1
- package/src/tools/v1/payments/attempt-v1-payments.ts +48 -0
- package/src/tools/v1/payments/cancel-v1-payments.ts +48 -0
- package/src/tools/v1/payments/list-v1-payments.ts +69 -0
- 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/pricing-units/list-v1-pricing-units.ts +1 -1
- package/src/tools/v1/services/list-v1-services.ts +1 -1
- package/src/tools/v1/usage/ingest-v1-usage.ts +1 -1
- package/src/tools/v1/usage/list-v1-usage.ts +1 -1
- package/src/tools/v1/usage/list-with-groups-v1-usage.ts +1 -1
- package/src/tools/v1/usage/search-v1-usage.ts +1 -1
- package/src/tools/v2/contracts/edit-commit-v2-contracts.ts +50 -1
- package/src/tools/v2/contracts/edit-credit-v2-contracts.ts +50 -1
- package/src/tools/v2/contracts/edit-v2-contracts.ts +60 -2
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +8 -0
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +8 -0
- package/tools/index.mjs.map +1 -1
- package/tools/v1/alerts/archive-v1-alerts.js +3 -3
- package/tools/v1/alerts/archive-v1-alerts.js.map +1 -1
- package/tools/v1/alerts/archive-v1-alerts.mjs +3 -3
- package/tools/v1/alerts/archive-v1-alerts.mjs.map +1 -1
- package/tools/v1/alerts/create-v1-alerts.d.mts.map +1 -1
- package/tools/v1/alerts/create-v1-alerts.d.ts.map +1 -1
- package/tools/v1/alerts/create-v1-alerts.js +13 -13
- package/tools/v1/alerts/create-v1-alerts.js.map +1 -1
- package/tools/v1/alerts/create-v1-alerts.mjs +13 -13
- package/tools/v1/alerts/create-v1-alerts.mjs.map +1 -1
- package/tools/v1/audit-logs/list-v1-audit-logs.js +1 -1
- package/tools/v1/audit-logs/list-v1-audit-logs.js.map +1 -1
- package/tools/v1/audit-logs/list-v1-audit-logs.mjs +1 -1
- package/tools/v1/audit-logs/list-v1-audit-logs.mjs.map +1 -1
- package/tools/v1/billable-metrics/archive-v1-billable-metrics.js +1 -1
- package/tools/v1/billable-metrics/archive-v1-billable-metrics.js.map +1 -1
- package/tools/v1/billable-metrics/archive-v1-billable-metrics.mjs +1 -1
- package/tools/v1/billable-metrics/archive-v1-billable-metrics.mjs.map +1 -1
- package/tools/v1/billable-metrics/create-v1-billable-metrics.js +1 -1
- package/tools/v1/billable-metrics/create-v1-billable-metrics.js.map +1 -1
- package/tools/v1/billable-metrics/create-v1-billable-metrics.mjs +1 -1
- package/tools/v1/billable-metrics/create-v1-billable-metrics.mjs.map +1 -1
- package/tools/v1/billable-metrics/list-v1-billable-metrics.js +1 -1
- package/tools/v1/billable-metrics/list-v1-billable-metrics.js.map +1 -1
- package/tools/v1/billable-metrics/list-v1-billable-metrics.mjs +1 -1
- package/tools/v1/billable-metrics/list-v1-billable-metrics.mjs.map +1 -1
- package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.js +1 -1
- package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.js.map +1 -1
- package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.mjs +1 -1
- package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.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/archive-v1-contracts.js +1 -1
- package/tools/v1/contracts/archive-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/archive-v1-contracts.mjs +1 -1
- package/tools/v1/contracts/archive-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 +22 -3
- package/tools/v1/contracts/create-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/create-v1-contracts.mjs +22 -3
- package/tools/v1/contracts/create-v1-contracts.mjs.map +1 -1
- package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.js +1 -1
- package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.js.map +1 -1
- package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.mjs +1 -1
- package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.mjs.map +1 -1
- package/tools/v1/contracts/products/archive-contracts-v1-products.js +1 -1
- package/tools/v1/contracts/products/archive-contracts-v1-products.js.map +1 -1
- package/tools/v1/contracts/products/archive-contracts-v1-products.mjs +1 -1
- package/tools/v1/contracts/products/archive-contracts-v1-products.mjs.map +1 -1
- package/tools/v1/contracts/products/create-contracts-v1-products.js +1 -1
- package/tools/v1/contracts/products/create-contracts-v1-products.js.map +1 -1
- package/tools/v1/contracts/products/create-contracts-v1-products.mjs +1 -1
- package/tools/v1/contracts/products/create-contracts-v1-products.mjs.map +1 -1
- package/tools/v1/contracts/products/list-contracts-v1-products.js +1 -1
- package/tools/v1/contracts/products/list-contracts-v1-products.js.map +1 -1
- package/tools/v1/contracts/products/list-contracts-v1-products.mjs +1 -1
- package/tools/v1/contracts/products/list-contracts-v1-products.mjs.map +1 -1
- package/tools/v1/contracts/products/retrieve-contracts-v1-products.js +1 -1
- package/tools/v1/contracts/products/retrieve-contracts-v1-products.js.map +1 -1
- package/tools/v1/contracts/products/retrieve-contracts-v1-products.mjs +1 -1
- package/tools/v1/contracts/products/retrieve-contracts-v1-products.mjs.map +1 -1
- package/tools/v1/contracts/products/update-contracts-v1-products.js +1 -1
- package/tools/v1/contracts/products/update-contracts-v1-products.js.map +1 -1
- package/tools/v1/contracts/products/update-contracts-v1-products.mjs +1 -1
- package/tools/v1/contracts/products/update-contracts-v1-products.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.js +1 -1
- package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.js.map +1 -1
- package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.mjs +1 -1
- package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.js +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.js.map +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.mjs +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.js +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.js.map +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.mjs +1 -1
- package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.js +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.js.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.mjs +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.js +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.js.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.mjs +1 -1
- package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.js +1 -1
- package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.js.map +1 -1
- package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.mjs +1 -1
- package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.js +1 -1
- package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.js.map +1 -1
- package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.mjs +1 -1
- package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.mjs.map +1 -1
- package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.js +1 -1
- package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.mjs +1 -1
- package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.mjs.map +1 -1
- package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.js +1 -1
- package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.mjs +1 -1
- package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.mjs.map +1 -1
- package/tools/v1/contracts/update-end-date-v1-contracts.js +1 -1
- package/tools/v1/contracts/update-end-date-v1-contracts.js.map +1 -1
- package/tools/v1/contracts/update-end-date-v1-contracts.mjs +1 -1
- package/tools/v1/contracts/update-end-date-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/custom-fields/list-keys-v1-custom-fields.js +1 -1
- package/tools/v1/custom-fields/list-keys-v1-custom-fields.js.map +1 -1
- package/tools/v1/custom-fields/list-keys-v1-custom-fields.mjs +1 -1
- package/tools/v1/custom-fields/list-keys-v1-custom-fields.mjs.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.d.mts.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.d.ts.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.js +2 -2
- package/tools/v1/customers/alerts/list-customers-v1-alerts.js.map +1 -1
- package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs +2 -2
- package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs.map +1 -1
- package/tools/v1/customers/alerts/reset-customers-v1-alerts.js +2 -2
- package/tools/v1/customers/alerts/reset-customers-v1-alerts.js.map +1 -1
- package/tools/v1/customers/alerts/reset-customers-v1-alerts.mjs +2 -2
- package/tools/v1/customers/alerts/reset-customers-v1-alerts.mjs.map +1 -1
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.d.mts.map +1 -1
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.d.ts.map +1 -1
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.js +7 -13
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.js.map +1 -1
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.mjs +7 -13
- package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.mjs.map +1 -1
- package/tools/v1/customers/archive-v1-customers.js +1 -1
- package/tools/v1/customers/archive-v1-customers.js.map +1 -1
- package/tools/v1/customers/archive-v1-customers.mjs +1 -1
- package/tools/v1/customers/archive-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.js +1 -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 +1 -1
- package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.mjs.map +1 -1
- package/tools/v1/customers/commits/update-end-date-customers-v1-commits.js +1 -1
- package/tools/v1/customers/commits/update-end-date-customers-v1-commits.js.map +1 -1
- package/tools/v1/customers/commits/update-end-date-customers-v1-commits.mjs +1 -1
- package/tools/v1/customers/commits/update-end-date-customers-v1-commits.mjs.map +1 -1
- package/tools/v1/customers/create-v1-customers.js +1 -1
- package/tools/v1/customers/create-v1-customers.js.map +1 -1
- package/tools/v1/customers/create-v1-customers.mjs +1 -1
- package/tools/v1/customers/create-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/credits/create-customers-v1-credits.js +1 -1
- package/tools/v1/customers/credits/create-customers-v1-credits.js.map +1 -1
- package/tools/v1/customers/credits/create-customers-v1-credits.mjs +1 -1
- package/tools/v1/customers/credits/create-customers-v1-credits.mjs.map +1 -1
- package/tools/v1/customers/credits/update-end-date-customers-v1-credits.js +1 -1
- package/tools/v1/customers/credits/update-end-date-customers-v1-credits.js.map +1 -1
- package/tools/v1/customers/credits/update-end-date-customers-v1-credits.mjs +1 -1
- package/tools/v1/customers/credits/update-end-date-customers-v1-credits.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/invoices/retrieve-pdf-customers-v1-invoices.d.mts +45 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.mts.map +1 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.ts +45 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.ts.map +1 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.js +39 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.js.map +1 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.mjs +35 -0
- package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.mjs.map +1 -0
- package/tools/v1/customers/list-billable-metrics-v1-customers.js +1 -1
- package/tools/v1/customers/list-billable-metrics-v1-customers.js.map +1 -1
- package/tools/v1/customers/list-billable-metrics-v1-customers.mjs +1 -1
- package/tools/v1/customers/list-billable-metrics-v1-customers.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/list-v1-customers.js +1 -1
- package/tools/v1/customers/list-v1-customers.js.map +1 -1
- package/tools/v1/customers/list-v1-customers.mjs +1 -1
- package/tools/v1/customers/list-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.js +1 -1
- package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.js.map +1 -1
- package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.mjs +1 -1
- package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.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 +2 -6
- package/tools/v1/customers/preview-events-v1-customers.js.map +1 -1
- package/tools/v1/customers/preview-events-v1-customers.mjs +2 -6
- 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/retrieve-v1-customers.js +1 -1
- package/tools/v1/customers/retrieve-v1-customers.js.map +1 -1
- package/tools/v1/customers/retrieve-v1-customers.mjs +1 -1
- package/tools/v1/customers/retrieve-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.js +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.js.map +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.mjs +1 -1
- package/tools/v1/customers/set-billing-configurations-v1-customers.mjs.map +1 -1
- package/tools/v1/customers/set-name-v1-customers.js +1 -1
- package/tools/v1/customers/set-name-v1-customers.js.map +1 -1
- package/tools/v1/customers/set-name-v1-customers.mjs +1 -1
- package/tools/v1/customers/set-name-v1-customers.mjs.map +1 -1
- package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.js +1 -1
- package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.js.map +1 -1
- package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.mjs +1 -1
- package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.mjs.map +1 -1
- package/tools/v1/invoices/regenerate-v1-invoices.js +1 -1
- package/tools/v1/invoices/regenerate-v1-invoices.js.map +1 -1
- package/tools/v1/invoices/regenerate-v1-invoices.mjs +1 -1
- package/tools/v1/invoices/regenerate-v1-invoices.mjs.map +1 -1
- package/tools/v1/invoices/void-v1-invoices.js +1 -1
- package/tools/v1/invoices/void-v1-invoices.js.map +1 -1
- package/tools/v1/invoices/void-v1-invoices.mjs +1 -1
- package/tools/v1/invoices/void-v1-invoices.mjs.map +1 -1
- package/tools/v1/payments/attempt-v1-payments.d.mts +45 -0
- package/tools/v1/payments/attempt-v1-payments.d.mts.map +1 -0
- package/tools/v1/payments/attempt-v1-payments.d.ts +45 -0
- package/tools/v1/payments/attempt-v1-payments.d.ts.map +1 -0
- package/tools/v1/payments/attempt-v1-payments.js +43 -0
- package/tools/v1/payments/attempt-v1-payments.js.map +1 -0
- package/tools/v1/payments/attempt-v1-payments.mjs +39 -0
- package/tools/v1/payments/attempt-v1-payments.mjs.map +1 -0
- package/tools/v1/payments/cancel-v1-payments.d.mts +45 -0
- package/tools/v1/payments/cancel-v1-payments.d.mts.map +1 -0
- package/tools/v1/payments/cancel-v1-payments.d.ts +45 -0
- package/tools/v1/payments/cancel-v1-payments.d.ts.map +1 -0
- package/tools/v1/payments/cancel-v1-payments.js +43 -0
- package/tools/v1/payments/cancel-v1-payments.js.map +1 -0
- package/tools/v1/payments/cancel-v1-payments.mjs +39 -0
- package/tools/v1/payments/cancel-v1-payments.mjs.map +1 -0
- package/tools/v1/payments/list-v1-payments.d.mts +45 -0
- package/tools/v1/payments/list-v1-payments.d.mts.map +1 -0
- package/tools/v1/payments/list-v1-payments.d.ts +45 -0
- package/tools/v1/payments/list-v1-payments.d.ts.map +1 -0
- package/tools/v1/payments/list-v1-payments.js +64 -0
- package/tools/v1/payments/list-v1-payments.js.map +1 -0
- package/tools/v1/payments/list-v1-payments.mjs +60 -0
- package/tools/v1/payments/list-v1-payments.mjs.map +1 -0
- 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/pricing-units/list-v1-pricing-units.js +1 -1
- package/tools/v1/pricing-units/list-v1-pricing-units.js.map +1 -1
- package/tools/v1/pricing-units/list-v1-pricing-units.mjs +1 -1
- package/tools/v1/pricing-units/list-v1-pricing-units.mjs.map +1 -1
- package/tools/v1/services/list-v1-services.js +1 -1
- package/tools/v1/services/list-v1-services.js.map +1 -1
- package/tools/v1/services/list-v1-services.mjs +1 -1
- package/tools/v1/services/list-v1-services.mjs.map +1 -1
- package/tools/v1/usage/ingest-v1-usage.js +1 -1
- package/tools/v1/usage/ingest-v1-usage.js.map +1 -1
- package/tools/v1/usage/ingest-v1-usage.mjs +1 -1
- package/tools/v1/usage/ingest-v1-usage.mjs.map +1 -1
- package/tools/v1/usage/list-v1-usage.js +1 -1
- package/tools/v1/usage/list-v1-usage.js.map +1 -1
- package/tools/v1/usage/list-v1-usage.mjs +1 -1
- package/tools/v1/usage/list-v1-usage.mjs.map +1 -1
- package/tools/v1/usage/list-with-groups-v1-usage.js +1 -1
- package/tools/v1/usage/list-with-groups-v1-usage.js.map +1 -1
- package/tools/v1/usage/list-with-groups-v1-usage.mjs +1 -1
- package/tools/v1/usage/list-with-groups-v1-usage.mjs.map +1 -1
- package/tools/v1/usage/search-v1-usage.js +1 -1
- package/tools/v1/usage/search-v1-usage.js.map +1 -1
- package/tools/v1/usage/search-v1-usage.mjs +1 -1
- package/tools/v1/usage/search-v1-usage.mjs.map +1 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.d.mts.map +1 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.d.ts.map +1 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.js +50 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.js.map +1 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.mjs +50 -1
- package/tools/v2/contracts/edit-commit-v2-contracts.mjs.map +1 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.d.mts.map +1 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.d.ts.map +1 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.js +50 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.js.map +1 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.mjs +50 -1
- package/tools/v2/contracts/edit-credit-v2-contracts.mjs.map +1 -1
- 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 +56 -2
- package/tools/v2/contracts/edit-v2-contracts.js.map +1 -1
- package/tools/v2/contracts/edit-v2-contracts.mjs +56 -2
- package/tools/v2/contracts/edit-v2-contracts.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -283,9 +283,9 @@ The following tools are available in this MCP server.
|
|
|
283
283
|
|
|
284
284
|
### Resource `v1.alerts`:
|
|
285
285
|
|
|
286
|
-
- `create_v1_alerts` (`write`): Create a new
|
|
286
|
+
- `create_v1_alerts` (`write`): Create a new threshold notification to monitor customer spending, balances, and billing metrics in real-time. Metronome's notification system provides industry-leading speed with immediate evaluation capabilities, enabling you to proactively manage customer accounts and prevent revenue leakage.
|
|
287
287
|
|
|
288
|
-
This endpoint creates configurable
|
|
288
|
+
This endpoint creates configurable threshold notifications that continuously monitor various billing thresholds including spend limits, credit balances, commitment utilization, and invoice totals. Threshold notifications can be configured globally for all customers or targeted to specific customer accounts.
|
|
289
289
|
|
|
290
290
|
### Use this endpoint to:
|
|
291
291
|
|
|
@@ -298,40 +298,38 @@ The following tools are available in this MCP server.
|
|
|
298
298
|
|
|
299
299
|
A successful response returns a CustomerAlert object containing:
|
|
300
300
|
|
|
301
|
-
- The
|
|
301
|
+
- The threshold notification configuration with its unique ID and current status
|
|
302
302
|
- The customer's evaluation status (ok, in_alarm, or evaluating)
|
|
303
|
-
-
|
|
303
|
+
- Threshold notification metadata including type, threshold values, and update timestamps
|
|
304
304
|
|
|
305
305
|
### Usage guidelines:
|
|
306
306
|
|
|
307
307
|
- Immediate evaluation: Set `evaluate_on_create` : `true` (default) for instant evaluation against existing customers
|
|
308
|
-
- Uniqueness constraints: Each
|
|
309
|
-
-
|
|
310
|
-
- Webhook delivery:
|
|
311
|
-
- Performance at scale: Metronome's event-driven architecture processes
|
|
308
|
+
- Uniqueness constraints: Each threshold notification must have a unique `uniqueness_key` within your organization. Use `release_uniqueness_key` : `true` when archiving to reuse keys
|
|
309
|
+
- Notification type requirements: Different threshold notification types require specific fields (e.g., `billable_metric_id` for usage notifications, `credit_type_id` for credit-based threshold notifications)
|
|
310
|
+
- Webhook delivery: Threshold notifications trigger webhook notifications for real-time integration with your systems. Configure webhook endpoints before creating threshold notifications
|
|
311
|
+
- Performance at scale: Metronome's event-driven architecture processes threshold notification evaluations in real-time as usage events stream in, unlike competitors who rely on periodic polling or batch evaluation cycles
|
|
312
312
|
|
|
313
|
-
- `archive_v1_alerts` (`write`): Permanently disable
|
|
313
|
+
- `archive_v1_alerts` (`write`): Permanently disable a threshold notification and remove it from active monitoring across all customers. Archived threshold notifications stop evaluating immediately and can optionally release their uniqueness key for reuse in future threshold notification configurations.
|
|
314
314
|
|
|
315
315
|
### Use this endpoint to:
|
|
316
316
|
|
|
317
|
-
- Decommission
|
|
318
|
-
- Clean up test or deprecated
|
|
319
|
-
- Free up uniqueness keys for reuse with new
|
|
320
|
-
- Stop
|
|
317
|
+
- Decommission threshold notifications that are no longer needed
|
|
318
|
+
- Clean up test or deprecated threshold notification configurations
|
|
319
|
+
- Free up uniqueness keys for reuse with new threshold notifications
|
|
320
|
+
- Stop threshold notification evaluations without losing historical configuration data
|
|
321
321
|
- Disable outdated monitoring rules during pricing model transitions
|
|
322
322
|
|
|
323
323
|
### Key response fields:
|
|
324
324
|
|
|
325
|
-
- data: Object containing the archived
|
|
326
|
-
- Alert evaluation stops immediately for all affected customers
|
|
327
|
-
- Historical alert data and configurations remain accessible for audit purposes
|
|
325
|
+
- data: Object containing the archived threshold notification's ID
|
|
328
326
|
|
|
329
327
|
### Usage guidelines:
|
|
330
328
|
|
|
331
|
-
- Irreversible for evaluation: Archived
|
|
332
|
-
- Uniqueness key handling: Set `release_uniqueness_key` : `true` to reuse the key in future
|
|
333
|
-
- Immediate effect:
|
|
334
|
-
- Historical preservation: Archive operation maintains
|
|
329
|
+
- Irreversible for evaluation: Archived threshold notifications cannot be re-enabled; create a new threshold notification to resume monitoring
|
|
330
|
+
- Uniqueness key handling: Set `release_uniqueness_key` : `true` to reuse the key in future threshold notifications
|
|
331
|
+
- Immediate effect: Threshold notification evaluation stops instantly across all customers
|
|
332
|
+
- Historical preservation: Archive operation maintains threshold notification history and configuration for compliance and auditing
|
|
335
333
|
|
|
336
334
|
### Resource `v1.plans`:
|
|
337
335
|
|
|
@@ -388,11 +386,11 @@ The following tools are available in this MCP server.
|
|
|
388
386
|
- Once a customer is archived, it cannot be unarchived.
|
|
389
387
|
- Archived customers can still be viewed through the API or the UI for audit purposes.
|
|
390
388
|
- Ingest aliases remain idempotent for archived customers. In order to reuse an ingest alias, first remove the ingest alias from the customer prior to archiving.
|
|
391
|
-
- Any
|
|
389
|
+
- Any notifications associated with the customer will no longer be triggered.
|
|
392
390
|
|
|
393
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.
|
|
394
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.
|
|
395
|
-
- `preview_events_v1_customers` (`write`): Preview how a set of events will affect a customer's
|
|
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.
|
|
396
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.
|
|
397
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.
|
|
398
396
|
|
|
@@ -400,6 +398,7 @@ The following tools are available in this MCP server.
|
|
|
400
398
|
|
|
401
399
|
- Add the initial configuration to an existing customer. Once created, the billing configuration can then be associated to the customer's contract.
|
|
402
400
|
- Add a new configuration to an existing customer. This might be used as part of an upgrade or downgrade workflow where the customer was previously billed through system A (e.g. Stripe) but will now be billed through system B (e.g. AWS). Once created, the new configuration can then be associated to the customer's contract.
|
|
401
|
+
- Multiple configurations can be added per destination. For example, you can create two Stripe billing configurations for a Metronome customer that each have a distinct `collection_method`.
|
|
403
402
|
|
|
404
403
|
### Delivery method options:
|
|
405
404
|
|
|
@@ -429,13 +428,16 @@ The following tools are available in this MCP server.
|
|
|
429
428
|
|
|
430
429
|
### Resource `v1.customers.alerts`:
|
|
431
430
|
|
|
432
|
-
- `retrieve_customers_v1_alerts` (`write`): Retrieve the real-time evaluation status for a specific
|
|
431
|
+
- `retrieve_customers_v1_alerts` (`write`): Retrieve the real-time evaluation status for a specific threshold notification-customer pair. This endpoint provides instant visibility into whether a customer has triggered a threshold notification condition, enabling you to monitor account health and take proactive action based on current threshold notification states.
|
|
433
432
|
|
|
434
433
|
### Use this endpoint to:
|
|
435
434
|
|
|
436
|
-
- Check if a specific customer is currently violating an
|
|
437
|
-
- Verify
|
|
438
|
-
-
|
|
435
|
+
- Check if a specific customer is currently violating an threshold notification (`in_alarm` status)
|
|
436
|
+
- Verify threshold notification configuration details and threshold values for a customer
|
|
437
|
+
- Monitor the evaluation state of newly created or recently modified threshold notification
|
|
438
|
+
- Build dashboards or automated workflows that respond to specific threshold notification conditions
|
|
439
|
+
- Validate threshold notification behavior before deploying to production customers
|
|
440
|
+
- Integrate threshold notification status checks into customer support tools or admin interfaces
|
|
439
441
|
|
|
440
442
|
### Key response fields:
|
|
441
443
|
|
|
@@ -444,59 +446,63 @@ The following tools are available in this MCP server.
|
|
|
444
446
|
- `customer_status`: The current evaluation state
|
|
445
447
|
|
|
446
448
|
- `ok` - Customer is within acceptable thresholds
|
|
447
|
-
- `in_alarm
|
|
448
|
-
- `evaluating` -
|
|
449
|
-
- `null` -
|
|
450
|
-
- `triggered_by`: Additional context about what caused the
|
|
451
|
-
- alert: Complete
|
|
452
|
-
-
|
|
449
|
+
- `in_alarm` - Customer has breached the threshold for the notification
|
|
450
|
+
- `evaluating` - Notification is currently being evaluated (typically during initial setup)
|
|
451
|
+
- `null` - Notification has been archived
|
|
452
|
+
- `triggered_by`: Additional context about what caused the notification to trigger (when applicable)
|
|
453
|
+
- alert: Complete threshold notification configuration including:
|
|
454
|
+
- Notification ID, name, and type
|
|
453
455
|
- Current threshold values and credit type information
|
|
454
|
-
-
|
|
456
|
+
- Notification status (enabled, disabled, or archived)
|
|
455
457
|
- Last update timestamp
|
|
456
458
|
- Any applied filters (credit grant types, custom fields, group values)
|
|
457
459
|
|
|
458
460
|
### Usage guidelines:
|
|
459
461
|
|
|
460
|
-
- Customer status: Returns the current evaluation state, not historical data. For
|
|
461
|
-
-
|
|
462
|
-
-
|
|
463
|
-
-
|
|
462
|
+
- Customer status: Returns the current evaluation state, not historical data. For threshold notification history, use webhook notifications or event logs
|
|
463
|
+
- Required parameters: Both customer_id and alert_id must be valid UUIDs that exist in your organization
|
|
464
|
+
- Archived notifications: Returns null for customer_status if the notification has been archived, but still includes the notification configuration details
|
|
465
|
+
- Performance considerations: This endpoint queries live evaluation state, making it ideal for real-time monitoring but not for bulk status checks
|
|
466
|
+
- Integration patterns: Best used for on-demand status checks in response to user actions or as part of targeted monitoring workflows
|
|
467
|
+
- Error handling: Returns 404 if either the customer or alert_id doesn't exist or isn't accessible to your organization
|
|
464
468
|
|
|
465
|
-
- `list_customers_v1_alerts` (`write`): Retrieve all
|
|
469
|
+
- `list_customers_v1_alerts` (`write`): Retrieve 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.
|
|
466
470
|
|
|
467
471
|
### Use this endpoint to:
|
|
468
472
|
|
|
469
|
-
- Display all active
|
|
470
|
-
- Quickly identify which
|
|
471
|
-
- Audit
|
|
472
|
-
- Filter
|
|
473
|
+
- Display all active threshold notifications for a customer in dashboards or admin panels
|
|
474
|
+
- Quickly identify which threshold notifications a customer is currently triggering
|
|
475
|
+
- Audit threshold notification coverage for specific accounts
|
|
476
|
+
- Filter threshold notifications by status (enabled, disabled, or archived)
|
|
473
477
|
|
|
474
478
|
### Key response fields:
|
|
475
479
|
|
|
476
480
|
- data: Array of CustomerAlert objects, each containing:
|
|
477
481
|
- Current evaluation status (`ok`, `in_alarm`, `evaluating`, or `null`)
|
|
478
|
-
- Complete
|
|
479
|
-
-
|
|
480
|
-
-
|
|
482
|
+
- Complete threshold notification configuration and threshold details
|
|
483
|
+
- Threshold notification metadata including type, name, and last update time
|
|
484
|
+
- next_page: Pagination cursor for retrieving additional results
|
|
481
485
|
|
|
482
486
|
### Usage guidelines:
|
|
483
487
|
|
|
484
|
-
- Default behavior: Returns only enabled
|
|
485
|
-
- Pagination: Use the `next_page` cursor to retrieve all results for customers with many
|
|
488
|
+
- Default behavior: Returns only enabled threshold notifications unless `alert_statuses` filter is specified
|
|
489
|
+
- Pagination: Use the `next_page` cursor to retrieve all results for customers with many notifications
|
|
490
|
+
- Performance: Efficiently retrieves multiple threshold notification statuses in a single request instead of making individual calls
|
|
491
|
+
- Filtering: Pass the `alert_statuses` array to include disabled or archived threshold notifications in results
|
|
486
492
|
|
|
487
|
-
- `reset_customers_v1_alerts` (`write`): Force an immediate re-evaluation of a specific
|
|
493
|
+
- `reset_customers_v1_alerts` (`write`): Force an immediate re-evaluation of a specific threshold notification for a customer, clearing any previous state and triggering a fresh assessment against current thresholds. This endpoint ensures threshold notification accuracy after configuration changes or data corrections.
|
|
488
494
|
|
|
489
495
|
### Use this endpoint to:
|
|
490
496
|
|
|
491
|
-
- Clear false positive
|
|
492
|
-
- Re-evaluate
|
|
493
|
-
- Test
|
|
494
|
-
- Resolve stuck
|
|
497
|
+
- Clear false positive threshold notifications after fixing data issues
|
|
498
|
+
- Re-evaluate threshold notifications after adjusting customer balances or credits
|
|
499
|
+
- Test threshold notification behavior during development and debugging
|
|
500
|
+
- Resolve stuck threshold notification that may be in an incorrect state
|
|
495
501
|
- Trigger immediate evaluation after threshold modifications
|
|
496
502
|
|
|
497
503
|
### Key response fields:
|
|
498
504
|
|
|
499
|
-
- 200 Success: Confirmation that the
|
|
505
|
+
- 200 Success: Confirmation that the threshold notification has been reset and re-evaluation initiated
|
|
500
506
|
- No response body is returned - the operation completes asynchronously
|
|
501
507
|
|
|
502
508
|
### Usage guidelines:
|
|
@@ -610,6 +616,26 @@ The following tools are available in this MCP server.
|
|
|
610
616
|
- Backdated usage: If usage events arrive after invoice finalization, breakdowns will reflect the updated usage
|
|
611
617
|
- Zero quantity filtering: Use `skip_zero_qty_line_items=true` to exclude periods with no usage
|
|
612
618
|
|
|
619
|
+
- `retrieve_pdf_customers_v1_invoices` (`read`): Retrieve a PDF version of a specific invoice by its unique identifier. This endpoint generates a professionally formatted invoice document suitable for sharing with customers, accounting teams, or for record-keeping purposes.
|
|
620
|
+
|
|
621
|
+
### Use this endpoint to:
|
|
622
|
+
|
|
623
|
+
- Provide customers with downloadable or emailable copies of their invoices
|
|
624
|
+
- Support accounting and finance teams with official billing documents
|
|
625
|
+
- Maintain accurate records of billing transactions for audits and compliance
|
|
626
|
+
|
|
627
|
+
### Key response details:
|
|
628
|
+
|
|
629
|
+
- The response is a binary PDF file representing the full invoice
|
|
630
|
+
- The PDF includes all standard invoice information such as line items, totals, billing period, and customer details
|
|
631
|
+
- The document is formatted for clarity and professionalism, suitable for official use
|
|
632
|
+
|
|
633
|
+
### Usage guidelines:
|
|
634
|
+
|
|
635
|
+
- Ensure the `invoice_id` corresponds to an existing invoice for the specified `customer_id`
|
|
636
|
+
- The PDF is generated on-demand; frequent requests for the same invoice may impact performance
|
|
637
|
+
- Use appropriate headers to handle the binary response in your application (e.g., setting `Content-Type: application/pdf`)
|
|
638
|
+
|
|
613
639
|
### Resource `v1.customers.billing_config`:
|
|
614
640
|
|
|
615
641
|
- `create_customers_v1_billing_config` (`write`): Set the billing configuration for a given customer.
|
|
@@ -845,7 +871,7 @@ The following tools are available in this MCP server.
|
|
|
845
871
|
- Pagination: Use `next_page` cursor to retrieve large datasets
|
|
846
872
|
- Null values: Group values may be null when no usage matches that group
|
|
847
873
|
|
|
848
|
-
- `ingest_v1_usage` (`write`): The ingest endpoint is the primary method for sending usage events to Metronome, serving as the foundation for all billing calculations in your usage-based pricing model. This high-throughput endpoint is designed for real-time streaming ingestion, supports backdating 34 days, and is built to handle mission-critical usage data with enterprise-grade reliability. Metronome supports 100,000 events per second without requiring pre-aggregation or rollups and can scale up from there. See [
|
|
874
|
+
- `ingest_v1_usage` (`write`): The ingest endpoint is the primary method for sending usage events to Metronome, serving as the foundation for all billing calculations in your usage-based pricing model. This high-throughput endpoint is designed for real-time streaming ingestion, supports backdating 34 days, and is built to handle mission-critical usage data with enterprise-grade reliability. Metronome supports 100,000 events per second without requiring pre-aggregation or rollups and can scale up from there. See the [Send usage events](/guides/events/send-usage-events) guide to learn more about usage events.
|
|
849
875
|
|
|
850
876
|
### Use this endpoint to:
|
|
851
877
|
|
|
@@ -881,6 +907,8 @@ The following tools are available in this MCP server.
|
|
|
881
907
|
}
|
|
882
908
|
```
|
|
883
909
|
|
|
910
|
+
Learn more about [usage event structure definitions](/guides/events/design-usage-events).
|
|
911
|
+
|
|
884
912
|
#### Transaction ID
|
|
885
913
|
|
|
886
914
|
The transaction_id serves as your idempotency key, ensuring events are processed exactly once. Metronome maintains a 34-day deduplication window - significantly longer than typical 12-hour windows - enabling robust backfill scenarios without duplicate billing.
|
|
@@ -1222,7 +1250,7 @@ The following tools are available in this MCP server.
|
|
|
1222
1250
|
|
|
1223
1251
|
To use usage filters, the `group_key` must be defined on the billable metrics underlying the rate card on the contracts.
|
|
1224
1252
|
|
|
1225
|
-
- `update_end_date_v1_contracts` (`write`): Update or
|
|
1253
|
+
- `update_end_date_v1_contracts` (`write`): Update or add an end date to a contract. Ending a contract early will impact draft usage statements, truncate any terms, and remove upcoming scheduled invoices. Moving the date into the future will only extend the contract length. Terms and scheduled invoices are not extended. In-advance subscriptions will not be extended. Use this if a contract's end date has changed or if a perpetual contract ends.
|
|
1226
1254
|
|
|
1227
1255
|
### Resource `v1.contracts.products`:
|
|
1228
1256
|
|
|
@@ -1320,3 +1348,17 @@ The following tools are available in this MCP server.
|
|
|
1320
1348
|
|
|
1321
1349
|
- `retrieve_contracts_v1_named_schedules` (`write`): Get a named schedule for the given rate card. This endpoint's availability is dependent on your client's configuration.
|
|
1322
1350
|
- `update_contracts_v1_named_schedules` (`write`): Update a named schedule for the given rate card. This endpoint's availability is dependent on your client's configuration.
|
|
1351
|
+
|
|
1352
|
+
### Resource `v1.payments`:
|
|
1353
|
+
|
|
1354
|
+
- `list_v1_payments` (`write`): Fetch all payment attempts for the given invoice.
|
|
1355
|
+
- `attempt_v1_payments` (`write`): Trigger a new attempt by canceling any existing attempts for this invoice and creating a new Payment. This will trigger another attempt to charge the Customer's configured Payment Gateway.
|
|
1356
|
+
Payment can only be attempted if all of the following are true:
|
|
1357
|
+
|
|
1358
|
+
- The Metronome Invoice is finalized
|
|
1359
|
+
- PLG Invoicing is configured for the Customer
|
|
1360
|
+
- You cannot attempt payments for invoices that have already been `paid` or `voided`.
|
|
1361
|
+
|
|
1362
|
+
Attempting to payment on an ineligible Invoice or Customer will result in a `400` response.
|
|
1363
|
+
|
|
1364
|
+
- `cancel_v1_payments` (`write`): Cancel an existing payment attempt for an invoice.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Metadata } from "./tools/types.mjs";
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
export declare const metadata: Metadata;
|
|
4
|
+
export declare const tool: Tool;
|
|
5
|
+
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
metadata: Metadata;
|
|
8
|
+
tool: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
name: string;
|
|
11
|
+
inputSchema: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
type: "object";
|
|
14
|
+
properties?: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
} | undefined;
|
|
17
|
+
required?: string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
outputSchema?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
type: "object";
|
|
24
|
+
properties?: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
} | undefined;
|
|
27
|
+
required?: string[] | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
annotations?: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
readOnlyHint?: boolean | undefined;
|
|
33
|
+
destructiveHint?: boolean | undefined;
|
|
34
|
+
idempotentHint?: boolean | undefined;
|
|
35
|
+
openWorldHint?: boolean | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
_meta?: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
44
|
+
//# sourceMappingURL=docs-search-tool.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Metadata } from "./tools/types.js";
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
export declare const metadata: Metadata;
|
|
4
|
+
export declare const tool: Tool;
|
|
5
|
+
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
metadata: Metadata;
|
|
8
|
+
tool: {
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
name: string;
|
|
11
|
+
inputSchema: {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
type: "object";
|
|
14
|
+
properties?: {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
} | undefined;
|
|
17
|
+
required?: string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
outputSchema?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
type: "object";
|
|
24
|
+
properties?: {
|
|
25
|
+
[x: string]: unknown;
|
|
26
|
+
} | undefined;
|
|
27
|
+
required?: string[] | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
annotations?: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
readOnlyHint?: boolean | undefined;
|
|
33
|
+
destructiveHint?: boolean | undefined;
|
|
34
|
+
idempotentHint?: boolean | undefined;
|
|
35
|
+
openWorldHint?: boolean | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
_meta?: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
44
|
+
//# sourceMappingURL=docs-search-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAsBlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const types_1 = require("./tools/types.js");
|
|
6
|
+
exports.metadata = {
|
|
7
|
+
resource: 'all',
|
|
8
|
+
operation: 'read',
|
|
9
|
+
tags: [],
|
|
10
|
+
httpMethod: 'get',
|
|
11
|
+
};
|
|
12
|
+
exports.tool = {
|
|
13
|
+
name: 'search_docs',
|
|
14
|
+
description: 'Search for documentation for how to use the client to interact with the API.\nThe tool will return an array of Markdown-formatted documentation pages.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
query: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'The query to search for.',
|
|
21
|
+
},
|
|
22
|
+
language: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'The language for the SDK to search for.',
|
|
25
|
+
enum: ['http', 'python', 'go', 'typescript', 'terraform', 'ruby', 'java', 'kotlin'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ['query', 'language'],
|
|
29
|
+
},
|
|
30
|
+
annotations: {
|
|
31
|
+
readOnlyHint: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
const docsSearchURL = process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/metronome/docs/search';
|
|
35
|
+
const handler = async (_, args) => {
|
|
36
|
+
const body = args;
|
|
37
|
+
const query = new URLSearchParams(body).toString();
|
|
38
|
+
const result = await fetch(`${docsSearchURL}?${query}`);
|
|
39
|
+
return (0, types_1.asTextContentResult)(await result.json());
|
|
40
|
+
};
|
|
41
|
+
exports.handler = handler;
|
|
42
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
43
|
+
//# sourceMappingURL=docs-search-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4CAA8D;AAIjD,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,wJAAwJ;IAC1J,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;aACpF;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;KAChC;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,aAAa,GACjB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,8DAA8D,CAAC;AAE5F,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAyC,EAAE,EAAE;IACrF,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,aAAa,IAAI,KAAK,EAAE,CAAC,CAAC;IACxD,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { asTextContentResult } from "./tools/types.mjs";
|
|
3
|
+
export const metadata = {
|
|
4
|
+
resource: 'all',
|
|
5
|
+
operation: 'read',
|
|
6
|
+
tags: [],
|
|
7
|
+
httpMethod: 'get',
|
|
8
|
+
};
|
|
9
|
+
export const tool = {
|
|
10
|
+
name: 'search_docs',
|
|
11
|
+
description: 'Search for documentation for how to use the client to interact with the API.\nThe tool will return an array of Markdown-formatted documentation pages.',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
query: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'The query to search for.',
|
|
18
|
+
},
|
|
19
|
+
language: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'The language for the SDK to search for.',
|
|
22
|
+
enum: ['http', 'python', 'go', 'typescript', 'terraform', 'ruby', 'java', 'kotlin'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['query', 'language'],
|
|
26
|
+
},
|
|
27
|
+
annotations: {
|
|
28
|
+
readOnlyHint: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const docsSearchURL = process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/metronome/docs/search';
|
|
32
|
+
export const handler = async (_, args) => {
|
|
33
|
+
const body = args;
|
|
34
|
+
const query = new URLSearchParams(body).toString();
|
|
35
|
+
const result = await fetch(`${docsSearchURL}?${query}`);
|
|
36
|
+
return asTextContentResult(await result.json());
|
|
37
|
+
};
|
|
38
|
+
export default { metadata, tool, handler };
|
|
39
|
+
//# sourceMappingURL=docs-search-tool.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.mjs","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE;AAIxC,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,wJAAwJ;IAC1J,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;aACpF;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;KAChC;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,aAAa,GACjB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,8DAA8D,CAAC;AAEnG,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAyC,EAAE,EAAE;IACrF,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,aAAa,IAAI,KAAK,EAAE,CAAC,CAAC;IACxD,OAAO,mBAAmB,CAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
package/options.d.mts
CHANGED
|
@@ -11,6 +11,7 @@ export type McpOptions = {
|
|
|
11
11
|
includeDynamicTools?: boolean | undefined;
|
|
12
12
|
includeAllTools?: boolean | undefined;
|
|
13
13
|
includeCodeTools?: boolean | undefined;
|
|
14
|
+
includeDocsTools?: boolean | undefined;
|
|
14
15
|
filters?: Filter[] | undefined;
|
|
15
16
|
capabilities?: Partial<ClientCapabilities> | undefined;
|
|
16
17
|
};
|
package/options.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.mts","sourceRoot":"","sources":["src/options.ts"],"names":[],"mappings":"OAIO,EAAa,MAAM,EAAE;OACrB,EAAE,kBAAkB,EAAgB,UAAU,EAAE;AAEvD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CACxD,CAAC;AA+BF,wBAAgB,eAAe,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"options.d.mts","sourceRoot":"","sources":["src/options.ts"],"names":[],"mappings":"OAIO,EAAa,MAAM,EAAE;OACrB,EAAE,kBAAkB,EAAgB,UAAU,EAAE;AAEvD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CACxD,CAAC;AA+BF,wBAAgB,eAAe,IAAI,UAAU,CA6N5C;AA+BD,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CA2FxF"}
|
package/options.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type McpOptions = {
|
|
|
11
11
|
includeDynamicTools?: boolean | undefined;
|
|
12
12
|
includeAllTools?: boolean | undefined;
|
|
13
13
|
includeCodeTools?: boolean | undefined;
|
|
14
|
+
includeDocsTools?: boolean | undefined;
|
|
14
15
|
filters?: Filter[] | undefined;
|
|
15
16
|
capabilities?: Partial<ClientCapabilities> | undefined;
|
|
16
17
|
};
|
package/options.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["src/options.ts"],"names":[],"mappings":"OAIO,EAAa,MAAM,EAAE;OACrB,EAAE,kBAAkB,EAAgB,UAAU,EAAE;AAEvD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CACxD,CAAC;AA+BF,wBAAgB,eAAe,IAAI,UAAU,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["src/options.ts"],"names":[],"mappings":"OAIO,EAAa,MAAM,EAAE;OACrB,EAAE,kBAAkB,EAAgB,UAAU,EAAE;AAEvD,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1C,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;CACxD,CAAC;AA+BF,wBAAgB,eAAe,IAAI,UAAU,CA6N5C;AA+BD,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,CA2FxF"}
|
package/options.js
CHANGED
|
@@ -41,13 +41,13 @@ function parseCLIOptions() {
|
|
|
41
41
|
.option('tools', {
|
|
42
42
|
type: 'string',
|
|
43
43
|
array: true,
|
|
44
|
-
choices: ['dynamic', 'all', 'code'],
|
|
44
|
+
choices: ['dynamic', 'all', 'code', 'docs'],
|
|
45
45
|
description: 'Use dynamic tools or all tools',
|
|
46
46
|
})
|
|
47
47
|
.option('no-tools', {
|
|
48
48
|
type: 'string',
|
|
49
49
|
array: true,
|
|
50
|
-
choices: ['dynamic', 'all', 'code'],
|
|
50
|
+
choices: ['dynamic', 'all', 'code', 'docs'],
|
|
51
51
|
description: 'Do not use any dynamic or all tools',
|
|
52
52
|
})
|
|
53
53
|
.option('tool', {
|
|
@@ -225,11 +225,13 @@ function parseCLIOptions() {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
const shouldIncludeToolType = (toolType) =>
|
|
229
|
-
|
|
228
|
+
const shouldIncludeToolType = (toolType) => argv.noTools?.includes(toolType) ? false
|
|
229
|
+
: argv.tools?.includes(toolType) ? true
|
|
230
|
+
: undefined;
|
|
230
231
|
const includeDynamicTools = shouldIncludeToolType('dynamic');
|
|
231
232
|
const includeAllTools = shouldIncludeToolType('all');
|
|
232
233
|
const includeCodeTools = shouldIncludeToolType('code');
|
|
234
|
+
const includeDocsTools = shouldIncludeToolType('docs');
|
|
233
235
|
const transport = argv.transport;
|
|
234
236
|
const client = argv.client;
|
|
235
237
|
return {
|
|
@@ -237,6 +239,7 @@ function parseCLIOptions() {
|
|
|
237
239
|
includeDynamicTools,
|
|
238
240
|
includeAllTools,
|
|
239
241
|
includeCodeTools,
|
|
242
|
+
includeDocsTools,
|
|
240
243
|
filters,
|
|
241
244
|
capabilities: clientCapabilities,
|
|
242
245
|
list: argv.list || false,
|
|
@@ -249,8 +252,8 @@ const coerceArray = (zodType) => zod_1.default.preprocess((val) => Array.isArray
|
|
|
249
252
|
: val ? [val]
|
|
250
253
|
: val, zod_1.default.array(zodType).optional());
|
|
251
254
|
const QueryOptions = zod_1.default.object({
|
|
252
|
-
tools: coerceArray(zod_1.default.enum(['dynamic', 'all'])).describe('Use dynamic tools or all tools'),
|
|
253
|
-
no_tools: coerceArray(zod_1.default.enum(['dynamic', 'all'])).describe('Do not use dynamic tools or all tools'),
|
|
255
|
+
tools: coerceArray(zod_1.default.enum(['dynamic', 'all', 'docs'])).describe('Use dynamic tools or all tools'),
|
|
256
|
+
no_tools: coerceArray(zod_1.default.enum(['dynamic', 'all', 'docs'])).describe('Do not use dynamic tools or all tools'),
|
|
254
257
|
tool: coerceArray(zod_1.default.string()).describe('Include tools matching the specified names'),
|
|
255
258
|
resource: coerceArray(zod_1.default.string()).describe('Include tools matching the specified resources'),
|
|
256
259
|
operation: coerceArray(zod_1.default.enum(['read', 'write'])).describe('Include tools matching the specified operations'),
|
|
@@ -340,11 +343,15 @@ function parseQueryOptions(defaultOptions, query) {
|
|
|
340
343
|
let allTools = queryOptions.no_tools && queryOptions.no_tools?.includes('all') ? false
|
|
341
344
|
: queryOptions.tools?.includes('all') ? true
|
|
342
345
|
: defaultOptions.includeAllTools;
|
|
346
|
+
let docsTools = queryOptions.no_tools && queryOptions.no_tools?.includes('docs') ? false
|
|
347
|
+
: queryOptions.tools?.includes('docs') ? true
|
|
348
|
+
: defaultOptions.includeDocsTools;
|
|
343
349
|
return {
|
|
344
350
|
client: queryOptions.client ?? defaultOptions.client,
|
|
345
351
|
includeDynamicTools: dynamicTools,
|
|
346
352
|
includeAllTools: allTools,
|
|
347
353
|
includeCodeTools: undefined,
|
|
354
|
+
includeDocsTools: docsTools,
|
|
348
355
|
filters,
|
|
349
356
|
capabilities: clientCapabilities,
|
|
350
357
|
};
|