@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.
Files changed (466) hide show
  1. package/README.md +97 -55
  2. package/docs-search-tool.d.mts +44 -0
  3. package/docs-search-tool.d.mts.map +1 -0
  4. package/docs-search-tool.d.ts +44 -0
  5. package/docs-search-tool.d.ts.map +1 -0
  6. package/docs-search-tool.js +43 -0
  7. package/docs-search-tool.js.map +1 -0
  8. package/docs-search-tool.mjs +39 -0
  9. package/docs-search-tool.mjs.map +1 -0
  10. package/options.d.mts +1 -0
  11. package/options.d.mts.map +1 -1
  12. package/options.d.ts +1 -0
  13. package/options.d.ts.map +1 -1
  14. package/options.js +13 -6
  15. package/options.js.map +1 -1
  16. package/options.mjs +13 -6
  17. package/options.mjs.map +1 -1
  18. package/package.json +12 -2
  19. package/server.d.mts.map +1 -1
  20. package/server.d.ts.map +1 -1
  21. package/server.js +8 -4
  22. package/server.js.map +1 -1
  23. package/server.mjs +8 -4
  24. package/server.mjs.map +1 -1
  25. package/src/docs-search-tool.ts +48 -0
  26. package/src/options.ts +17 -7
  27. package/src/server.ts +8 -5
  28. package/src/tools/index.ts +8 -0
  29. package/src/tools/v1/alerts/archive-v1-alerts.ts +3 -3
  30. package/src/tools/v1/alerts/create-v1-alerts.ts +14 -13
  31. package/src/tools/v1/audit-logs/list-v1-audit-logs.ts +1 -1
  32. package/src/tools/v1/billable-metrics/archive-v1-billable-metrics.ts +1 -1
  33. package/src/tools/v1/billable-metrics/create-v1-billable-metrics.ts +1 -1
  34. package/src/tools/v1/billable-metrics/list-v1-billable-metrics.ts +1 -1
  35. package/src/tools/v1/billable-metrics/retrieve-v1-billable-metrics.ts +1 -1
  36. package/src/tools/v1/contracts/amend-v1-contracts.ts +1 -1
  37. package/src/tools/v1/contracts/archive-v1-contracts.ts +1 -1
  38. package/src/tools/v1/contracts/create-v1-contracts.ts +24 -3
  39. package/src/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.ts +1 -1
  40. package/src/tools/v1/contracts/products/archive-contracts-v1-products.ts +1 -1
  41. package/src/tools/v1/contracts/products/create-contracts-v1-products.ts +1 -1
  42. package/src/tools/v1/contracts/products/list-contracts-v1-products.ts +1 -1
  43. package/src/tools/v1/contracts/products/retrieve-contracts-v1-products.ts +1 -1
  44. package/src/tools/v1/contracts/products/update-contracts-v1-products.ts +1 -1
  45. package/src/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.ts +1 -1
  46. package/src/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.ts +1 -1
  47. package/src/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.ts +1 -1
  48. package/src/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.ts +1 -1
  49. package/src/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.ts +1 -1
  50. package/src/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.ts +1 -1
  51. package/src/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.ts +1 -1
  52. package/src/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.ts +1 -1
  53. package/src/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.ts +1 -1
  54. package/src/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.ts +1 -1
  55. package/src/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.ts +1 -1
  56. package/src/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.ts +1 -1
  57. package/src/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.ts +1 -1
  58. package/src/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.ts +1 -1
  59. package/src/tools/v1/contracts/update-end-date-v1-contracts.ts +1 -1
  60. package/src/tools/v1/credit-grants/create-v1-credit-grants.ts +1 -1
  61. package/src/tools/v1/credit-grants/edit-v1-credit-grants.ts +1 -1
  62. package/src/tools/v1/credit-grants/list-entries-v1-credit-grants.ts +1 -1
  63. package/src/tools/v1/credit-grants/list-v1-credit-grants.ts +1 -1
  64. package/src/tools/v1/credit-grants/void-v1-credit-grants.ts +1 -1
  65. package/src/tools/v1/custom-fields/list-keys-v1-custom-fields.ts +1 -1
  66. package/src/tools/v1/customers/alerts/list-customers-v1-alerts.ts +3 -2
  67. package/src/tools/v1/customers/alerts/reset-customers-v1-alerts.ts +2 -2
  68. package/src/tools/v1/customers/alerts/retrieve-customers-v1-alerts.ts +7 -14
  69. package/src/tools/v1/customers/archive-v1-customers.ts +1 -1
  70. package/src/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.ts +1 -1
  71. package/src/tools/v1/customers/commits/update-end-date-customers-v1-commits.ts +1 -1
  72. package/src/tools/v1/customers/create-v1-customers.ts +1 -1
  73. package/src/tools/v1/customers/credits/create-customers-v1-credits.ts +1 -1
  74. package/src/tools/v1/customers/credits/update-end-date-customers-v1-credits.ts +1 -1
  75. package/src/tools/v1/customers/invoices/add-charge-customers-v1-invoices.ts +1 -1
  76. package/src/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.ts +43 -0
  77. package/src/tools/v1/customers/list-billable-metrics-v1-customers.ts +1 -1
  78. package/src/tools/v1/customers/list-costs-v1-customers.ts +1 -1
  79. package/src/tools/v1/customers/list-v1-customers.ts +1 -1
  80. package/src/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.ts +1 -1
  81. package/src/tools/v1/customers/plans/add-customers-v1-plans.ts +1 -1
  82. package/src/tools/v1/customers/plans/end-customers-v1-plans.ts +1 -1
  83. package/src/tools/v1/customers/plans/list-customers-v1-plans.ts +1 -1
  84. package/src/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.ts +1 -1
  85. package/src/tools/v1/customers/preview-events-v1-customers.ts +2 -7
  86. package/src/tools/v1/customers/retrieve-billing-configurations-v1-customers.ts +1 -1
  87. package/src/tools/v1/customers/retrieve-v1-customers.ts +1 -1
  88. package/src/tools/v1/customers/set-billing-configurations-v1-customers.ts +1 -1
  89. package/src/tools/v1/customers/set-name-v1-customers.ts +1 -1
  90. package/src/tools/v1/dashboards/get-embeddable-url-v1-dashboards.ts +1 -1
  91. package/src/tools/v1/invoices/regenerate-v1-invoices.ts +1 -1
  92. package/src/tools/v1/invoices/void-v1-invoices.ts +1 -1
  93. package/src/tools/v1/payments/attempt-v1-payments.ts +48 -0
  94. package/src/tools/v1/payments/cancel-v1-payments.ts +48 -0
  95. package/src/tools/v1/payments/list-v1-payments.ts +69 -0
  96. package/src/tools/v1/plans/get-details-v1-plans.ts +1 -1
  97. package/src/tools/v1/plans/list-charges-v1-plans.ts +1 -1
  98. package/src/tools/v1/plans/list-customers-v1-plans.ts +1 -1
  99. package/src/tools/v1/plans/list-v1-plans.ts +1 -1
  100. package/src/tools/v1/pricing-units/list-v1-pricing-units.ts +1 -1
  101. package/src/tools/v1/services/list-v1-services.ts +1 -1
  102. package/src/tools/v1/usage/ingest-v1-usage.ts +1 -1
  103. package/src/tools/v1/usage/list-v1-usage.ts +1 -1
  104. package/src/tools/v1/usage/list-with-groups-v1-usage.ts +1 -1
  105. package/src/tools/v1/usage/search-v1-usage.ts +1 -1
  106. package/src/tools/v2/contracts/edit-commit-v2-contracts.ts +50 -1
  107. package/src/tools/v2/contracts/edit-credit-v2-contracts.ts +50 -1
  108. package/src/tools/v2/contracts/edit-v2-contracts.ts +60 -2
  109. package/tools/index.d.mts.map +1 -1
  110. package/tools/index.d.ts.map +1 -1
  111. package/tools/index.js +8 -0
  112. package/tools/index.js.map +1 -1
  113. package/tools/index.mjs +8 -0
  114. package/tools/index.mjs.map +1 -1
  115. package/tools/v1/alerts/archive-v1-alerts.js +3 -3
  116. package/tools/v1/alerts/archive-v1-alerts.js.map +1 -1
  117. package/tools/v1/alerts/archive-v1-alerts.mjs +3 -3
  118. package/tools/v1/alerts/archive-v1-alerts.mjs.map +1 -1
  119. package/tools/v1/alerts/create-v1-alerts.d.mts.map +1 -1
  120. package/tools/v1/alerts/create-v1-alerts.d.ts.map +1 -1
  121. package/tools/v1/alerts/create-v1-alerts.js +13 -13
  122. package/tools/v1/alerts/create-v1-alerts.js.map +1 -1
  123. package/tools/v1/alerts/create-v1-alerts.mjs +13 -13
  124. package/tools/v1/alerts/create-v1-alerts.mjs.map +1 -1
  125. package/tools/v1/audit-logs/list-v1-audit-logs.js +1 -1
  126. package/tools/v1/audit-logs/list-v1-audit-logs.js.map +1 -1
  127. package/tools/v1/audit-logs/list-v1-audit-logs.mjs +1 -1
  128. package/tools/v1/audit-logs/list-v1-audit-logs.mjs.map +1 -1
  129. package/tools/v1/billable-metrics/archive-v1-billable-metrics.js +1 -1
  130. package/tools/v1/billable-metrics/archive-v1-billable-metrics.js.map +1 -1
  131. package/tools/v1/billable-metrics/archive-v1-billable-metrics.mjs +1 -1
  132. package/tools/v1/billable-metrics/archive-v1-billable-metrics.mjs.map +1 -1
  133. package/tools/v1/billable-metrics/create-v1-billable-metrics.js +1 -1
  134. package/tools/v1/billable-metrics/create-v1-billable-metrics.js.map +1 -1
  135. package/tools/v1/billable-metrics/create-v1-billable-metrics.mjs +1 -1
  136. package/tools/v1/billable-metrics/create-v1-billable-metrics.mjs.map +1 -1
  137. package/tools/v1/billable-metrics/list-v1-billable-metrics.js +1 -1
  138. package/tools/v1/billable-metrics/list-v1-billable-metrics.js.map +1 -1
  139. package/tools/v1/billable-metrics/list-v1-billable-metrics.mjs +1 -1
  140. package/tools/v1/billable-metrics/list-v1-billable-metrics.mjs.map +1 -1
  141. package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.js +1 -1
  142. package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.js.map +1 -1
  143. package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.mjs +1 -1
  144. package/tools/v1/billable-metrics/retrieve-v1-billable-metrics.mjs.map +1 -1
  145. package/tools/v1/contracts/amend-v1-contracts.js +1 -1
  146. package/tools/v1/contracts/amend-v1-contracts.js.map +1 -1
  147. package/tools/v1/contracts/amend-v1-contracts.mjs +1 -1
  148. package/tools/v1/contracts/amend-v1-contracts.mjs.map +1 -1
  149. package/tools/v1/contracts/archive-v1-contracts.js +1 -1
  150. package/tools/v1/contracts/archive-v1-contracts.js.map +1 -1
  151. package/tools/v1/contracts/archive-v1-contracts.mjs +1 -1
  152. package/tools/v1/contracts/archive-v1-contracts.mjs.map +1 -1
  153. package/tools/v1/contracts/create-v1-contracts.d.mts.map +1 -1
  154. package/tools/v1/contracts/create-v1-contracts.d.ts.map +1 -1
  155. package/tools/v1/contracts/create-v1-contracts.js +22 -3
  156. package/tools/v1/contracts/create-v1-contracts.js.map +1 -1
  157. package/tools/v1/contracts/create-v1-contracts.mjs +22 -3
  158. package/tools/v1/contracts/create-v1-contracts.mjs.map +1 -1
  159. package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.js +1 -1
  160. package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.js.map +1 -1
  161. package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.mjs +1 -1
  162. package/tools/v1/contracts/named-schedules/retrieve-contracts-v1-named-schedules.mjs.map +1 -1
  163. package/tools/v1/contracts/products/archive-contracts-v1-products.js +1 -1
  164. package/tools/v1/contracts/products/archive-contracts-v1-products.js.map +1 -1
  165. package/tools/v1/contracts/products/archive-contracts-v1-products.mjs +1 -1
  166. package/tools/v1/contracts/products/archive-contracts-v1-products.mjs.map +1 -1
  167. package/tools/v1/contracts/products/create-contracts-v1-products.js +1 -1
  168. package/tools/v1/contracts/products/create-contracts-v1-products.js.map +1 -1
  169. package/tools/v1/contracts/products/create-contracts-v1-products.mjs +1 -1
  170. package/tools/v1/contracts/products/create-contracts-v1-products.mjs.map +1 -1
  171. package/tools/v1/contracts/products/list-contracts-v1-products.js +1 -1
  172. package/tools/v1/contracts/products/list-contracts-v1-products.js.map +1 -1
  173. package/tools/v1/contracts/products/list-contracts-v1-products.mjs +1 -1
  174. package/tools/v1/contracts/products/list-contracts-v1-products.mjs.map +1 -1
  175. package/tools/v1/contracts/products/retrieve-contracts-v1-products.js +1 -1
  176. package/tools/v1/contracts/products/retrieve-contracts-v1-products.js.map +1 -1
  177. package/tools/v1/contracts/products/retrieve-contracts-v1-products.mjs +1 -1
  178. package/tools/v1/contracts/products/retrieve-contracts-v1-products.mjs.map +1 -1
  179. package/tools/v1/contracts/products/update-contracts-v1-products.js +1 -1
  180. package/tools/v1/contracts/products/update-contracts-v1-products.js.map +1 -1
  181. package/tools/v1/contracts/products/update-contracts-v1-products.mjs +1 -1
  182. package/tools/v1/contracts/products/update-contracts-v1-products.mjs.map +1 -1
  183. package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.js +1 -1
  184. package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.js.map +1 -1
  185. package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.mjs +1 -1
  186. package/tools/v1/contracts/rate-cards/archive-contracts-v1-rate-cards.mjs.map +1 -1
  187. package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.js +1 -1
  188. package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.js.map +1 -1
  189. package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.mjs +1 -1
  190. package/tools/v1/contracts/rate-cards/create-contracts-v1-rate-cards.mjs.map +1 -1
  191. package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.js +1 -1
  192. package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.js.map +1 -1
  193. package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.mjs +1 -1
  194. package/tools/v1/contracts/rate-cards/list-contracts-v1-rate-cards.mjs.map +1 -1
  195. package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.js +1 -1
  196. package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.js.map +1 -1
  197. package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.mjs +1 -1
  198. package/tools/v1/contracts/rate-cards/named-schedules/retrieve-rate-cards-contracts-v1-named-schedules.mjs.map +1 -1
  199. package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.js +1 -1
  200. package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.js.map +1 -1
  201. package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.mjs +1 -1
  202. package/tools/v1/contracts/rate-cards/product-orders/set-rate-cards-contracts-v1-product-orders.mjs.map +1 -1
  203. package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.js +1 -1
  204. package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.js.map +1 -1
  205. package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.mjs +1 -1
  206. package/tools/v1/contracts/rate-cards/product-orders/update-rate-cards-contracts-v1-product-orders.mjs.map +1 -1
  207. package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.js +1 -1
  208. package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.js.map +1 -1
  209. package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.mjs +1 -1
  210. package/tools/v1/contracts/rate-cards/rates/add-many-rate-cards-contracts-v1-rates.mjs.map +1 -1
  211. package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.js +1 -1
  212. package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.js.map +1 -1
  213. package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.mjs +1 -1
  214. package/tools/v1/contracts/rate-cards/rates/add-rate-cards-contracts-v1-rates.mjs.map +1 -1
  215. package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.js +1 -1
  216. package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.js.map +1 -1
  217. package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.mjs +1 -1
  218. package/tools/v1/contracts/rate-cards/rates/list-rate-cards-contracts-v1-rates.mjs.map +1 -1
  219. package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.js +1 -1
  220. package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.js.map +1 -1
  221. package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.mjs +1 -1
  222. package/tools/v1/contracts/rate-cards/retrieve-contracts-v1-rate-cards.mjs.map +1 -1
  223. package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.js +1 -1
  224. package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.js.map +1 -1
  225. package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.mjs +1 -1
  226. package/tools/v1/contracts/rate-cards/retrieve-rate-schedule-contracts-v1-rate-cards.mjs.map +1 -1
  227. package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.js +1 -1
  228. package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.js.map +1 -1
  229. package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.mjs +1 -1
  230. package/tools/v1/contracts/rate-cards/update-contracts-v1-rate-cards.mjs.map +1 -1
  231. package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.js +1 -1
  232. package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.js.map +1 -1
  233. package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.mjs +1 -1
  234. package/tools/v1/contracts/retrieve-rate-schedule-v1-contracts.mjs.map +1 -1
  235. package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.js +1 -1
  236. package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.js.map +1 -1
  237. package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.mjs +1 -1
  238. package/tools/v1/contracts/retrieve-subscription-quantity-history-v1-contracts.mjs.map +1 -1
  239. package/tools/v1/contracts/update-end-date-v1-contracts.js +1 -1
  240. package/tools/v1/contracts/update-end-date-v1-contracts.js.map +1 -1
  241. package/tools/v1/contracts/update-end-date-v1-contracts.mjs +1 -1
  242. package/tools/v1/contracts/update-end-date-v1-contracts.mjs.map +1 -1
  243. package/tools/v1/credit-grants/create-v1-credit-grants.js +1 -1
  244. package/tools/v1/credit-grants/create-v1-credit-grants.js.map +1 -1
  245. package/tools/v1/credit-grants/create-v1-credit-grants.mjs +1 -1
  246. package/tools/v1/credit-grants/create-v1-credit-grants.mjs.map +1 -1
  247. package/tools/v1/credit-grants/edit-v1-credit-grants.js +1 -1
  248. package/tools/v1/credit-grants/edit-v1-credit-grants.js.map +1 -1
  249. package/tools/v1/credit-grants/edit-v1-credit-grants.mjs +1 -1
  250. package/tools/v1/credit-grants/edit-v1-credit-grants.mjs.map +1 -1
  251. package/tools/v1/credit-grants/list-entries-v1-credit-grants.js +1 -1
  252. package/tools/v1/credit-grants/list-entries-v1-credit-grants.js.map +1 -1
  253. package/tools/v1/credit-grants/list-entries-v1-credit-grants.mjs +1 -1
  254. package/tools/v1/credit-grants/list-entries-v1-credit-grants.mjs.map +1 -1
  255. package/tools/v1/credit-grants/list-v1-credit-grants.js +1 -1
  256. package/tools/v1/credit-grants/list-v1-credit-grants.js.map +1 -1
  257. package/tools/v1/credit-grants/list-v1-credit-grants.mjs +1 -1
  258. package/tools/v1/credit-grants/list-v1-credit-grants.mjs.map +1 -1
  259. package/tools/v1/credit-grants/void-v1-credit-grants.js +1 -1
  260. package/tools/v1/credit-grants/void-v1-credit-grants.js.map +1 -1
  261. package/tools/v1/credit-grants/void-v1-credit-grants.mjs +1 -1
  262. package/tools/v1/credit-grants/void-v1-credit-grants.mjs.map +1 -1
  263. package/tools/v1/custom-fields/list-keys-v1-custom-fields.js +1 -1
  264. package/tools/v1/custom-fields/list-keys-v1-custom-fields.js.map +1 -1
  265. package/tools/v1/custom-fields/list-keys-v1-custom-fields.mjs +1 -1
  266. package/tools/v1/custom-fields/list-keys-v1-custom-fields.mjs.map +1 -1
  267. package/tools/v1/customers/alerts/list-customers-v1-alerts.d.mts.map +1 -1
  268. package/tools/v1/customers/alerts/list-customers-v1-alerts.d.ts.map +1 -1
  269. package/tools/v1/customers/alerts/list-customers-v1-alerts.js +2 -2
  270. package/tools/v1/customers/alerts/list-customers-v1-alerts.js.map +1 -1
  271. package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs +2 -2
  272. package/tools/v1/customers/alerts/list-customers-v1-alerts.mjs.map +1 -1
  273. package/tools/v1/customers/alerts/reset-customers-v1-alerts.js +2 -2
  274. package/tools/v1/customers/alerts/reset-customers-v1-alerts.js.map +1 -1
  275. package/tools/v1/customers/alerts/reset-customers-v1-alerts.mjs +2 -2
  276. package/tools/v1/customers/alerts/reset-customers-v1-alerts.mjs.map +1 -1
  277. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.d.mts.map +1 -1
  278. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.d.ts.map +1 -1
  279. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.js +7 -13
  280. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.js.map +1 -1
  281. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.mjs +7 -13
  282. package/tools/v1/customers/alerts/retrieve-customers-v1-alerts.mjs.map +1 -1
  283. package/tools/v1/customers/archive-v1-customers.js +1 -1
  284. package/tools/v1/customers/archive-v1-customers.js.map +1 -1
  285. package/tools/v1/customers/archive-v1-customers.mjs +1 -1
  286. package/tools/v1/customers/archive-v1-customers.mjs.map +1 -1
  287. package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.js +1 -1
  288. package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.js.map +1 -1
  289. package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.mjs +1 -1
  290. package/tools/v1/customers/billing-config/retrieve-customers-v1-billing-config.mjs.map +1 -1
  291. package/tools/v1/customers/commits/update-end-date-customers-v1-commits.js +1 -1
  292. package/tools/v1/customers/commits/update-end-date-customers-v1-commits.js.map +1 -1
  293. package/tools/v1/customers/commits/update-end-date-customers-v1-commits.mjs +1 -1
  294. package/tools/v1/customers/commits/update-end-date-customers-v1-commits.mjs.map +1 -1
  295. package/tools/v1/customers/create-v1-customers.js +1 -1
  296. package/tools/v1/customers/create-v1-customers.js.map +1 -1
  297. package/tools/v1/customers/create-v1-customers.mjs +1 -1
  298. package/tools/v1/customers/create-v1-customers.mjs.map +1 -1
  299. package/tools/v1/customers/credits/create-customers-v1-credits.js +1 -1
  300. package/tools/v1/customers/credits/create-customers-v1-credits.js.map +1 -1
  301. package/tools/v1/customers/credits/create-customers-v1-credits.mjs +1 -1
  302. package/tools/v1/customers/credits/create-customers-v1-credits.mjs.map +1 -1
  303. package/tools/v1/customers/credits/update-end-date-customers-v1-credits.js +1 -1
  304. package/tools/v1/customers/credits/update-end-date-customers-v1-credits.js.map +1 -1
  305. package/tools/v1/customers/credits/update-end-date-customers-v1-credits.mjs +1 -1
  306. package/tools/v1/customers/credits/update-end-date-customers-v1-credits.mjs.map +1 -1
  307. package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.js +1 -1
  308. package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.js.map +1 -1
  309. package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.mjs +1 -1
  310. package/tools/v1/customers/invoices/add-charge-customers-v1-invoices.mjs.map +1 -1
  311. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.mts +45 -0
  312. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.mts.map +1 -0
  313. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.ts +45 -0
  314. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.d.ts.map +1 -0
  315. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.js +39 -0
  316. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.js.map +1 -0
  317. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.mjs +35 -0
  318. package/tools/v1/customers/invoices/retrieve-pdf-customers-v1-invoices.mjs.map +1 -0
  319. package/tools/v1/customers/list-billable-metrics-v1-customers.js +1 -1
  320. package/tools/v1/customers/list-billable-metrics-v1-customers.js.map +1 -1
  321. package/tools/v1/customers/list-billable-metrics-v1-customers.mjs +1 -1
  322. package/tools/v1/customers/list-billable-metrics-v1-customers.mjs.map +1 -1
  323. package/tools/v1/customers/list-costs-v1-customers.js +1 -1
  324. package/tools/v1/customers/list-costs-v1-customers.js.map +1 -1
  325. package/tools/v1/customers/list-costs-v1-customers.mjs +1 -1
  326. package/tools/v1/customers/list-costs-v1-customers.mjs.map +1 -1
  327. package/tools/v1/customers/list-v1-customers.js +1 -1
  328. package/tools/v1/customers/list-v1-customers.js.map +1 -1
  329. package/tools/v1/customers/list-v1-customers.mjs +1 -1
  330. package/tools/v1/customers/list-v1-customers.mjs.map +1 -1
  331. package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.js +1 -1
  332. package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.js.map +1 -1
  333. package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.mjs +1 -1
  334. package/tools/v1/customers/named-schedules/retrieve-customers-v1-named-schedules.mjs.map +1 -1
  335. package/tools/v1/customers/plans/add-customers-v1-plans.js +1 -1
  336. package/tools/v1/customers/plans/add-customers-v1-plans.js.map +1 -1
  337. package/tools/v1/customers/plans/add-customers-v1-plans.mjs +1 -1
  338. package/tools/v1/customers/plans/add-customers-v1-plans.mjs.map +1 -1
  339. package/tools/v1/customers/plans/end-customers-v1-plans.js +1 -1
  340. package/tools/v1/customers/plans/end-customers-v1-plans.js.map +1 -1
  341. package/tools/v1/customers/plans/end-customers-v1-plans.mjs +1 -1
  342. package/tools/v1/customers/plans/end-customers-v1-plans.mjs.map +1 -1
  343. package/tools/v1/customers/plans/list-customers-v1-plans.js +1 -1
  344. package/tools/v1/customers/plans/list-customers-v1-plans.js.map +1 -1
  345. package/tools/v1/customers/plans/list-customers-v1-plans.mjs +1 -1
  346. package/tools/v1/customers/plans/list-customers-v1-plans.mjs.map +1 -1
  347. package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.js +1 -1
  348. package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.js.map +1 -1
  349. package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.mjs +1 -1
  350. package/tools/v1/customers/plans/list-price-adjustments-customers-v1-plans.mjs.map +1 -1
  351. package/tools/v1/customers/preview-events-v1-customers.d.mts.map +1 -1
  352. package/tools/v1/customers/preview-events-v1-customers.d.ts.map +1 -1
  353. package/tools/v1/customers/preview-events-v1-customers.js +2 -6
  354. package/tools/v1/customers/preview-events-v1-customers.js.map +1 -1
  355. package/tools/v1/customers/preview-events-v1-customers.mjs +2 -6
  356. package/tools/v1/customers/preview-events-v1-customers.mjs.map +1 -1
  357. package/tools/v1/customers/retrieve-billing-configurations-v1-customers.js +1 -1
  358. package/tools/v1/customers/retrieve-billing-configurations-v1-customers.js.map +1 -1
  359. package/tools/v1/customers/retrieve-billing-configurations-v1-customers.mjs +1 -1
  360. package/tools/v1/customers/retrieve-billing-configurations-v1-customers.mjs.map +1 -1
  361. package/tools/v1/customers/retrieve-v1-customers.js +1 -1
  362. package/tools/v1/customers/retrieve-v1-customers.js.map +1 -1
  363. package/tools/v1/customers/retrieve-v1-customers.mjs +1 -1
  364. package/tools/v1/customers/retrieve-v1-customers.mjs.map +1 -1
  365. package/tools/v1/customers/set-billing-configurations-v1-customers.js +1 -1
  366. package/tools/v1/customers/set-billing-configurations-v1-customers.js.map +1 -1
  367. package/tools/v1/customers/set-billing-configurations-v1-customers.mjs +1 -1
  368. package/tools/v1/customers/set-billing-configurations-v1-customers.mjs.map +1 -1
  369. package/tools/v1/customers/set-name-v1-customers.js +1 -1
  370. package/tools/v1/customers/set-name-v1-customers.js.map +1 -1
  371. package/tools/v1/customers/set-name-v1-customers.mjs +1 -1
  372. package/tools/v1/customers/set-name-v1-customers.mjs.map +1 -1
  373. package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.js +1 -1
  374. package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.js.map +1 -1
  375. package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.mjs +1 -1
  376. package/tools/v1/dashboards/get-embeddable-url-v1-dashboards.mjs.map +1 -1
  377. package/tools/v1/invoices/regenerate-v1-invoices.js +1 -1
  378. package/tools/v1/invoices/regenerate-v1-invoices.js.map +1 -1
  379. package/tools/v1/invoices/regenerate-v1-invoices.mjs +1 -1
  380. package/tools/v1/invoices/regenerate-v1-invoices.mjs.map +1 -1
  381. package/tools/v1/invoices/void-v1-invoices.js +1 -1
  382. package/tools/v1/invoices/void-v1-invoices.js.map +1 -1
  383. package/tools/v1/invoices/void-v1-invoices.mjs +1 -1
  384. package/tools/v1/invoices/void-v1-invoices.mjs.map +1 -1
  385. package/tools/v1/payments/attempt-v1-payments.d.mts +45 -0
  386. package/tools/v1/payments/attempt-v1-payments.d.mts.map +1 -0
  387. package/tools/v1/payments/attempt-v1-payments.d.ts +45 -0
  388. package/tools/v1/payments/attempt-v1-payments.d.ts.map +1 -0
  389. package/tools/v1/payments/attempt-v1-payments.js +43 -0
  390. package/tools/v1/payments/attempt-v1-payments.js.map +1 -0
  391. package/tools/v1/payments/attempt-v1-payments.mjs +39 -0
  392. package/tools/v1/payments/attempt-v1-payments.mjs.map +1 -0
  393. package/tools/v1/payments/cancel-v1-payments.d.mts +45 -0
  394. package/tools/v1/payments/cancel-v1-payments.d.mts.map +1 -0
  395. package/tools/v1/payments/cancel-v1-payments.d.ts +45 -0
  396. package/tools/v1/payments/cancel-v1-payments.d.ts.map +1 -0
  397. package/tools/v1/payments/cancel-v1-payments.js +43 -0
  398. package/tools/v1/payments/cancel-v1-payments.js.map +1 -0
  399. package/tools/v1/payments/cancel-v1-payments.mjs +39 -0
  400. package/tools/v1/payments/cancel-v1-payments.mjs.map +1 -0
  401. package/tools/v1/payments/list-v1-payments.d.mts +45 -0
  402. package/tools/v1/payments/list-v1-payments.d.mts.map +1 -0
  403. package/tools/v1/payments/list-v1-payments.d.ts +45 -0
  404. package/tools/v1/payments/list-v1-payments.d.ts.map +1 -0
  405. package/tools/v1/payments/list-v1-payments.js +64 -0
  406. package/tools/v1/payments/list-v1-payments.js.map +1 -0
  407. package/tools/v1/payments/list-v1-payments.mjs +60 -0
  408. package/tools/v1/payments/list-v1-payments.mjs.map +1 -0
  409. package/tools/v1/plans/get-details-v1-plans.js +1 -1
  410. package/tools/v1/plans/get-details-v1-plans.js.map +1 -1
  411. package/tools/v1/plans/get-details-v1-plans.mjs +1 -1
  412. package/tools/v1/plans/get-details-v1-plans.mjs.map +1 -1
  413. package/tools/v1/plans/list-charges-v1-plans.js +1 -1
  414. package/tools/v1/plans/list-charges-v1-plans.js.map +1 -1
  415. package/tools/v1/plans/list-charges-v1-plans.mjs +1 -1
  416. package/tools/v1/plans/list-charges-v1-plans.mjs.map +1 -1
  417. package/tools/v1/plans/list-customers-v1-plans.js +1 -1
  418. package/tools/v1/plans/list-customers-v1-plans.js.map +1 -1
  419. package/tools/v1/plans/list-customers-v1-plans.mjs +1 -1
  420. package/tools/v1/plans/list-customers-v1-plans.mjs.map +1 -1
  421. package/tools/v1/plans/list-v1-plans.js +1 -1
  422. package/tools/v1/plans/list-v1-plans.js.map +1 -1
  423. package/tools/v1/plans/list-v1-plans.mjs +1 -1
  424. package/tools/v1/plans/list-v1-plans.mjs.map +1 -1
  425. package/tools/v1/pricing-units/list-v1-pricing-units.js +1 -1
  426. package/tools/v1/pricing-units/list-v1-pricing-units.js.map +1 -1
  427. package/tools/v1/pricing-units/list-v1-pricing-units.mjs +1 -1
  428. package/tools/v1/pricing-units/list-v1-pricing-units.mjs.map +1 -1
  429. package/tools/v1/services/list-v1-services.js +1 -1
  430. package/tools/v1/services/list-v1-services.js.map +1 -1
  431. package/tools/v1/services/list-v1-services.mjs +1 -1
  432. package/tools/v1/services/list-v1-services.mjs.map +1 -1
  433. package/tools/v1/usage/ingest-v1-usage.js +1 -1
  434. package/tools/v1/usage/ingest-v1-usage.js.map +1 -1
  435. package/tools/v1/usage/ingest-v1-usage.mjs +1 -1
  436. package/tools/v1/usage/ingest-v1-usage.mjs.map +1 -1
  437. package/tools/v1/usage/list-v1-usage.js +1 -1
  438. package/tools/v1/usage/list-v1-usage.js.map +1 -1
  439. package/tools/v1/usage/list-v1-usage.mjs +1 -1
  440. package/tools/v1/usage/list-v1-usage.mjs.map +1 -1
  441. package/tools/v1/usage/list-with-groups-v1-usage.js +1 -1
  442. package/tools/v1/usage/list-with-groups-v1-usage.js.map +1 -1
  443. package/tools/v1/usage/list-with-groups-v1-usage.mjs +1 -1
  444. package/tools/v1/usage/list-with-groups-v1-usage.mjs.map +1 -1
  445. package/tools/v1/usage/search-v1-usage.js +1 -1
  446. package/tools/v1/usage/search-v1-usage.js.map +1 -1
  447. package/tools/v1/usage/search-v1-usage.mjs +1 -1
  448. package/tools/v1/usage/search-v1-usage.mjs.map +1 -1
  449. package/tools/v2/contracts/edit-commit-v2-contracts.d.mts.map +1 -1
  450. package/tools/v2/contracts/edit-commit-v2-contracts.d.ts.map +1 -1
  451. package/tools/v2/contracts/edit-commit-v2-contracts.js +50 -1
  452. package/tools/v2/contracts/edit-commit-v2-contracts.js.map +1 -1
  453. package/tools/v2/contracts/edit-commit-v2-contracts.mjs +50 -1
  454. package/tools/v2/contracts/edit-commit-v2-contracts.mjs.map +1 -1
  455. package/tools/v2/contracts/edit-credit-v2-contracts.d.mts.map +1 -1
  456. package/tools/v2/contracts/edit-credit-v2-contracts.d.ts.map +1 -1
  457. package/tools/v2/contracts/edit-credit-v2-contracts.js +50 -1
  458. package/tools/v2/contracts/edit-credit-v2-contracts.js.map +1 -1
  459. package/tools/v2/contracts/edit-credit-v2-contracts.mjs +50 -1
  460. package/tools/v2/contracts/edit-credit-v2-contracts.mjs.map +1 -1
  461. package/tools/v2/contracts/edit-v2-contracts.d.mts.map +1 -1
  462. package/tools/v2/contracts/edit-v2-contracts.d.ts.map +1 -1
  463. package/tools/v2/contracts/edit-v2-contracts.js +56 -2
  464. package/tools/v2/contracts/edit-v2-contracts.js.map +1 -1
  465. package/tools/v2/contracts/edit-v2-contracts.mjs +56 -2
  466. package/tools/v2/contracts/edit-v2-contracts.mjs.map +1 -1
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'regenerate_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\nThis endpoint regenerates a voided invoice and recalculates the invoice based on up-to-date rates, available balances, and other fees regardless of the billing period.\n\n### Use this endpoint to:\nRecalculate an invoice with updated rate terms, available balance, and fees to correct billing disputes or discrepancies\n\n### Key response fields:\nThe regenerated invoice id, which is distinct from the previously voided invoice.\n\n### Usage guidelines:\nIf an invoice is attached to a contract with a billing provider on it, the regenerated invoice will be distributed based on the configuration.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The new invoice id'\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\nThis endpoint regenerates a voided invoice and recalculates the invoice based on up-to-date rates, available balances, and other fees regardless of the billing period.\n\n### Use this endpoint to:\nRecalculate an invoice with updated rate terms, available balance, and fees to correct billing disputes or discrepancies\n\n### Key response fields:\nThe regenerated invoice id, which is distinct from the previously voided invoice.\n\n### Usage guidelines:\nIf an invoice is attached to a contract with a billing provider on it, the regenerated invoice will be distributed based on the configuration.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/invoice_regenerate_response',\n $defs: {\n invoice_regenerate_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The new invoice id'\n }\n },\n required: [ 'id'\n ]\n }\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_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\nPermanently cancels an invoice by setting its status to voided, preventing collection and removing it from customer billing. Use this to correct billing errors, cancel incorrect charges, or handle disputed invoices that should not be collected. Returns the voided invoice ID with the status change applied immediately to stop any payment processing.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\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\nPermanently cancels an invoice by setting its status to voided, preventing collection and removing it from customer billing. Use this to correct billing errors, cancel incorrect charges, or handle disputed invoices that should not be collected. Returns the voided invoice ID with the status change applied immediately to stop any payment processing.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/invoice_void_response',\n $defs: {\n invoice_void_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n }\n },\n required: [ 'id'\n ]\n }\n }\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -0,0 +1,48 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from '@metronome/mcp/filtering';
4
+ import { Metadata, asTextContentResult } from '@metronome/mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import Metronome from '@metronome/sdk';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'v1.payments',
11
+ operation: 'write',
12
+ tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/v1/payments/attempt',
15
+ operationId: 'attemptPayment-v1',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'attempt_v1_payments',
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\nTrigger 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. \nPayment can only be attempted if all of the following are true:\n - The Metronome Invoice is finalized\n - PLG Invoicing is configured for the Customer\n - You cannot attempt payments for invoices that have already been `paid` or `voided`.\n\nAttempting to payment on an ineligible Invoice or Customer will result in a `400` response.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/payment_attempt_response',\n $defs: {\n payment_attempt_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/payment'\n }\n },\n required: [ 'data'\n ]\n },\n payment: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n amount: {\n type: 'number'\n },\n amount_paid: {\n type: 'number'\n },\n contract_id: {\n type: 'string'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n customer_id: {\n type: 'string'\n },\n error_message: {\n type: 'string'\n },\n fiat_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n invoice_id: {\n type: 'string'\n },\n payment_gateway: {\n type: 'object',\n properties: {\n stripe: {\n type: 'object',\n properties: {\n payment_intent_id: {\n type: 'string'\n },\n error: {\n type: 'object',\n properties: {\n code: {\n type: 'string'\n },\n decline_code: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n },\n required: [ 'payment_intent_id'\n ]\n },\n type: {\n type: 'string',\n enum: [ 'stripe'\n ]\n }\n },\n required: [ 'stripe',\n 'type'\n ]\n },\n status: {\n $ref: '#/$defs/payment_status'\n },\n updated_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'id'\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 payment_status: {\n type: 'string',\n enum: [ 'pending',\n 'requires_intervention',\n 'paid',\n 'canceled'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ invoice_id: {
29
+ type: 'string',
30
+ },
31
+ jq_filter: {
32
+ type: 'string',
33
+ title: 'jq Filter',
34
+ description:
35
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
36
+ },
37
+ },
38
+ required: ['customer_id', 'invoice_id'],
39
+ },
40
+ annotations: {},
41
+ };
42
+
43
+ export const handler = async (client: Metronome, args: Record<string, unknown> | undefined) => {
44
+ const { jq_filter, ...body } = args as any;
45
+ return asTextContentResult(await maybeFilter(jq_filter, await client.v1.payments.attempt(body)));
46
+ };
47
+
48
+ export default { metadata, tool, handler };
@@ -0,0 +1,48 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from '@metronome/mcp/filtering';
4
+ import { Metadata, asTextContentResult } from '@metronome/mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import Metronome from '@metronome/sdk';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'v1.payments',
11
+ operation: 'write',
12
+ tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/v1/payments/cancel',
15
+ operationId: 'cancelPayment-v1',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'cancel_v1_payments',
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\nCancel an existing payment attempt for an invoice.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/payment_cancel_response',\n $defs: {\n payment_cancel_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/payment'\n }\n },\n required: [ 'data'\n ]\n },\n payment: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n amount: {\n type: 'number'\n },\n amount_paid: {\n type: 'number'\n },\n contract_id: {\n type: 'string'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n customer_id: {\n type: 'string'\n },\n error_message: {\n type: 'string'\n },\n fiat_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n invoice_id: {\n type: 'string'\n },\n payment_gateway: {\n type: 'object',\n properties: {\n stripe: {\n type: 'object',\n properties: {\n payment_intent_id: {\n type: 'string'\n },\n error: {\n type: 'object',\n properties: {\n code: {\n type: 'string'\n },\n decline_code: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n },\n required: [ 'payment_intent_id'\n ]\n },\n type: {\n type: 'string',\n enum: [ 'stripe'\n ]\n }\n },\n required: [ 'stripe',\n 'type'\n ]\n },\n status: {\n $ref: '#/$defs/payment_status'\n },\n updated_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'id'\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 payment_status: {\n type: 'string',\n enum: [ 'pending',\n 'requires_intervention',\n 'paid',\n 'canceled'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ invoice_id: {
29
+ type: 'string',
30
+ },
31
+ jq_filter: {
32
+ type: 'string',
33
+ title: 'jq Filter',
34
+ description:
35
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
36
+ },
37
+ },
38
+ required: ['customer_id', 'invoice_id'],
39
+ },
40
+ annotations: {},
41
+ };
42
+
43
+ export const handler = async (client: Metronome, args: Record<string, unknown> | undefined) => {
44
+ const { jq_filter, ...body } = args as any;
45
+ return asTextContentResult(await maybeFilter(jq_filter, await client.v1.payments.cancel(body)));
46
+ };
47
+
48
+ export default { metadata, tool, handler };
@@ -0,0 +1,69 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from '@metronome/mcp/filtering';
4
+ import { Metadata, asTextContentResult } from '@metronome/mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import Metronome from '@metronome/sdk';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'v1.payments',
11
+ operation: 'write',
12
+ tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/v1/payments/list',
15
+ operationId: 'listPayments-v1',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'list_v1_payments',
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 all payment attempts for the given invoice.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/payment'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data'\n ],\n $defs: {\n payment: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n amount: {\n type: 'number'\n },\n amount_paid: {\n type: 'number'\n },\n contract_id: {\n type: 'string'\n },\n created_at: {\n type: 'string',\n format: 'date-time'\n },\n customer_id: {\n type: 'string'\n },\n error_message: {\n type: 'string'\n },\n fiat_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n invoice_id: {\n type: 'string'\n },\n payment_gateway: {\n type: 'object',\n properties: {\n stripe: {\n type: 'object',\n properties: {\n payment_intent_id: {\n type: 'string'\n },\n error: {\n type: 'object',\n properties: {\n code: {\n type: 'string'\n },\n decline_code: {\n type: 'string'\n },\n type: {\n type: 'string'\n }\n }\n }\n },\n required: [ 'payment_intent_id'\n ]\n },\n type: {\n type: 'string',\n enum: [ 'stripe'\n ]\n }\n },\n required: [ 'stripe',\n 'type'\n ]\n },\n status: {\n $ref: '#/$defs/payment_status'\n },\n updated_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'id'\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 payment_status: {\n type: 'string',\n enum: [ 'pending',\n 'requires_intervention',\n 'paid',\n 'canceled'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ customer_id: {
26
+ type: 'string',
27
+ },
28
+ invoice_id: {
29
+ type: 'string',
30
+ },
31
+ limit: {
32
+ type: 'integer',
33
+ description: 'The maximum number of payments to return. Defaults to 25.',
34
+ },
35
+ next_page: {
36
+ type: 'string',
37
+ description: 'The next page token from a previous response.',
38
+ },
39
+ statuses: {
40
+ type: 'array',
41
+ items: {
42
+ $ref: '#/$defs/payment_status',
43
+ },
44
+ },
45
+ jq_filter: {
46
+ type: 'string',
47
+ title: 'jq Filter',
48
+ description:
49
+ 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
50
+ },
51
+ },
52
+ required: ['customer_id', 'invoice_id'],
53
+ $defs: {
54
+ payment_status: {
55
+ type: 'string',
56
+ enum: ['pending', 'requires_intervention', 'paid', 'canceled'],
57
+ },
58
+ },
59
+ },
60
+ annotations: {},
61
+ };
62
+
63
+ export const handler = async (client: Metronome, args: Record<string, unknown> | undefined) => {
64
+ const { jq_filter, ...body } = args as any;
65
+ const response = await client.v1.payments.list(body).asResponse();
66
+ return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
67
+ };
68
+
69
+ export default { metadata, tool, handler };
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'get_details_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\nFetch high level details of a specific plan.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/plan_detail'\n }\n },\n required: [ 'data'\n ],\n $defs: {\n plan_detail: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n name: {\n type: 'string'\n },\n credit_grants: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n amount_granted: {\n type: 'number'\n },\n amount_granted_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n amount_paid: {\n type: 'number'\n },\n amount_paid_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n effective_duration: {\n type: 'number'\n },\n name: {\n type: 'string'\n },\n priority: {\n type: 'string'\n },\n send_invoice: {\n type: 'boolean'\n },\n reason: {\n type: 'string'\n },\n recurrence_duration: {\n type: 'number'\n },\n recurrence_interval: {\n type: 'number'\n }\n },\n required: [ 'amount_granted',\n 'amount_granted_credit_type',\n 'amount_paid',\n 'amount_paid_credit_type',\n 'effective_duration',\n 'name',\n 'priority',\n 'send_invoice'\n ]\n }\n },\n description: {\n type: 'string'\n },\n minimums: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n name: {\n type: 'string'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n value: {\n type: 'number'\n }\n },\n required: [ 'credit_type',\n 'name',\n 'start_period',\n 'value'\n ]\n }\n },\n overage_rates: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n fiat_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n to_fiat_conversion_factor: {\n type: 'number'\n }\n },\n required: [ 'credit_type',\n 'fiat_credit_type',\n 'start_period',\n 'to_fiat_conversion_factor'\n ]\n }\n }\n },\n required: [ 'id',\n 'custom_fields',\n 'name'\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\nFetch high level details of a specific plan.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/plan_get_details_response',\n $defs: {\n plan_get_details_response: {\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/plan_detail'\n }\n },\n required: [ 'data'\n ]\n },\n plan_detail: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n name: {\n type: 'string'\n },\n credit_grants: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n amount_granted: {\n type: 'number'\n },\n amount_granted_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n amount_paid: {\n type: 'number'\n },\n amount_paid_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n effective_duration: {\n type: 'number'\n },\n name: {\n type: 'string'\n },\n priority: {\n type: 'string'\n },\n send_invoice: {\n type: 'boolean'\n },\n reason: {\n type: 'string'\n },\n recurrence_duration: {\n type: 'number'\n },\n recurrence_interval: {\n type: 'number'\n }\n },\n required: [ 'amount_granted',\n 'amount_granted_credit_type',\n 'amount_paid',\n 'amount_paid_credit_type',\n 'effective_duration',\n 'name',\n 'priority',\n 'send_invoice'\n ]\n }\n },\n description: {\n type: 'string'\n },\n minimums: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n name: {\n type: 'string'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n value: {\n type: 'number'\n }\n },\n required: [ 'credit_type',\n 'name',\n 'start_period',\n 'value'\n ]\n }\n },\n overage_rates: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n fiat_credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n to_fiat_conversion_factor: {\n type: 'number'\n }\n },\n required: [ 'credit_type',\n 'fiat_credit_type',\n 'start_period',\n 'to_fiat_conversion_factor'\n ]\n }\n }\n },\n required: [ 'id',\n 'custom_fields',\n 'name'\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: 'list_charges_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\nFetches a list of charges of a specific plan.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n charge_type: {\n type: 'string',\n enum: [ 'usage',\n 'fixed',\n 'composite',\n 'minimum',\n 'seat'\n ]\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n name: {\n type: 'string'\n },\n prices: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n tier: {\n type: 'number',\n description: 'Used in pricing tiers. Indicates at what metric value the price applies.'\n },\n value: {\n type: 'number'\n },\n collection_interval: {\n type: 'number'\n },\n collection_schedule: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'tier',\n 'value'\n ]\n }\n },\n product_id: {\n type: 'string'\n },\n product_name: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n tier_reset_frequency: {\n type: 'number',\n description: 'Used in pricing tiers. Indicates how often the tier resets. Default is 1 - the tier count resets every billing period.'\n },\n unit_conversion: {\n type: 'object',\n description: 'Specifies how quantities for usage based charges will be converted.',\n properties: {\n division_factor: {\n type: 'number',\n description: 'The conversion factor'\n },\n rounding_behavior: {\n type: 'string',\n description: 'Whether usage should be rounded down or up to the nearest whole number. If null, quantity will be rounded to 20 decimal places.',\n enum: [ 'floor',\n 'ceiling'\n ]\n }\n },\n required: [ 'division_factor'\n ]\n }\n },\n required: [ 'id',\n 'charge_type',\n 'credit_type',\n 'custom_fields',\n 'name',\n 'prices',\n 'product_id',\n 'product_name'\n ]\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\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\nFetches a list of charges of a specific plan.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/plan_list_charges_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n plan_list_charges_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n charge_type: {\n type: 'string',\n enum: [ 'usage',\n 'fixed',\n 'composite',\n 'minimum',\n 'seat'\n ]\n },\n credit_type: {\n $ref: '#/$defs/credit_type_data'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n name: {\n type: 'string'\n },\n prices: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n tier: {\n type: 'number',\n description: 'Used in pricing tiers. Indicates at what metric value the price applies.'\n },\n value: {\n type: 'number'\n },\n collection_interval: {\n type: 'number'\n },\n collection_schedule: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'tier',\n 'value'\n ]\n }\n },\n product_id: {\n type: 'string'\n },\n product_name: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n start_period: {\n type: 'number',\n description: 'Used in price ramps. Indicates how many billing periods pass before the charge applies.'\n },\n tier_reset_frequency: {\n type: 'number',\n description: 'Used in pricing tiers. Indicates how often the tier resets. Default is 1 - the tier count resets every billing period.'\n },\n unit_conversion: {\n type: 'object',\n description: 'Specifies how quantities for usage based charges will be converted.',\n properties: {\n division_factor: {\n type: 'number',\n description: 'The conversion factor'\n },\n rounding_behavior: {\n type: 'string',\n description: 'Whether usage should be rounded down or up to the nearest whole number. If null, quantity will be rounded to 20 decimal places.',\n enum: [ 'floor',\n 'ceiling'\n ]\n }\n },\n required: [ 'division_factor'\n ]\n }\n },\n required: [ 'id',\n 'charge_type',\n 'credit_type',\n 'custom_fields',\n 'name',\n 'prices',\n 'product_id',\n 'product_name'\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: 'list_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\nFetches a list of customers on a specific plan (by default, only currently active plans are included)\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n customer_details: {\n $ref: '#/$defs/customer_detail'\n },\n plan_details: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\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_plan_id: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n starting_on: {\n type: 'string',\n description: 'The start date of the plan',\n format: 'date-time'\n },\n ending_before: {\n type: 'string',\n description: 'The end date of the plan',\n format: 'date-time'\n }\n },\n required: [ 'id',\n 'custom_fields',\n 'customer_plan_id',\n 'name',\n 'starting_on'\n ]\n }\n },\n required: [ 'customer_details',\n 'plan_details'\n ]\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n customer_detail: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the customer'\n },\n created_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the customer was created.',\n format: 'date-time'\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_config: {\n type: 'object',\n properties: {\n salesforce_account_id: {\n type: 'string',\n description: 'The Salesforce account ID for the customer'\n }\n },\n required: [ 'salesforce_account_id'\n ]\n },\n external_id: {\n type: 'string',\n description: '(deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events'\n },\n ingest_aliases: {\n type: 'array',\n description: 'aliases for this customer that can be used instead of the Metronome customer ID in usage events',\n items: {\n type: 'string'\n }\n },\n name: {\n type: 'string'\n },\n archived_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the customer was archived. Null if the customer is active.',\n format: 'date-time'\n },\n current_billable_status: {\n type: 'object',\n description: 'This field\\'s availability is dependent on your client\\'s configuration.',\n properties: {\n value: {\n type: 'string',\n enum: [ 'billable',\n 'unbillable'\n ]\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'value'\n ]\n }\n },\n required: [ 'id',\n 'created_at',\n 'custom_fields',\n 'customer_config',\n 'external_id',\n 'ingest_aliases',\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\nFetches a list of customers on a specific plan (by default, only currently active plans are included)\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/plan_list_customers_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n plan_list_customers_response: {\n type: 'object',\n properties: {\n customer_details: {\n $ref: '#/$defs/customer_detail'\n },\n plan_details: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\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_plan_id: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n starting_on: {\n type: 'string',\n description: 'The start date of the plan',\n format: 'date-time'\n },\n ending_before: {\n type: 'string',\n description: 'The end date of the plan',\n format: 'date-time'\n }\n },\n required: [ 'id',\n 'custom_fields',\n 'customer_plan_id',\n 'name',\n 'starting_on'\n ]\n }\n },\n required: [ 'customer_details',\n 'plan_details'\n ]\n },\n customer_detail: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'the Metronome ID of the customer'\n },\n created_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the customer was created.',\n format: 'date-time'\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_config: {\n type: 'object',\n properties: {\n salesforce_account_id: {\n type: 'string',\n description: 'The Salesforce account ID for the customer'\n }\n },\n required: [ 'salesforce_account_id'\n ]\n },\n external_id: {\n type: 'string',\n description: '(deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events'\n },\n ingest_aliases: {\n type: 'array',\n description: 'aliases for this customer that can be used instead of the Metronome customer ID in usage events',\n items: {\n type: 'string'\n }\n },\n name: {\n type: 'string'\n },\n updated_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the customer was last updated.',\n format: 'date-time'\n },\n archived_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the customer was archived. Null if the customer is active.',\n format: 'date-time'\n },\n current_billable_status: {\n type: 'object',\n description: 'This field\\'s availability is dependent on your client\\'s configuration.',\n properties: {\n value: {\n type: 'string',\n enum: [ 'billable',\n 'unbillable'\n ]\n },\n effective_at: {\n type: 'string',\n format: 'date-time'\n }\n },\n required: [ 'value'\n ]\n }\n },\n required: [ 'id',\n 'created_at',\n 'custom_fields',\n 'customer_config',\n 'external_id',\n 'ingest_aliases',\n 'name',\n 'updated_at'\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_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\nList all available plans.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n description: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'description',\n 'name'\n ]\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\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 all available plans.\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/plan_list_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n plan_list_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n description: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'description',\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: 'list_v1_pricing_units',
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 all pricing units. All fiat currency types (for example, USD or GBP) will be included, as well as any custom pricing units that were configured. Custom pricing units can be used to charge for usage in a non-fiat pricing unit, for example AI credits.\n\nNote: The USD (cents) pricing unit is 2714e483-4ff1-48e4-9e25-ac732e8f24f2.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n is_currency: {\n type: 'boolean'\n },\n name: {\n type: 'string'\n }\n }\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\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 all pricing units. All fiat currency types (for example, USD or GBP) will be included, as well as any custom pricing units that were configured. Custom pricing units can be used to charge for usage in a non-fiat pricing unit, for example AI credits.\n\nNote: The USD (cents) pricing unit is 2714e483-4ff1-48e4-9e25-ac732e8f24f2.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/pricing_unit_list_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n pricing_unit_list_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n is_currency: {\n type: 'boolean'\n },\n name: {\n type: 'string'\n }\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_services',
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\nGets Metronome's service registry with associated IP addresses for security allowlisting and firewall configuration. Use this endpoint to maintain an up-to-date list of IPs that your systems should trust for Metronome communications. Returns service names and their current IP ranges, with new IPs typically appearing 30+ days before first use to ensure smooth allowlist updates.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n services: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n ips: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n name: {\n type: 'string'\n },\n usage: {\n type: 'string',\n enum: [ 'makes_connections_from',\n 'accepts_connections_at'\n ]\n }\n },\n required: [ 'ips',\n 'name',\n 'usage'\n ]\n }\n }\n },\n required: [ 'services'\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\nGets Metronome's service registry with associated IP addresses for security allowlisting and firewall configuration. Use this endpoint to maintain an up-to-date list of IPs that your systems should trust for Metronome communications. Returns service names and their current IP ranges, with new IPs typically appearing 30+ days before first use to ensure smooth allowlist updates.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/service_list_response',\n $defs: {\n service_list_response: {\n type: 'object',\n properties: {\n services: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n ips: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n name: {\n type: 'string'\n },\n usage: {\n type: 'string',\n enum: [ 'makes_connections_from',\n 'accepts_connections_at'\n ]\n }\n },\n required: [ 'ips',\n 'name',\n 'usage'\n ]\n }\n }\n },\n required: [ 'services'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -17,7 +17,7 @@ export const metadata: Metadata = {
17
17
  export const tool: Tool = {
18
18
  name: 'ingest_v1_usage',
19
19
  description:
20
- '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 [Getting usage into Metronome](https://docs.metronome.com/connect-metronome/) to learn more about usage events.\n\n### Use this endpoint to:\nCreate a customer usage pipeline into Metronome that drives billable metrics, credit drawdown, and invoicing. Track customer behavior, resource consumption, and feature usage\n\n### What happens when you send events:\n- Events are validated and processed in real-time\n- Events are matched to customers using customer IDs or customer ingest aliases\n- Events are matched to billable metrics and are immediately available for usage and spend calculations\n\n### Usage guidelines:\n- Historical events can be backdated up to 34 days and will immediately impact live customer spend\n- Duplicate events are automatically detected and ignored (34-day deduplication window)\n\n#### Event structure:\nUsage events are simple JSON objects designed for flexibility and ease of integration:\n```json\n{\n "transaction_id": "2021-01-01T00:00:00Z_cluster42",\n "customer_id": "team@example.com",\n "event_type": "api_request",\n "timestamp": "2021-01-01T00:00:00Z",\n "properties": {\n "endpoint": "/v1/users",\n "method": "POST",\n "response_time_ms": 45,\n "region": "us-west-2"\n }\n}\n```\n\n#### Transaction ID\n 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.\n - Best Practices:\n - Use UUIDs for one-time events: uuid4()\n - For heartbeat events, use deterministic IDs\n - Include enough context to avoid collisions across different event sources\n\n#### Customer ID\nIdentifies which customer should be billed for this usage. Supports two identification methods:\n - Metronome Customer ID: The UUID returned when creating a customer\n - Ingest Alias: Your system\'s identifier (email, account number, etc.) \n\nIngest aliases enable seamless integration without requiring ID mapping, and customers can have multiple aliases for flexibility.\n\n#### Event Type:\nCategorizes the event type for billable metric matching. Choose descriptive names that aligns with the product surface area.\n\n#### Properties:\nFlexible metadata also used to match billable metrics or to be used to serve as group keys to create multiple pricing dimensions or breakdown costs by novel properties for end customers or internal finance teams measuring underlying COGs.\n',
20
+ '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.\n\n### Use this endpoint to:\nCreate a customer usage pipeline into Metronome that drives billable metrics, credit drawdown, and invoicing. Track customer behavior, resource consumption, and feature usage\n\n### What happens when you send events:\n- Events are validated and processed in real-time\n- Events are matched to customers using customer IDs or customer ingest aliases\n- Events are matched to billable metrics and are immediately available for usage and spend calculations\n\n### Usage guidelines:\n- Historical events can be backdated up to 34 days and will immediately impact live customer spend\n- Duplicate events are automatically detected and ignored (34-day deduplication window)\n\n#### Event structure:\nUsage events are simple JSON objects designed for flexibility and ease of integration:\n```json\n{\n "transaction_id": "2021-01-01T00:00:00Z_cluster42",\n "customer_id": "team@example.com",\n "event_type": "api_request",\n "timestamp": "2021-01-01T00:00:00Z",\n "properties": {\n "endpoint": "/v1/users",\n "method": "POST",\n "response_time_ms": 45,\n "region": "us-west-2"\n }\n}\n```\n\nLearn more about [usage event structure definitions](/guides/events/design-usage-events).\n\n#### Transaction ID\n 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.\n - Best Practices:\n - Use UUIDs for one-time events: uuid4()\n - For heartbeat events, use deterministic IDs\n - Include enough context to avoid collisions across different event sources\n\n#### Customer ID\nIdentifies which customer should be billed for this usage. Supports two identification methods:\n - Metronome Customer ID: The UUID returned when creating a customer\n - Ingest Alias: Your system\'s identifier (email, account number, etc.) \n\nIngest aliases enable seamless integration without requiring ID mapping, and customers can have multiple aliases for flexibility.\n\n#### Event Type:\nCategorizes the event type for billable metric matching. Choose descriptive names that aligns with the product surface area.\n\n#### Properties:\nFlexible metadata also used to match billable metrics or to be used to serve as group keys to create multiple pricing dimensions or breakdown costs by novel properties for end customers or internal finance teams measuring underlying COGs.\n',
21
21
  inputSchema: {
22
22
  type: 'object',
23
23
  properties: {
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'list_v1_usage',
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 aggregated usage data across multiple customers and billable metrics in a single query. This batch endpoint enables you to fetch usage patterns at scale, broken down by time windows, making it ideal for building analytics dashboards, generating reports, and monitoring platform-wide usage trends.\n\n### Use this endpoint to:\n- Generate platform-wide usage reports for internal teams\n- Monitor aggregate usage trends across your entire customer base\n- Create comparative usage analyses between customers or time periods\n- Support capacity planning with historical usage patterns\n\n### Key response fields:\nAn array of `UsageBatchAggregate` objects containing:\n\n- `customer_id`: The customer this usage belongs to\n- `billable_metric_id` and `billable_metric_name`: What was measured\n- `start_timestamp` and `end_timestamp`: Time window for this data point\n- `value`: Aggregated usage amount for the period\n- `groups` (optional): Usage broken down by group keys with values\n- `next_page`: Pagination cursor for large result sets\n\n### Usage guidelines:\n- Time windows: Set `window_size` to `hour`, `day`, or `none` (entire period)\n- Required parameters: Must specify `starting_on`, `ending_before`, and `window_size`\n- Filtering options:\n - `customer_ids`: Limit to specific customers (omit for all customers)\n - `billable_metrics`: Limit to specific metrics (omit for all metrics)\n- Pagination: Use `next_page` cursor to retrieve large datasets\n- Null values: Group values may be null when no usage matches that group\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n billable_metric_id: {\n type: 'string'\n },\n billable_metric_name: {\n type: 'string'\n },\n customer_id: {\n type: 'string'\n },\n end_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n start_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n value: {\n type: 'number'\n },\n groups: {\n type: 'object',\n description: 'Values will be either a number or null. Null indicates that there were no matches for the group_by value.',\n additionalProperties: true\n }\n },\n required: [ 'billable_metric_id',\n 'billable_metric_name',\n 'customer_id',\n 'end_timestamp',\n 'start_timestamp',\n 'value'\n ]\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\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 aggregated usage data across multiple customers and billable metrics in a single query. This batch endpoint enables you to fetch usage patterns at scale, broken down by time windows, making it ideal for building analytics dashboards, generating reports, and monitoring platform-wide usage trends.\n\n### Use this endpoint to:\n- Generate platform-wide usage reports for internal teams\n- Monitor aggregate usage trends across your entire customer base\n- Create comparative usage analyses between customers or time periods\n- Support capacity planning with historical usage patterns\n\n### Key response fields:\nAn array of `UsageBatchAggregate` objects containing:\n\n- `customer_id`: The customer this usage belongs to\n- `billable_metric_id` and `billable_metric_name`: What was measured\n- `start_timestamp` and `end_timestamp`: Time window for this data point\n- `value`: Aggregated usage amount for the period\n- `groups` (optional): Usage broken down by group keys with values\n- `next_page`: Pagination cursor for large result sets\n\n### Usage guidelines:\n- Time windows: Set `window_size` to `hour`, `day`, or `none` (entire period)\n- Required parameters: Must specify `starting_on`, `ending_before`, and `window_size`\n- Filtering options:\n - `customer_ids`: Limit to specific customers (omit for all customers)\n - `billable_metrics`: Limit to specific metrics (omit for all metrics)\n- Pagination: Use `next_page` cursor to retrieve large datasets\n- Null values: Group values may be null when no usage matches that group\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/usage_list_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n usage_list_response: {\n type: 'object',\n properties: {\n billable_metric_id: {\n type: 'string'\n },\n billable_metric_name: {\n type: 'string'\n },\n customer_id: {\n type: 'string'\n },\n end_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n start_timestamp: {\n type: 'string',\n format: 'date-time'\n },\n value: {\n type: 'number'\n },\n groups: {\n type: 'object',\n description: 'Values will be either a number or null. Null indicates that there were no matches for the group_by value.',\n additionalProperties: true\n }\n },\n required: [ 'billable_metric_id',\n 'billable_metric_name',\n 'customer_id',\n 'end_timestamp',\n 'start_timestamp',\n 'value'\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_with_groups_v1_usage',
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 granular usage data for a specific customer and billable metric, with the ability to break down usage by custom grouping dimensions. This endpoint enables deep usage analytics by segmenting data across attributes like region, user, model type, or any custom dimension defined in your billable metrics.\n\n### Use this endpoint to:\n- Analyze usage patterns broken down by specific attributes (region, user, department, etc.)\n- Build detailed usage dashboards with dimensional filtering\n- Identify high-usage segments for optimization opportunities\n\n### Key response fields:\nAn array of `PagedUsageAggregate` objects containing:\n- `starting_on` and `ending_before`: Time window boundaries\n- `group_key`: The dimension being grouped by (e.g., \"region\")\n- `group_value`: The specific value for this group (e.g., \"US-East\")\n- `value`: Aggregated usage for this group and time window\n- `next_page`: Pagination cursor for large datasets\n\n### Usage guidelines:\n- Required parameters: Must specify `customer_id`, `billable_metric_id`, and `window_size`\n- Time windows: Set `window_size` to hour, day, or none for different granularities\n- Group filtering: Use `group_by` to specify:\n - key: The dimension to group by (must be set on the billable metric as a group key)\n - values: Optional array to filter to specific values only\n- Pagination: Use limit and `next_page` for large result sets\n- Null handling: `group_value` may be null for unmatched data\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n ending_before: {\n type: 'string',\n format: 'date-time'\n },\n group_key: {\n type: 'string'\n },\n group_value: {\n type: 'string'\n },\n starting_on: {\n type: 'string',\n format: 'date-time'\n },\n value: {\n type: 'number'\n }\n },\n required: [ 'ending_before',\n 'group_key',\n 'group_value',\n 'starting_on',\n 'value'\n ]\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\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 granular usage data for a specific customer and billable metric, with the ability to break down usage by custom grouping dimensions. This endpoint enables deep usage analytics by segmenting data across attributes like region, user, model type, or any custom dimension defined in your billable metrics.\n\n### Use this endpoint to:\n- Analyze usage patterns broken down by specific attributes (region, user, department, etc.)\n- Build detailed usage dashboards with dimensional filtering\n- Identify high-usage segments for optimization opportunities\n\n### Key response fields:\nAn array of `PagedUsageAggregate` objects containing:\n- `starting_on` and `ending_before`: Time window boundaries\n- `group_key`: The dimension being grouped by (e.g., \"region\")\n- `group_value`: The specific value for this group (e.g., \"US-East\")\n- `value`: Aggregated usage for this group and time window\n- `next_page`: Pagination cursor for large datasets\n\n### Usage guidelines:\n- Required parameters: Must specify `customer_id`, `billable_metric_id`, and `window_size`\n- Time windows: Set `window_size` to hour, day, or none for different granularities\n- Group filtering: Use `group_by` to specify:\n - key: The dimension to group by (must be set on the billable metric as a group key)\n - values: Optional array to filter to specific values only\n- Pagination: Use limit and `next_page` for large result sets\n- Null handling: `group_value` may be null for unmatched data\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: {\n $ref: '#/$defs/usage_list_with_groups_response'\n }\n },\n next_page: {\n type: 'string'\n }\n },\n required: [ 'data',\n 'next_page'\n ],\n $defs: {\n usage_list_with_groups_response: {\n type: 'object',\n properties: {\n ending_before: {\n type: 'string',\n format: 'date-time'\n },\n group_key: {\n type: 'string'\n },\n group_value: {\n type: 'string'\n },\n starting_on: {\n type: 'string',\n format: 'date-time'\n },\n value: {\n type: 'number'\n }\n },\n required: [ 'ending_before',\n 'group_key',\n 'group_value',\n 'starting_on',\n 'value'\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: 'search_v1_usage',
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\nThis endpoint retrieves events by transaction ID for events that occurred within the last 34 days. It is specifically designed for sampling-based testing workflows to detect revenue leakage. The Event Search API provides a critical observability tool that validates the integrity of your usage pipeline by allowing you to sample raw events and verify their matching against active billable metrics. \n\nWhy event observability matters for revenue leakage:\nSilent revenue loss occurs when events are dropped, delayed, or fail to match billable metrics due to:\n- Upstream system failures\n- Event format changes\n- Misconfigured billable metrics\n\n### Use this endpoint to:\n- Sample raw events and validate they match the expected billable metrics\n- Build custom leakage detection alerts to prevent silent revenue loss\n- Verify event processing accuracy during system changes or metric updates\n- Debug event matching issues in real-time\n\n### Key response fields:\n- Complete event details including transaction ID, customer ID, and properties\n- Matched Metronome customer (if any)\n- Matched billable metric information (if any)\n- Processing status and duplicate detection flags\n\n### Usage guidelines:\n⚠️ Important: This endpoint is heavily rate limited and designed for sampling workflows only. Do not use this endpoint to check every event in your system. Instead, implement a sampling strategy to randomly validate a subset of events for observability purposes.\n\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n customer_id: {\n type: 'string',\n description: 'The ID of the customer in the ingest event body'\n },\n event_type: {\n type: 'string'\n },\n timestamp: {\n type: 'string',\n format: 'date-time'\n },\n transaction_id: {\n type: 'string'\n },\n is_duplicate: {\n type: 'boolean'\n },\n matched_billable_metrics: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n description: '(DEPRECATED) use aggregation_type instead'\n },\n aggregate_keys: {\n type: 'array',\n description: '(DEPRECATED) use aggregation_key instead',\n items: {\n type: 'string'\n }\n },\n aggregation_key: {\n type: 'string',\n description: 'A key that specifies which property of the event is used to aggregate data. This key must be one of the property filter names and is not applicable when the aggregation type is \\'count\\'.'\n },\n aggregation_type: {\n type: 'string',\n description: 'Specifies the type of aggregation performed on matching events.',\n enum: [ 'COUNT',\n 'LATEST',\n 'MAX',\n 'SUM',\n 'UNIQUE'\n ]\n },\n archived_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the billable metric was archived. If not provided, the billable metric is not archived.',\n format: 'date-time'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n event_type_filter: {\n $ref: '#/$defs/event_type_filter'\n },\n filter: {\n type: 'object',\n description: '(DEPRECATED) use property_filters & event_type_filter instead',\n additionalProperties: true\n },\n group_by: {\n type: 'array',\n description: '(DEPRECATED) use group_keys instead',\n items: {\n type: 'string',\n description: 'A list of keys that can be used to additionally segment the values of the billable metric when making usage queries'\n }\n },\n group_keys: {\n type: 'array',\n description: 'Property names that are used to group usage costs on an invoice. Each entry represents a set of properties used to slice events into distinct buckets.',\n items: {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n },\n property_filters: {\n type: 'array',\n description: 'A list of filters to match events to this billable metric. Each filter defines a rule on an event property. All rules must pass for the event to match the billable metric.',\n items: {\n $ref: '#/$defs/property_filter'\n }\n },\n sql: {\n type: 'string',\n description: 'The SQL query associated with the billable metric'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n },\n matched_customer: {\n type: 'object',\n description: 'The customer the event was matched to if a match was found',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n }\n },\n processed_at: {\n type: 'string',\n format: 'date-time'\n },\n properties: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'customer_id',\n 'event_type',\n 'timestamp',\n 'transaction_id'\n ]\n },\n $defs: {\n event_type_filter: {\n type: 'object',\n description: 'An optional filtering rule to match the \\'event_type\\' property of an event.',\n properties: {\n in_values: {\n type: 'array',\n description: 'A list of event types that are explicitly included in the billable metric. If specified, only events of these types will match the billable metric. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n },\n not_in_values: {\n type: 'array',\n description: 'A list of event types that are explicitly excluded from the billable metric. If specified, events of these types will not match the billable metric. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n }\n }\n },\n property_filter: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'The name of the event property.'\n },\n exists: {\n type: 'boolean',\n description: 'Determines whether the property must exist in the event. If true, only events with this property will pass the filter. If false, only events without this property will pass the filter. If null or omitted, the existence of the property is optional.'\n },\n in_values: {\n type: 'array',\n description: 'Specifies the allowed values for the property to match an event. An event will pass the filter only if its property value is included in this list. If undefined, all property values will pass the filter. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n },\n not_in_values: {\n type: 'array',\n description: 'Specifies the values that prevent an event from matching the filter. An event will not pass the filter if its property value is included in this list. If null or empty, all property values will pass the filter. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n }\n },\n required: [ '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\nThis endpoint retrieves events by transaction ID for events that occurred within the last 34 days. It is specifically designed for sampling-based testing workflows to detect revenue leakage. The Event Search API provides a critical observability tool that validates the integrity of your usage pipeline by allowing you to sample raw events and verify their matching against active billable metrics. \n\nWhy event observability matters for revenue leakage:\nSilent revenue loss occurs when events are dropped, delayed, or fail to match billable metrics due to:\n- Upstream system failures\n- Event format changes\n- Misconfigured billable metrics\n\n### Use this endpoint to:\n- Sample raw events and validate they match the expected billable metrics\n- Build custom leakage detection alerts to prevent silent revenue loss\n- Verify event processing accuracy during system changes or metric updates\n- Debug event matching issues in real-time\n\n### Key response fields:\n- Complete event details including transaction ID, customer ID, and properties\n- Matched Metronome customer (if any)\n- Matched billable metric information (if any)\n- Processing status and duplicate detection flags\n\n### Usage guidelines:\n⚠️ Important: This endpoint is heavily rate limited and designed for sampling workflows only. Do not use this endpoint to check every event in your system. Instead, implement a sampling strategy to randomly validate a subset of events for observability purposes.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/usage_search_response',\n $defs: {\n usage_search_response: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n customer_id: {\n type: 'string',\n description: 'The ID of the customer in the ingest event body'\n },\n event_type: {\n type: 'string'\n },\n timestamp: {\n type: 'string',\n format: 'date-time'\n },\n transaction_id: {\n type: 'string'\n },\n is_duplicate: {\n type: 'boolean'\n },\n matched_billable_metrics: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n aggregate: {\n type: 'string',\n description: '(DEPRECATED) use aggregation_type instead'\n },\n aggregate_keys: {\n type: 'array',\n description: '(DEPRECATED) use aggregation_key instead',\n items: {\n type: 'string'\n }\n },\n aggregation_key: {\n type: 'string',\n description: 'A key that specifies which property of the event is used to aggregate data. This key must be one of the property filter names and is not applicable when the aggregation type is \\'count\\'.'\n },\n aggregation_type: {\n type: 'string',\n description: 'Specifies the type of aggregation performed on matching events.',\n enum: [ 'COUNT',\n 'LATEST',\n 'MAX',\n 'SUM',\n 'UNIQUE'\n ]\n },\n archived_at: {\n type: 'string',\n description: 'RFC 3339 timestamp indicating when the billable metric was archived. If not provided, the billable metric is not archived.',\n format: 'date-time'\n },\n custom_fields: {\n type: 'object',\n description: 'Custom fields to be added eg. { \"key1\": \"value1\", \"key2\": \"value2\" }',\n additionalProperties: true\n },\n event_type_filter: {\n $ref: '#/$defs/event_type_filter'\n },\n filter: {\n type: 'object',\n description: '(DEPRECATED) use property_filters & event_type_filter instead',\n additionalProperties: true\n },\n group_by: {\n type: 'array',\n description: '(DEPRECATED) use group_keys instead',\n items: {\n type: 'string',\n description: 'A list of keys that can be used to additionally segment the values of the billable metric when making usage queries'\n }\n },\n group_keys: {\n type: 'array',\n description: 'Property names that are used to group usage costs on an invoice. Each entry represents a set of properties used to slice events into distinct buckets.',\n items: {\n type: 'array',\n items: {\n type: 'string'\n }\n }\n },\n property_filters: {\n type: 'array',\n description: 'A list of filters to match events to this billable metric. Each filter defines a rule on an event property. All rules must pass for the event to match the billable metric.',\n items: {\n $ref: '#/$defs/property_filter'\n }\n },\n sql: {\n type: 'string',\n description: 'The SQL query associated with the billable metric'\n }\n },\n required: [ 'id',\n 'name'\n ]\n }\n },\n matched_customer: {\n type: 'object',\n description: 'The customer the event was matched to if a match was found',\n properties: {\n id: {\n type: 'string'\n },\n name: {\n type: 'string'\n }\n }\n },\n processed_at: {\n type: 'string',\n format: 'date-time'\n },\n properties: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'id',\n 'customer_id',\n 'event_type',\n 'timestamp',\n 'transaction_id'\n ]\n }\n },\n event_type_filter: {\n type: 'object',\n description: 'An optional filtering rule to match the \\'event_type\\' property of an event.',\n properties: {\n in_values: {\n type: 'array',\n description: 'A list of event types that are explicitly included in the billable metric. If specified, only events of these types will match the billable metric. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n },\n not_in_values: {\n type: 'array',\n description: 'A list of event types that are explicitly excluded from the billable metric. If specified, events of these types will not match the billable metric. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n }\n }\n },\n property_filter: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'The name of the event property.'\n },\n exists: {\n type: 'boolean',\n description: 'Determines whether the property must exist in the event. If true, only events with this property will pass the filter. If false, only events without this property will pass the filter. If null or omitted, the existence of the property is optional.'\n },\n in_values: {\n type: 'array',\n description: 'Specifies the allowed values for the property to match an event. An event will pass the filter only if its property value is included in this list. If undefined, all property values will pass the filter. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n },\n not_in_values: {\n type: 'array',\n description: 'Specifies the values that prevent an event from matching the filter. An event will not pass the filter if its property value is included in this list. If null or empty, all property values will pass the filter. Must be non-empty if present.',\n items: {\n type: 'string'\n }\n }\n },\n required: [ '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: 'edit_commit_v2_contracts',
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 specific details for a contract-level or customer-level commit. Use this endpoint to modify individual commit access schedules, invoice schedules, applicable products, invoicing contracts, or other fields. \n\n### Usage guidelines:\n- As with all edits in Metronome, draft invoices will reflect the edit immediately, while finalized invoices are untouched unless voided and regenerated.\n- If a commit's invoice schedule item is associated with a finalized invoice, you cannot remove or update the invoice schedule item.\n- If a commit's invoice schedule item is associated with a voided invoice, you cannot remove the invoice schedule item.\n- You cannot remove an commit access schedule segment that was applied to a finalized invoice. You can void the invoice beforehand and then remove the access schedule segment.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n data: {\n $ref: '#/$defs/id'\n }\n },\n required: [ 'data'\n ],\n $defs: {\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 specific details for a contract-level or customer-level commit. Use this endpoint to modify individual commit access schedules, invoice schedules, applicable products, invoicing contracts, or other fields. \n\n### Usage guidelines:\n- As with all edits in Metronome, draft invoices will reflect the edit immediately, while finalized invoices are untouched unless voided and regenerated.\n- If a commit's invoice schedule item is associated with a finalized invoice, you cannot remove or update the invoice schedule item.\n- If a commit's invoice schedule item is associated with a voided invoice, you cannot remove the invoice schedule item.\n- You cannot remove an commit access schedule segment that was applied to a finalized invoice. You can void the invoice beforehand and then remove the access schedule segment.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/contract_edit_commit_response',\n $defs: {\n contract_edit_commit_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: {
@@ -106,6 +106,9 @@ export const tool: Tool = {
106
106
  type: 'string',
107
107
  },
108
108
  },
109
+ hierarchy_configuration: {
110
+ $ref: '#/$defs/commit_hierarchy_configuration',
111
+ },
109
112
  invoice_contract_id: {
110
113
  type: 'string',
111
114
  description: 'ID of contract to use for invoicing',
@@ -204,6 +207,52 @@ export const tool: Tool = {
204
207
  },
205
208
  required: ['commit_id', 'customer_id'],
206
209
  $defs: {
210
+ commit_hierarchy_configuration: {
211
+ type: 'object',
212
+ properties: {
213
+ child_access: {
214
+ anyOf: [
215
+ {
216
+ type: 'object',
217
+ properties: {
218
+ type: {
219
+ type: 'string',
220
+ enum: ['ALL'],
221
+ },
222
+ },
223
+ required: ['type'],
224
+ },
225
+ {
226
+ type: 'object',
227
+ properties: {
228
+ type: {
229
+ type: 'string',
230
+ enum: ['NONE'],
231
+ },
232
+ },
233
+ required: ['type'],
234
+ },
235
+ {
236
+ type: 'object',
237
+ properties: {
238
+ contract_ids: {
239
+ type: 'array',
240
+ items: {
241
+ type: 'string',
242
+ },
243
+ },
244
+ type: {
245
+ type: 'string',
246
+ enum: ['CONTRACT_IDS'],
247
+ },
248
+ },
249
+ required: ['contract_ids', 'type'],
250
+ },
251
+ ],
252
+ },
253
+ },
254
+ required: ['child_access'],
255
+ },
207
256
  commit_specifier_input: {
208
257
  type: 'object',
209
258
  properties: {