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