@confluentinc/mcp-confluent 1.4.0 → 1.5.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 (344) hide show
  1. package/README.md +52 -31
  2. package/config.example.yaml +36 -7
  3. package/config.oauth.example.yaml +14 -1
  4. package/dist/config/env-config.d.ts +9 -3
  5. package/dist/config/env-config.d.ts.map +1 -1
  6. package/dist/config/env-config.js +15 -34
  7. package/dist/config/env-config.js.map +1 -1
  8. package/dist/config/models.d.ts +105 -13
  9. package/dist/config/models.d.ts.map +1 -1
  10. package/dist/config/models.js +49 -37
  11. package/dist/config/models.js.map +1 -1
  12. package/dist/confluent/base-client-manager.d.ts +2 -0
  13. package/dist/confluent/base-client-manager.d.ts.map +1 -1
  14. package/dist/confluent/base-client-manager.js +4 -0
  15. package/dist/confluent/base-client-manager.js.map +1 -1
  16. package/dist/confluent/client-manager.d.ts +14 -0
  17. package/dist/confluent/client-manager.d.ts.map +1 -1
  18. package/dist/confluent/oauth/auth0-config.d.ts +26 -4
  19. package/dist/confluent/oauth/auth0-config.d.ts.map +1 -1
  20. package/dist/confluent/oauth/auth0-config.js +59 -19
  21. package/dist/confluent/oauth/auth0-config.js.map +1 -1
  22. package/dist/confluent/oauth/types.d.ts +1 -2
  23. package/dist/confluent/oauth/types.d.ts.map +1 -1
  24. package/dist/confluent/oauth-client-manager.d.ts +5 -2
  25. package/dist/confluent/oauth-client-manager.d.ts.map +1 -1
  26. package/dist/confluent/oauth-client-manager.js +28 -6
  27. package/dist/confluent/oauth-client-manager.js.map +1 -1
  28. package/dist/confluent/oauth-resource-resolvers.d.ts +11 -0
  29. package/dist/confluent/oauth-resource-resolvers.d.ts.map +1 -1
  30. package/dist/confluent/oauth-resource-resolvers.js +24 -0
  31. package/dist/confluent/oauth-resource-resolvers.js.map +1 -1
  32. package/dist/confluent/schema-registry-helper.d.ts +114 -7
  33. package/dist/confluent/schema-registry-helper.d.ts.map +1 -1
  34. package/dist/confluent/schema-registry-helper.js +302 -40
  35. package/dist/confluent/schema-registry-helper.js.map +1 -1
  36. package/dist/confluent/tools/base-tools.d.ts +165 -21
  37. package/dist/confluent/tools/base-tools.d.ts.map +1 -1
  38. package/dist/confluent/tools/base-tools.js +223 -20
  39. package/dist/confluent/tools/base-tools.js.map +1 -1
  40. package/dist/confluent/tools/cluster-arg-resolvers.d.ts +21 -0
  41. package/dist/confluent/tools/cluster-arg-resolvers.d.ts.map +1 -1
  42. package/dist/confluent/tools/cluster-arg-resolvers.js +45 -0
  43. package/dist/confluent/tools/cluster-arg-resolvers.js.map +1 -1
  44. package/dist/confluent/tools/connection-predicates.d.ts +70 -7
  45. package/dist/confluent/tools/connection-predicates.d.ts.map +1 -1
  46. package/dist/confluent/tools/connection-predicates.js +69 -6
  47. package/dist/confluent/tools/connection-predicates.js.map +1 -1
  48. package/dist/confluent/tools/handlers/billing/list-billing-costs-handler.js +1 -1
  49. package/dist/confluent/tools/handlers/billing/list-billing-costs-handler.js.map +1 -1
  50. package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.d.ts +1 -2
  51. package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.d.ts.map +1 -1
  52. package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.js +9 -5
  53. package/dist/confluent/tools/handlers/catalog/add-tags-to-topic.js.map +1 -1
  54. package/dist/confluent/tools/handlers/catalog/create-topic-tags.d.ts +1 -2
  55. package/dist/confluent/tools/handlers/catalog/create-topic-tags.d.ts.map +1 -1
  56. package/dist/confluent/tools/handlers/catalog/create-topic-tags.js +9 -5
  57. package/dist/confluent/tools/handlers/catalog/create-topic-tags.js.map +1 -1
  58. package/dist/confluent/tools/handlers/catalog/delete-tag.d.ts +1 -2
  59. package/dist/confluent/tools/handlers/catalog/delete-tag.d.ts.map +1 -1
  60. package/dist/confluent/tools/handlers/catalog/delete-tag.js +9 -5
  61. package/dist/confluent/tools/handlers/catalog/delete-tag.js.map +1 -1
  62. package/dist/confluent/tools/handlers/catalog/list-tags.d.ts +2 -3
  63. package/dist/confluent/tools/handlers/catalog/list-tags.d.ts.map +1 -1
  64. package/dist/confluent/tools/handlers/catalog/list-tags.js +14 -6
  65. package/dist/confluent/tools/handlers/catalog/list-tags.js.map +1 -1
  66. package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.d.ts +1 -2
  67. package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.d.ts.map +1 -1
  68. package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.js +9 -5
  69. package/dist/confluent/tools/handlers/catalog/remove-tag-from-entity.js.map +1 -1
  70. package/dist/confluent/tools/handlers/clusters/list-clusters-handler.d.ts.map +1 -1
  71. package/dist/confluent/tools/handlers/clusters/list-clusters-handler.js +1 -1
  72. package/dist/confluent/tools/handlers/clusters/list-clusters-handler.js.map +1 -1
  73. package/dist/confluent/tools/handlers/connect/connect-tool-handler.d.ts +8 -8
  74. package/dist/confluent/tools/handlers/connect/connect-tool-handler.d.ts.map +1 -1
  75. package/dist/confluent/tools/handlers/connect/connect-tool-handler.js +9 -10
  76. package/dist/confluent/tools/handlers/connect/connect-tool-handler.js.map +1 -1
  77. package/dist/confluent/tools/handlers/connect/create-connector-handler.d.ts.map +1 -1
  78. package/dist/confluent/tools/handlers/connect/create-connector-handler.js +1 -2
  79. package/dist/confluent/tools/handlers/connect/create-connector-handler.js.map +1 -1
  80. package/dist/confluent/tools/handlers/connect/delete-connector-handler.d.ts.map +1 -1
  81. package/dist/confluent/tools/handlers/connect/delete-connector-handler.js +1 -2
  82. package/dist/confluent/tools/handlers/connect/delete-connector-handler.js.map +1 -1
  83. package/dist/confluent/tools/handlers/connect/get-connector-config-handler.d.ts.map +1 -1
  84. package/dist/confluent/tools/handlers/connect/get-connector-config-handler.js +1 -2
  85. package/dist/confluent/tools/handlers/connect/get-connector-config-handler.js.map +1 -1
  86. package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.d.ts.map +1 -1
  87. package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.js +1 -2
  88. package/dist/confluent/tools/handlers/connect/get-connector-error-recommendations-handler.js.map +1 -1
  89. package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.d.ts.map +1 -1
  90. package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.js +1 -2
  91. package/dist/confluent/tools/handlers/connect/get-connector-error-summary-handler.js.map +1 -1
  92. package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.d.ts.map +1 -1
  93. package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.js +36 -11
  94. package/dist/confluent/tools/handlers/connect/get-connector-logs-handler.js.map +1 -1
  95. package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.d.ts.map +1 -1
  96. package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.js +1 -2
  97. package/dist/confluent/tools/handlers/connect/get-connector-offsets-handler.js.map +1 -1
  98. package/dist/confluent/tools/handlers/connect/get-connector-status-handler.d.ts.map +1 -1
  99. package/dist/confluent/tools/handlers/connect/get-connector-status-handler.js +1 -2
  100. package/dist/confluent/tools/handlers/connect/get-connector-status-handler.js.map +1 -1
  101. package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.d.ts.map +1 -1
  102. package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.js +1 -2
  103. package/dist/confluent/tools/handlers/connect/get-connector-tasks-handler.js.map +1 -1
  104. package/dist/confluent/tools/handlers/connect/list-connectors-handler.d.ts.map +1 -1
  105. package/dist/confluent/tools/handlers/connect/list-connectors-handler.js +1 -2
  106. package/dist/confluent/tools/handlers/connect/list-connectors-handler.js.map +1 -1
  107. package/dist/confluent/tools/handlers/connect/pause-connector-handler.d.ts.map +1 -1
  108. package/dist/confluent/tools/handlers/connect/pause-connector-handler.js +1 -2
  109. package/dist/confluent/tools/handlers/connect/pause-connector-handler.js.map +1 -1
  110. package/dist/confluent/tools/handlers/connect/restart-connector-handler.d.ts.map +1 -1
  111. package/dist/confluent/tools/handlers/connect/restart-connector-handler.js +1 -2
  112. package/dist/confluent/tools/handlers/connect/restart-connector-handler.js.map +1 -1
  113. package/dist/confluent/tools/handlers/connect/resume-connector-handler.d.ts.map +1 -1
  114. package/dist/confluent/tools/handlers/connect/resume-connector-handler.js +1 -2
  115. package/dist/confluent/tools/handlers/connect/resume-connector-handler.js.map +1 -1
  116. package/dist/confluent/tools/handlers/connect/update-connector-config-handler.d.ts.map +1 -1
  117. package/dist/confluent/tools/handlers/connect/update-connector-config-handler.js +1 -2
  118. package/dist/confluent/tools/handlers/connect/update-connector-config-handler.js.map +1 -1
  119. package/dist/confluent/tools/handlers/diagnostics/config-help-handler.d.ts +42 -0
  120. package/dist/confluent/tools/handlers/diagnostics/config-help-handler.d.ts.map +1 -0
  121. package/dist/confluent/tools/handlers/diagnostics/config-help-handler.js +297 -0
  122. package/dist/confluent/tools/handlers/diagnostics/config-help-handler.js.map +1 -0
  123. package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.d.ts +31 -0
  124. package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.d.ts.map +1 -0
  125. package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.js +116 -0
  126. package/dist/confluent/tools/handlers/diagnostics/describe-configured-connection-handler.js.map +1 -0
  127. package/dist/confluent/tools/handlers/diagnostics/describe-fields.d.ts +52 -0
  128. package/dist/confluent/tools/handlers/diagnostics/describe-fields.d.ts.map +1 -0
  129. package/dist/confluent/tools/handlers/diagnostics/describe-fields.js +114 -0
  130. package/dist/confluent/tools/handlers/diagnostics/describe-fields.js.map +1 -0
  131. package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.d.ts +19 -42
  132. package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.d.ts.map +1 -1
  133. package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.js +95 -81
  134. package/dist/confluent/tools/handlers/diagnostics/explain-disabled-tools-handler.js.map +1 -1
  135. package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.d.ts +27 -0
  136. package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.d.ts.map +1 -0
  137. package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.js +93 -0
  138. package/dist/confluent/tools/handlers/diagnostics/list-configured-connections-handler.js.map +1 -0
  139. package/dist/confluent/tools/handlers/environments/list-environments-handler.js +1 -1
  140. package/dist/confluent/tools/handlers/environments/list-environments-handler.js.map +1 -1
  141. package/dist/confluent/tools/handlers/environments/read-environment-handler.js +1 -1
  142. package/dist/confluent/tools/handlers/environments/read-environment-handler.js.map +1 -1
  143. package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.d.ts.map +1 -1
  144. package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.js +24 -21
  145. package/dist/confluent/tools/handlers/flink/catalog/describe-table-handler.js.map +1 -1
  146. package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.d.ts.map +1 -1
  147. package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.js +24 -21
  148. package/dist/confluent/tools/handlers/flink/catalog/get-table-info-handler.js.map +1 -1
  149. package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.d.ts.map +1 -1
  150. package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.js +9 -7
  151. package/dist/confluent/tools/handlers/flink/catalog/list-catalogs-handler.js.map +1 -1
  152. package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.d.ts.map +1 -1
  153. package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.js +14 -12
  154. package/dist/confluent/tools/handlers/flink/catalog/list-databases-handler.js.map +1 -1
  155. package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.d.ts.map +1 -1
  156. package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.js +14 -12
  157. package/dist/confluent/tools/handlers/flink/catalog/list-tables-handler.js.map +1 -1
  158. package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.d.ts.map +1 -1
  159. package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.js +27 -22
  160. package/dist/confluent/tools/handlers/flink/create-flink-statement-handler.js.map +1 -1
  161. package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.d.ts.map +1 -1
  162. package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.js +20 -12
  163. package/dist/confluent/tools/handlers/flink/delete-flink-statement-handler.js.map +1 -1
  164. package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.d.ts.map +1 -1
  165. package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.js +20 -12
  166. package/dist/confluent/tools/handlers/flink/diagnostics/check-health-handler.js.map +1 -1
  167. package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.d.ts.map +1 -1
  168. package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.js +20 -18
  169. package/dist/confluent/tools/handlers/flink/diagnostics/detect-issues-handler.js.map +1 -1
  170. package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.d.ts.map +1 -1
  171. package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.js +24 -22
  172. package/dist/confluent/tools/handlers/flink/diagnostics/query-profiler-handler.js.map +1 -1
  173. package/dist/confluent/tools/handlers/flink/flink-sql-helper.d.ts +3 -2
  174. package/dist/confluent/tools/handlers/flink/flink-sql-helper.d.ts.map +1 -1
  175. package/dist/confluent/tools/handlers/flink/flink-sql-helper.js +133 -57
  176. package/dist/confluent/tools/handlers/flink/flink-sql-helper.js.map +1 -1
  177. package/dist/confluent/tools/handlers/flink/flink-tool-handler.d.ts +27 -6
  178. package/dist/confluent/tools/handlers/flink/flink-tool-handler.d.ts.map +1 -1
  179. package/dist/confluent/tools/handlers/flink/flink-tool-handler.js +36 -7
  180. package/dist/confluent/tools/handlers/flink/flink-tool-handler.js.map +1 -1
  181. package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.d.ts.map +1 -1
  182. package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.js +20 -12
  183. package/dist/confluent/tools/handlers/flink/get-flink-exceptions-handler.js.map +1 -1
  184. package/dist/confluent/tools/handlers/flink/{read-flink-statement-handler.d.ts → get-flink-statement-results-handler.d.ts} +2 -2
  185. package/dist/confluent/tools/handlers/flink/get-flink-statement-results-handler.d.ts.map +1 -0
  186. package/dist/confluent/tools/handlers/flink/{read-flink-statement-handler.js → get-flink-statement-results-handler.js} +30 -22
  187. package/dist/confluent/tools/handlers/flink/get-flink-statement-results-handler.js.map +1 -0
  188. package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.d.ts +10 -0
  189. package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.d.ts.map +1 -0
  190. package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.js +118 -0
  191. package/dist/confluent/tools/handlers/flink/list-compute-pools-handler.js.map +1 -0
  192. package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.d.ts.map +1 -1
  193. package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.js +19 -17
  194. package/dist/confluent/tools/handlers/flink/list-flink-statements-handler.js.map +1 -1
  195. package/dist/confluent/tools/handlers/kafka/alter-topic-config.d.ts.map +1 -1
  196. package/dist/confluent/tools/handlers/kafka/alter-topic-config.js +1 -1
  197. package/dist/confluent/tools/handlers/kafka/alter-topic-config.js.map +1 -1
  198. package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.d.ts +15 -5
  199. package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.d.ts.map +1 -1
  200. package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.js +54 -10
  201. package/dist/confluent/tools/handlers/kafka/consume-kafka-messages-handler.js.map +1 -1
  202. package/dist/confluent/tools/handlers/kafka/create-topics-handler.d.ts.map +1 -1
  203. package/dist/confluent/tools/handlers/kafka/create-topics-handler.js +12 -3
  204. package/dist/confluent/tools/handlers/kafka/create-topics-handler.js.map +1 -1
  205. package/dist/confluent/tools/handlers/kafka/delete-topics-handler.d.ts.map +1 -1
  206. package/dist/confluent/tools/handlers/kafka/delete-topics-handler.js +1 -1
  207. package/dist/confluent/tools/handlers/kafka/delete-topics-handler.js.map +1 -1
  208. package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.d.ts.map +1 -1
  209. package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.js +1 -1
  210. package/dist/confluent/tools/handlers/kafka/describe-consumer-group-handler.js.map +1 -1
  211. package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.d.ts.map +1 -1
  212. package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.js +1 -1
  213. package/dist/confluent/tools/handlers/kafka/get-consumer-group-lag-handler.js.map +1 -1
  214. package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.d.ts.map +1 -1
  215. package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.js +1 -1
  216. package/dist/confluent/tools/handlers/kafka/get-partition-offsets-handler.js.map +1 -1
  217. package/dist/confluent/tools/handlers/kafka/get-topic-config.d.ts.map +1 -1
  218. package/dist/confluent/tools/handlers/kafka/get-topic-config.js +1 -1
  219. package/dist/confluent/tools/handlers/kafka/get-topic-config.js.map +1 -1
  220. package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.d.ts.map +1 -1
  221. package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.js +1 -1
  222. package/dist/confluent/tools/handlers/kafka/list-consumer-groups-handler.js.map +1 -1
  223. package/dist/confluent/tools/handlers/kafka/list-topics-handler.d.ts.map +1 -1
  224. package/dist/confluent/tools/handlers/kafka/list-topics-handler.js +1 -1
  225. package/dist/confluent/tools/handlers/kafka/list-topics-handler.js.map +1 -1
  226. package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.d.ts +8 -1
  227. package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.d.ts.map +1 -1
  228. package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.js +140 -34
  229. package/dist/confluent/tools/handlers/kafka/produce-kafka-message-handler.js.map +1 -1
  230. package/dist/confluent/tools/handlers/metrics/list-metrics-handler.d.ts +1 -2
  231. package/dist/confluent/tools/handlers/metrics/list-metrics-handler.d.ts.map +1 -1
  232. package/dist/confluent/tools/handlers/metrics/list-metrics-handler.js +3 -3
  233. package/dist/confluent/tools/handlers/metrics/list-metrics-handler.js.map +1 -1
  234. package/dist/confluent/tools/handlers/metrics/query-metrics-handler.d.ts +1 -2
  235. package/dist/confluent/tools/handlers/metrics/query-metrics-handler.d.ts.map +1 -1
  236. package/dist/confluent/tools/handlers/metrics/query-metrics-handler.js +6 -4
  237. package/dist/confluent/tools/handlers/metrics/query-metrics-handler.js.map +1 -1
  238. package/dist/confluent/tools/handlers/organizations/list-organizations-handler.d.ts.map +1 -1
  239. package/dist/confluent/tools/handlers/organizations/list-organizations-handler.js +2 -1
  240. package/dist/confluent/tools/handlers/organizations/list-organizations-handler.js.map +1 -1
  241. package/dist/confluent/tools/handlers/schema/create-schema-handler.d.ts +10 -0
  242. package/dist/confluent/tools/handlers/schema/create-schema-handler.d.ts.map +1 -0
  243. package/dist/confluent/tools/handlers/schema/create-schema-handler.js +76 -0
  244. package/dist/confluent/tools/handlers/schema/create-schema-handler.js.map +1 -0
  245. package/dist/confluent/tools/handlers/schema/delete-schema-handler.js +1 -1
  246. package/dist/confluent/tools/handlers/schema/delete-schema-handler.js.map +1 -1
  247. package/dist/confluent/tools/handlers/schema/list-schemas-handler.js +1 -1
  248. package/dist/confluent/tools/handlers/schema/list-schemas-handler.js.map +1 -1
  249. package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.d.ts +1 -2
  250. package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.d.ts.map +1 -1
  251. package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.js +9 -5
  252. package/dist/confluent/tools/handlers/search/search-topic-by-tag-handler.js.map +1 -1
  253. package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.d.ts +1 -2
  254. package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.d.ts.map +1 -1
  255. package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.js +9 -5
  256. package/dist/confluent/tools/handlers/search/search-topics-by-name-handler.js.map +1 -1
  257. package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.d.ts.map +1 -1
  258. package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.js +2 -2
  259. package/dist/confluent/tools/handlers/tableflow/catalog/create-tableflow-catalog-integration-handler.js.map +1 -1
  260. package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.d.ts.map +1 -1
  261. package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.js +2 -2
  262. package/dist/confluent/tools/handlers/tableflow/catalog/delete-tableflow-catalog-integration-handler.js.map +1 -1
  263. package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.d.ts.map +1 -1
  264. package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.js +2 -2
  265. package/dist/confluent/tools/handlers/tableflow/catalog/list-tableflow-catalog-integrations-handler.js.map +1 -1
  266. package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.d.ts.map +1 -1
  267. package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.js +2 -2
  268. package/dist/confluent/tools/handlers/tableflow/catalog/read-tableflow-catalog-integration-handler.js.map +1 -1
  269. package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.d.ts.map +1 -1
  270. package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.js +1 -1
  271. package/dist/confluent/tools/handlers/tableflow/catalog/update-tableflow-catalog-integration-handler.js.map +1 -1
  272. package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.d.ts.map +1 -1
  273. package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.js +1 -1
  274. package/dist/confluent/tools/handlers/tableflow/list-tableflow-regions-handler.js.map +1 -1
  275. package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.d.ts +15 -10
  276. package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.d.ts.map +1 -1
  277. package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.js +17 -14
  278. package/dist/confluent/tools/handlers/tableflow/tableflow-tool-handler.js.map +1 -1
  279. package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.d.ts.map +1 -1
  280. package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.js +2 -2
  281. package/dist/confluent/tools/handlers/tableflow/topic/create-tableflow-topic-handler.js.map +1 -1
  282. package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.d.ts.map +1 -1
  283. package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.js +2 -2
  284. package/dist/confluent/tools/handlers/tableflow/topic/delete-tableflow-topic-handler.js.map +1 -1
  285. package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.d.ts.map +1 -1
  286. package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.js +2 -2
  287. package/dist/confluent/tools/handlers/tableflow/topic/list-tableflow-topics-handler.js.map +1 -1
  288. package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.d.ts.map +1 -1
  289. package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.js +2 -2
  290. package/dist/confluent/tools/handlers/tableflow/topic/read-tableflow-topic-handler.js.map +1 -1
  291. package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.d.ts.map +1 -1
  292. package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.js +1 -1
  293. package/dist/confluent/tools/handlers/tableflow/topic/update-tableflow-topic-handler.js.map +1 -1
  294. package/dist/confluent/tools/tool-availability.d.ts +59 -28
  295. package/dist/confluent/tools/tool-availability.d.ts.map +1 -1
  296. package/dist/confluent/tools/tool-availability.js +101 -69
  297. package/dist/confluent/tools/tool-availability.js.map +1 -1
  298. package/dist/confluent/tools/tool-metadata-handler.d.ts +51 -0
  299. package/dist/confluent/tools/tool-metadata-handler.d.ts.map +1 -0
  300. package/dist/confluent/tools/tool-metadata-handler.js +61 -0
  301. package/dist/confluent/tools/tool-metadata-handler.js.map +1 -0
  302. package/dist/confluent/tools/tool-name.d.ts +7 -2
  303. package/dist/confluent/tools/tool-name.d.ts.map +1 -1
  304. package/dist/confluent/tools/tool-name.js +6 -1
  305. package/dist/confluent/tools/tool-name.js.map +1 -1
  306. package/dist/confluent/tools/tool-registry.d.ts.map +1 -1
  307. package/dist/confluent/tools/tool-registry.js +24 -2
  308. package/dist/confluent/tools/tool-registry.js.map +1 -1
  309. package/dist/env-schema.d.ts +0 -1
  310. package/dist/env-schema.d.ts.map +1 -1
  311. package/dist/env-schema.js +0 -7
  312. package/dist/env-schema.js.map +1 -1
  313. package/dist/env.d.ts +0 -1
  314. package/dist/env.d.ts.map +1 -1
  315. package/dist/index.d.ts +54 -64
  316. package/dist/index.d.ts.map +1 -1
  317. package/dist/index.js +78 -324
  318. package/dist/index.js.map +1 -1
  319. package/dist/lazy.d.ts +4 -2
  320. package/dist/lazy.d.ts.map +1 -1
  321. package/dist/lazy.js +27 -12
  322. package/dist/lazy.js.map +1 -1
  323. package/dist/mcp/server.d.ts.map +1 -1
  324. package/dist/mcp/server.js +8 -5
  325. package/dist/mcp/server.js.map +1 -1
  326. package/dist/preflight.d.ts +33 -0
  327. package/dist/preflight.d.ts.map +1 -0
  328. package/dist/preflight.js +68 -0
  329. package/dist/preflight.js.map +1 -0
  330. package/dist/server-main.d.ts +98 -0
  331. package/dist/server-main.d.ts.map +1 -0
  332. package/dist/server-main.js +383 -0
  333. package/dist/server-main.js.map +1 -0
  334. package/dist/server-runtime.d.ts +20 -5
  335. package/dist/server-runtime.d.ts.map +1 -1
  336. package/dist/server-runtime.js +45 -28
  337. package/dist/server-runtime.js.map +1 -1
  338. package/dist/utils/quote-join-ids.d.ts +9 -0
  339. package/dist/utils/quote-join-ids.d.ts.map +1 -0
  340. package/dist/utils/quote-join-ids.js +11 -0
  341. package/dist/utils/quote-join-ids.js.map +1 -0
  342. package/package.json +32 -34
  343. package/dist/confluent/tools/handlers/flink/read-flink-statement-handler.d.ts.map +0 -1
  344. package/dist/confluent/tools/handlers/flink/read-flink-statement-handler.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js";
2
- import type { ConnectionConfig } from "../../config/models.js";
2
+ import type { ConnectionConfig, DirectConnectionConfig } from "../../config/models.js";
3
3
  import type { BaseClientManager } from "../../confluent/base-client-manager.js";
4
4
  import { CallToolResult } from "../../confluent/schema.js";
5
5
  import { ConnectionPredicate, PredicateResult } from "../../confluent/tools/connection-predicates.js";
6
6
  import { ToolName } from "../../confluent/tools/tool-name.js";
7
7
  import { ServerRuntime } from "../../server-runtime.js";
8
- import { ZodRawShape } from "zod";
8
+ import { z, ZodRawShape } from "zod";
9
9
  /**
10
10
  * Standard MCP tool annotations.
11
11
  * Tools should reference these constants rather than creating ad-hoc instances.
@@ -13,6 +13,18 @@ import { ZodRawShape } from "zod";
13
13
  export declare const READ_ONLY: ToolAnnotations;
14
14
  export declare const CREATE_UPDATE: ToolAnnotations;
15
15
  export declare const DESTRUCTIVE: ToolAnnotations;
16
+ /**
17
+ * Opening clause of the injected `connectionId` parameter description, before the
18
+ * quoted, comma-separated list of viable connection ids (see
19
+ * {@linkcode quoteJoinIds}) is appended.
20
+ */
21
+ export declare const CONNECTION_ID_DESCRIPTION_PREFIX = "Which configured connection to target. One of: ";
22
+ /**
23
+ * Sentence appended to the `connectionId` description that steers the agent at the
24
+ * discovery tool. Emitted only when that tool is itself reachable; the joining space
25
+ * is added at the call site so a blocked tool leaves no dangling trailing space.
26
+ */
27
+ export declare const LIST_CONFIGURED_CONNECTIONS_POINTER = "Discover connections and learn what tools are supported by each connection by invoking 'list-configured-connections'.";
16
28
  /**
17
29
  * Operator-facing taxonomy of tool kinds.
18
30
  *
@@ -34,8 +46,18 @@ export declare enum ToolCategory {
34
46
  Tableflow = "tableflow"
35
47
  }
36
48
  export interface ToolHandler {
49
+ /** Handle a tool invocation. */
37
50
  handle(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined, sessionId?: string): Promise<CallToolResult> | CallToolResult;
38
- getToolConfig(): ToolConfig;
51
+ /**
52
+ * Produce the actual config registered with MCP for this tool, injecting a
53
+ * required `connectionId` parameter when the server holds more than one
54
+ * connection. See {@linkcode BaseToolHandler.getRegisteredToolConfig} for the
55
+ * rules.
56
+ *
57
+ * This method is called when setting up the MCP server, and we ourselves make
58
+ * the downcall to the handler-authored `getToolConfig()`.
59
+ */
60
+ getRegisteredToolConfig(runtime: ServerRuntime): RegisteredToolConfig;
39
61
  /**
40
62
  * The connection predicate that gates this tool's enablement. Lifted onto
41
63
  * the interface so the MCP tool-call wrapper can compare it against
@@ -68,6 +90,16 @@ export interface ToolHandler {
68
90
  * `describe-tool-availability` diagnostic tool.
69
91
  */
70
92
  connectionVerdicts(runtime: ServerRuntime): Map<string, PredicateResult>;
93
+ /**
94
+ * Whether this tool is enabled irrespective of the configured connections.
95
+ * See {@linkcode BaseToolHandler.isConnectionIndependent}.
96
+ */
97
+ readonly isConnectionIndependent: boolean;
98
+ /**
99
+ * The connection id this invocation routes to, or `undefined` when it routes
100
+ * to none. See {@linkcode BaseToolHandler.resolvedTargetConnectionId}.
101
+ */
102
+ resolvedTargetConnectionId(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined): string | undefined;
71
103
  }
72
104
  export interface ToolConfig {
73
105
  name: ToolName;
@@ -75,9 +107,65 @@ export interface ToolConfig {
75
107
  inputSchema: ZodRawShape;
76
108
  annotations: ToolAnnotations;
77
109
  }
110
+ /**
111
+ * The config actually registered with MCP, produced by
112
+ * {@linkcode BaseToolHandler.getRegisteredToolConfig}. Differs from the
113
+ * handler-authored {@linkcode ToolConfig} in that `inputSchema` is a resolved,
114
+ * strict Zod object rather than a bare shape: strict so unknown parameters are
115
+ * rejected (not silently stripped) before `handle()` runs, and resolved because
116
+ * a multi-connection server injects the required `connectionId` enum into it.
117
+ */
118
+ export interface RegisteredToolConfig extends Omit<ToolConfig, "inputSchema"> {
119
+ inputSchema: z.ZodObject;
120
+ }
121
+ /**
122
+ * What the connection-resolution helpers hand back: the chosen connection id,
123
+ * its resolved config, and the client manager bound to it.
124
+ *
125
+ * Generic over the connection arm so the type-neutral resolvers
126
+ * ({@linkcode BaseToolHandler.resolveConnection}) and the direct-narrowing one
127
+ * ({@linkcode BaseToolHandler.resolveDirectConnection}) share a single name —
128
+ * the latter instantiates it via the {@link ResolvedDirectConnection} alias.
129
+ */
130
+ export interface ResolvedConnection<C extends ConnectionConfig = ConnectionConfig> {
131
+ connId: string;
132
+ conn: C;
133
+ clientManager: BaseClientManager;
134
+ }
135
+ /**
136
+ * A {@link ResolvedConnection} pre-narrowed to the direct arm — the return type
137
+ * of {@linkcode BaseToolHandler.resolveDirectConnection}.
138
+ */
139
+ export type ResolvedDirectConnection = ResolvedConnection<DirectConnectionConfig>;
78
140
  export declare abstract class BaseToolHandler implements ToolHandler {
79
141
  abstract handle(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined, sessionId?: string): Promise<CallToolResult> | CallToolResult;
80
- abstract getToolConfig(): ToolConfig;
142
+ protected abstract getToolConfig(): ToolConfig;
143
+ /**
144
+ * Produce the actual config registered with MCP for this tool.
145
+ *
146
+ * * If the tool is connection-oriented and the server is configured
147
+ * with multiple connections, injects a required `connectionId` parameter
148
+ * indicating which connection the tool call should route to.
149
+ * See {@linkcode registeredInputShape} for more details.
150
+ *
151
+ * * Wrap the input schema in `z.object(...).strict()` to uniformly reject
152
+ * unknown parameters before `handle()` runs.
153
+ *
154
+ * This method is called for each active tool when setting up the MCP server.
155
+ *
156
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
157
+ */
158
+ getRegisteredToolConfig(runtime: ServerRuntime): RegisteredToolConfig;
159
+ /**
160
+ * The input shape to register, before strict-wrapping: the authored shape,
161
+ * plus a required `connectionId` enum when the server holds more than one
162
+ * connection AND this tool is connection-oriented. A single-element enum (when
163
+ * only one connection is viable) is still injected on a multi-connection server,
164
+ * so that an explicit request for a non-viable connection (e.g. to a disabled
165
+ * tool because it is read_only) is rejected by the enum rather than silently
166
+ * auto-routed.
167
+ */
168
+ private registeredInputShape;
81
169
  /**
82
170
  * The connection predicate that gates this tool. The single customization
83
171
  * seam for tool enablement — declared as a one-line readonly property:
@@ -117,8 +205,10 @@ export declare abstract class BaseToolHandler implements ToolHandler {
117
205
  */
118
206
  abstract readonly category: ToolCategory;
119
207
  /**
120
- * IDs of connections that satisfy this tool's {@linkcode predicate}. A
121
- * non-empty result enables the tool; an empty result disables it.
208
+ * IDs of connections that satisfy this tool's {@linkcode predicate} and are
209
+ * not blocked by the read-only overlay. A non-empty result enables the tool;
210
+ * an empty result disables it. Derived from {@linkcode connectionVerdicts} so
211
+ * the two stay in lockstep.
122
212
  *
123
213
  * Customize tool gating by declaring {@linkcode predicate}, never by
124
214
  * replacing this derivation.
@@ -127,9 +217,40 @@ export declare abstract class BaseToolHandler implements ToolHandler {
127
217
  */
128
218
  enabledConnectionIds(runtime: ServerRuntime): string[];
129
219
  /**
130
- * Per-connection verdict map for this tool, derived from
131
- * {@linkcode predicate}. Powers grouped startup logging and
132
- * the diagnostic-tool surface.
220
+ * Whether this tool is enabled regardless of the configured connections —
221
+ * true exactly when its {@linkcode predicate} is `alwaysEnabled`, the only
222
+ * predicate that returns enabled without inspecting a connection. Such tools
223
+ * (docs lookup, server diagnostics) never route to a connection, so they
224
+ * register even on a zero-connection config, where the per-connection verdict
225
+ * map driving {@linkcode enabledConnectionIds} is empty.
226
+ */
227
+ get isConnectionIndependent(): boolean;
228
+ /**
229
+ * The connection id this invocation routes to — the OAuth-login gate uses it
230
+ * to launch the browser flow only when a call actually targets the OAuth
231
+ * connection, not merely because one exists somewhere in the config.
232
+ *
233
+ * Returns `undefined` for a connection-independent tool — it routes to no
234
+ * connection, so there is nothing to pre-launch a login for.
235
+ *
236
+ * Otherwise delegates to {@linkcode resolveConnection} so routing is decided
237
+ * in one place rather than duplicated in the gate, and propagates its throw.
238
+ * Every throw path there is a `"Wacky --"` invariant violation: the injected
239
+ * schema (see {@linkcode getRegisteredToolConfig}) makes `connectionId`
240
+ * required for multi-connection tools and strips it for single-connection
241
+ * ones, so a call that can't resolve means that contract broke. Surfacing the
242
+ * error rather than swallowing it to `undefined` lets the broken invariant
243
+ * reach the caller instead of being silently re-discovered inside `handle()`.
244
+ *
245
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
246
+ */
247
+ resolvedTargetConnectionId(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined): string | undefined;
248
+ /**
249
+ * Per-connection verdict map for this tool — the single source of truth for
250
+ * enablement. Each verdict composes the {@linkcode predicate} with the
251
+ * read-only overlay (see {@linkcode connectionVerdict}). Powers grouped
252
+ * startup logging, the diagnostic-tool surface, and
253
+ * {@linkcode enabledConnectionIds}.
133
254
  *
134
255
  * Customize tool gating by declaring {@linkcode predicate}, never by
135
256
  * replacing this derivation.
@@ -138,20 +259,43 @@ export declare abstract class BaseToolHandler implements ToolHandler {
138
259
  */
139
260
  connectionVerdicts(runtime: ServerRuntime): Map<string, PredicateResult>;
140
261
  /**
141
- * Resolves the single connection enabled for this tool, returning the
142
- * connection id, its config, and the matching client manager. Designed
143
- * for handlers that look up `runtime.clientManagers[connId]` (multi-
144
- * connection-ready shape).
262
+ * Single-connection verdict composing the two gating layers: the
263
+ * {@linkcode predicate} (service reachability) and the read-only overlay.
264
+ *
265
+ * A connection the predicate already disables keeps that verdict unchanged —
266
+ * service reachability is the more fundamental reason and wins, so a
267
+ * connection missing the service block is never reported as "read-only
268
+ * blocked". Otherwise, a `read_only` connection disables any tool that
269
+ * mutates state (`annotations.readOnlyHint !== true`).
270
+ */
271
+ private connectionVerdict;
272
+ /**
273
+ * Resolves which connection a tool call targets: the explicit `connectionId`
274
+ * argument when present, else the sole connection enabled for this tool.
275
+ * Throws a listing error when the id is unknown/not-enabled, when it is
276
+ * present but not a string, or when omitted while two or more connections are
277
+ * candidates (the augmented schema makes all three unreachable in normal MCP
278
+ * flow — these are defensive backstops against internal call sites).
279
+ *
280
+ * Reads `connectionId` off the **raw** `toolArguments` rather than off the
281
+ * handler's locally-parsed object: the framework already validated it against
282
+ * the registered schema (see {@linkcode getRegisteredToolConfig}), and a
283
+ * handler's own `z.object` re-`parse()` would strip the key it never declared.
145
284
  *
146
- * Selects `enabledConnectionIds(runtime)[0]` — current runtime is single-
147
- * connection, so this is unambiguous; if multi-connection support lands
148
- * later, handlers can switch to iterating ids.
285
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
286
+ */
287
+ protected resolveConnection(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined): ResolvedConnection;
288
+ /**
289
+ * Like {@linkcode resolveConnection}, but narrows the resolved connection to
290
+ * a {@link DirectConnectionConfig} — throwing if the addressed connection is
291
+ * OAuth-typed. The throw is a defensive backstop: a tool's `connectionId`
292
+ * enum only offers connections its predicate enables, and the direct-block
293
+ * predicates exclude OAuth, so an OAuth connection is unreachable here via
294
+ * normal MCP flow.
295
+ *
296
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
149
297
  */
150
- protected resolveSoleConnection(runtime: ServerRuntime): {
151
- connId: string;
152
- conn: ConnectionConfig;
153
- clientManager: BaseClientManager;
154
- };
298
+ protected resolveDirectConnection(runtime: ServerRuntime, toolArguments: Record<string, unknown> | undefined): ResolvedDirectConnection;
155
299
  /**
156
300
  * Resolves a required string from an explicit tool argument, falling back to
157
301
  * a connection-config value. Throws if neither is present.
@@ -1 +1 @@
1
- {"version":3,"file":"base-tools.d.ts","sourceRoot":"","sources":["../../../src/confluent/tools/base-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe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M,GAAG,SAAS;IAKrB;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC;IASxE;;;;;;;;;OASG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,iBAAiB,CACzB,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACjD,kBAAkB;IAkDrB;;;;;;;;;OASG;IACH,SAAS,CAAC,uBAAuB,CAC/B,OAAO,EAAE,aAAa,EACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACjD,wBAAwB;IAoB3B;;;;;;OAMG;IACH,SAAS,CAAC,YAAY,CACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,KAAK,EAAE,MAAM,GACZ,MAAM;IAMT,uIAAuI;IACvI,SAAS,CAAC,oBAAoB,CAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS;IAIrB,cAAc,CACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,OAAe,EACxB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,cAAc;IAcjB;;;;;;;OAOG;IACH,wBAAwB,CACtB,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,cAAc;CAOlB"}
@@ -1,3 +1,7 @@
1
+ import { alwaysEnabled, ENABLED, ToolDisabledReason, } from "../../confluent/tools/connection-predicates.js";
2
+ import { ToolName } from "../../confluent/tools/tool-name.js";
3
+ import { quoteJoinIds } from "../../utils/quote-join-ids.js";
4
+ import { z } from "zod";
1
5
  /**
2
6
  * Standard MCP tool annotations.
3
7
  * Tools should reference these constants rather than creating ad-hoc instances.
@@ -13,6 +17,18 @@ export const DESTRUCTIVE = {
13
17
  destructiveHint: true,
14
18
  readOnlyHint: false,
15
19
  };
20
+ /**
21
+ * Opening clause of the injected `connectionId` parameter description, before the
22
+ * quoted, comma-separated list of viable connection ids (see
23
+ * {@linkcode quoteJoinIds}) is appended.
24
+ */
25
+ export const CONNECTION_ID_DESCRIPTION_PREFIX = "Which configured connection to target. One of: ";
26
+ /**
27
+ * Sentence appended to the `connectionId` description that steers the agent at the
28
+ * discovery tool. Emitted only when that tool is itself reachable; the joining space
29
+ * is added at the call site so a blocked tool leaves no dangling trailing space.
30
+ */
31
+ export const LIST_CONFIGURED_CONNECTIONS_POINTER = `Discover connections and learn what tools are supported by each connection by invoking '${ToolName.LIST_CONFIGURED_CONNECTIONS}'.`;
16
32
  /**
17
33
  * Operator-facing taxonomy of tool kinds.
18
34
  *
@@ -36,8 +52,77 @@ export var ToolCategory;
36
52
  })(ToolCategory || (ToolCategory = {}));
37
53
  export class BaseToolHandler {
38
54
  /**
39
- * IDs of connections that satisfy this tool's {@linkcode predicate}. A
40
- * non-empty result enables the tool; an empty result disables it.
55
+ * Produce the actual config registered with MCP for this tool.
56
+ *
57
+ * * If the tool is connection-oriented and the server is configured
58
+ * with multiple connections, injects a required `connectionId` parameter
59
+ * indicating which connection the tool call should route to.
60
+ * See {@linkcode registeredInputShape} for more details.
61
+ *
62
+ * * Wrap the input schema in `z.object(...).strict()` to uniformly reject
63
+ * unknown parameters before `handle()` runs.
64
+ *
65
+ * This method is called for each active tool when setting up the MCP server.
66
+ *
67
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
68
+ */
69
+ getRegisteredToolConfig(runtime) {
70
+ const config = this.getToolConfig();
71
+ return {
72
+ ...config,
73
+ inputSchema: z
74
+ .object(this.registeredInputShape(config, runtime))
75
+ .strict(),
76
+ };
77
+ }
78
+ /**
79
+ * The input shape to register, before strict-wrapping: the authored shape,
80
+ * plus a required `connectionId` enum when the server holds more than one
81
+ * connection AND this tool is connection-oriented. A single-element enum (when
82
+ * only one connection is viable) is still injected on a multi-connection server,
83
+ * so that an explicit request for a non-viable connection (e.g. to a disabled
84
+ * tool because it is read_only) is rejected by the enum rather than silently
85
+ * auto-routed.
86
+ */
87
+ registeredInputShape(config, runtime) {
88
+ // Connection-independent tools (docs, diagnostics) never route to a
89
+ // connection and so never need a connectionId parameter.
90
+ if (this.isConnectionIndependent)
91
+ return config.inputSchema;
92
+ // A single-connection (or zero-connection) server has no ambiguity as to
93
+ // which connection a call routes to, so the call auto-routes with no extra
94
+ // argument. The zero-connection case also covers the `--list-tools` runtime,
95
+ // which wants the unaugmented view.
96
+ if (runtime.config.getConnectionIds().length <= 1)
97
+ return config.inputSchema;
98
+ const ids = this.enabledConnectionIds(runtime);
99
+ // A tool viable on no connection is never registered (the enablement filter
100
+ // in index.ts drops it), so this method is never called for one. Reaching
101
+ // here means the wiring is broken; bail loudly rather than build an illegal
102
+ // `z.enum([])`.
103
+ if (ids.length === 0) {
104
+ throw new Error(`Wacky -- tool ${config.name} resolved to zero enabled connections on a multi-connection server; it should never have been registered`);
105
+ }
106
+ // Point the agent at list-configured-connections so it can learn which
107
+ // tools each connection supports — but only when that tool is itself
108
+ // reachable; naming a tool the operator blocked would send the agent
109
+ // chasing a ghost. The leading space rides with the pointer (not the
110
+ // template) so the blocked, empty-pointer case ends cleanly at the period.
111
+ const listConfiguredConnectionsPointer = runtime.isToolAllowed(ToolName.LIST_CONFIGURED_CONNECTIONS)
112
+ ? ` ${LIST_CONFIGURED_CONNECTIONS_POINTER}`
113
+ : "";
114
+ return {
115
+ ...config.inputSchema,
116
+ connectionId: z
117
+ .enum(ids)
118
+ .describe(`${CONNECTION_ID_DESCRIPTION_PREFIX}${quoteJoinIds(ids)}.${listConfiguredConnectionsPointer}`),
119
+ };
120
+ }
121
+ /**
122
+ * IDs of connections that satisfy this tool's {@linkcode predicate} and are
123
+ * not blocked by the read-only overlay. A non-empty result enables the tool;
124
+ * an empty result disables it. Derived from {@linkcode connectionVerdicts} so
125
+ * the two stay in lockstep.
41
126
  *
42
127
  * Customize tool gating by declaring {@linkcode predicate}, never by
43
128
  * replacing this derivation.
@@ -45,14 +130,51 @@ export class BaseToolHandler {
45
130
  * @final — concrete on `BaseToolHandler`; subclasses must not override.
46
131
  */
47
132
  enabledConnectionIds(runtime) {
48
- return Object.entries(runtime.config.connections)
49
- .filter(([, conn]) => this.predicate(conn).enabled)
133
+ return [...this.connectionVerdicts(runtime)]
134
+ .filter(([, verdict]) => verdict.enabled)
50
135
  .map(([id]) => id);
51
136
  }
52
137
  /**
53
- * Per-connection verdict map for this tool, derived from
54
- * {@linkcode predicate}. Powers grouped startup logging and
55
- * the diagnostic-tool surface.
138
+ * Whether this tool is enabled regardless of the configured connections —
139
+ * true exactly when its {@linkcode predicate} is `alwaysEnabled`, the only
140
+ * predicate that returns enabled without inspecting a connection. Such tools
141
+ * (docs lookup, server diagnostics) never route to a connection, so they
142
+ * register even on a zero-connection config, where the per-connection verdict
143
+ * map driving {@linkcode enabledConnectionIds} is empty.
144
+ */
145
+ get isConnectionIndependent() {
146
+ return this.predicate === alwaysEnabled;
147
+ }
148
+ /**
149
+ * The connection id this invocation routes to — the OAuth-login gate uses it
150
+ * to launch the browser flow only when a call actually targets the OAuth
151
+ * connection, not merely because one exists somewhere in the config.
152
+ *
153
+ * Returns `undefined` for a connection-independent tool — it routes to no
154
+ * connection, so there is nothing to pre-launch a login for.
155
+ *
156
+ * Otherwise delegates to {@linkcode resolveConnection} so routing is decided
157
+ * in one place rather than duplicated in the gate, and propagates its throw.
158
+ * Every throw path there is a `"Wacky --"` invariant violation: the injected
159
+ * schema (see {@linkcode getRegisteredToolConfig}) makes `connectionId`
160
+ * required for multi-connection tools and strips it for single-connection
161
+ * ones, so a call that can't resolve means that contract broke. Surfacing the
162
+ * error rather than swallowing it to `undefined` lets the broken invariant
163
+ * reach the caller instead of being silently re-discovered inside `handle()`.
164
+ *
165
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
166
+ */
167
+ resolvedTargetConnectionId(runtime, toolArguments) {
168
+ if (this.isConnectionIndependent)
169
+ return undefined;
170
+ return this.resolveConnection(runtime, toolArguments).connId;
171
+ }
172
+ /**
173
+ * Per-connection verdict map for this tool — the single source of truth for
174
+ * enablement. Each verdict composes the {@linkcode predicate} with the
175
+ * read-only overlay (see {@linkcode connectionVerdict}). Powers grouped
176
+ * startup logging, the diagnostic-tool surface, and
177
+ * {@linkcode enabledConnectionIds}.
56
178
  *
57
179
  * Customize tool gating by declaring {@linkcode predicate}, never by
58
180
  * replacing this derivation.
@@ -62,27 +184,108 @@ export class BaseToolHandler {
62
184
  connectionVerdicts(runtime) {
63
185
  return new Map(Object.entries(runtime.config.connections).map(([id, conn]) => [
64
186
  id,
65
- this.predicate(conn),
187
+ this.connectionVerdict(conn),
66
188
  ]));
67
189
  }
68
190
  /**
69
- * Resolves the single connection enabled for this tool, returning the
70
- * connection id, its config, and the matching client manager. Designed
71
- * for handlers that look up `runtime.clientManagers[connId]` (multi-
72
- * connection-ready shape).
191
+ * Single-connection verdict composing the two gating layers: the
192
+ * {@linkcode predicate} (service reachability) and the read-only overlay.
193
+ *
194
+ * A connection the predicate already disables keeps that verdict unchanged —
195
+ * service reachability is the more fundamental reason and wins, so a
196
+ * connection missing the service block is never reported as "read-only
197
+ * blocked". Otherwise, a `read_only` connection disables any tool that
198
+ * mutates state (`annotations.readOnlyHint !== true`).
199
+ */
200
+ connectionVerdict(conn) {
201
+ const verdict = this.predicate(conn);
202
+ if (!verdict.enabled)
203
+ return verdict;
204
+ if (conn.read_only === true &&
205
+ this.getToolConfig().annotations.readOnlyHint !== true) {
206
+ return { enabled: false, reason: ToolDisabledReason.ReadOnlyConnection };
207
+ }
208
+ return ENABLED;
209
+ }
210
+ /**
211
+ * Resolves which connection a tool call targets: the explicit `connectionId`
212
+ * argument when present, else the sole connection enabled for this tool.
213
+ * Throws a listing error when the id is unknown/not-enabled, when it is
214
+ * present but not a string, or when omitted while two or more connections are
215
+ * candidates (the augmented schema makes all three unreachable in normal MCP
216
+ * flow — these are defensive backstops against internal call sites).
73
217
  *
74
- * Selects `enabledConnectionIds(runtime)[0]` — current runtime is single-
75
- * connection, so this is unambiguous; if multi-connection support lands
76
- * later, handlers can switch to iterating ids.
218
+ * Reads `connectionId` off the **raw** `toolArguments` rather than off the
219
+ * handler's locally-parsed object: the framework already validated it against
220
+ * the registered schema (see {@linkcode getRegisteredToolConfig}), and a
221
+ * handler's own `z.object` re-`parse()` would strip the key it never declared.
222
+ *
223
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
77
224
  */
78
- resolveSoleConnection(runtime) {
79
- const connId = this.enabledConnectionIds(runtime)[0];
225
+ resolveConnection(runtime, toolArguments) {
226
+ // The connection this tool call should route to.
227
+ let determinedId;
228
+ // What connection ids this tool possibly supports.
229
+ const enabledIds = this.enabledConnectionIds(runtime);
230
+ // The requested connection id, if the caller provided one. Per the Zod schema injected by
231
+ // `getRegisteredToolConfig()` it should be a string that is one of the enabled ids; both
232
+ // expectations are enforced below rather than assumed.
233
+ const requestedId = toolArguments?.connectionId;
234
+ if (typeof requestedId === "string") {
235
+ if (!enabledIds.includes(requestedId)) {
236
+ throw new Error(`Wacky -- connection "${requestedId}" is not an enabled connection for this tool; enabled: ${enabledIds.join(", ")}`);
237
+ }
238
+ // Explicit requested ID must be valid based on the injected schema enum already having validated it, so can
239
+ // at this point trust fully.
240
+ determinedId = requestedId;
241
+ }
242
+ else if (requestedId !== undefined) {
243
+ // Unreachable in normal operation: Zod has already validated `args`
244
+ // against the registered schema before `handle()` runs, and that schema
245
+ // either declares `connectionId` as a string enum (multi-connection
246
+ // servers — a non-string fails parsing) or omits it entirely (single-
247
+ // connection servers — the strict schema rejects the unknown key). Either
248
+ // way a non-string can't survive to reach this branch. It exists purely as a symmetric
249
+ // peer to the two backstops below, so a malformed value can never quietly
250
+ // masquerade as an omission and auto-route.
251
+ throw new Error(`Wacky -- connectionId present but not a string (got ${typeof requestedId}); the injected schema should have rejected this`);
252
+ }
253
+ else if (enabledIds.length === 1) {
254
+ // No requested ID, but only one enabled connection — unambiguous, so route there.
255
+ determinedId = enabledIds[0];
256
+ }
257
+ else {
258
+ // Not a string and not a sole enabled connection. Should have been blocked by the injected schema.
259
+ throw new Error(`Wacky -- connectionId omitted but this tool is enabled for ${enabledIds.length} connections (${enabledIds.join(", ") || "none"}); cannot auto-route`);
260
+ }
80
261
  return {
81
- connId,
82
- conn: runtime.config.connections[connId],
83
- clientManager: runtime.clientManagers[connId],
262
+ connId: determinedId,
263
+ conn: runtime.config.connections[determinedId],
264
+ clientManager: runtime.clientManagers[determinedId],
84
265
  };
85
266
  }
267
+ /**
268
+ * Like {@linkcode resolveConnection}, but narrows the resolved connection to
269
+ * a {@link DirectConnectionConfig} — throwing if the addressed connection is
270
+ * OAuth-typed. The throw is a defensive backstop: a tool's `connectionId`
271
+ * enum only offers connections its predicate enables, and the direct-block
272
+ * predicates exclude OAuth, so an OAuth connection is unreachable here via
273
+ * normal MCP flow.
274
+ *
275
+ * @final — concrete on `BaseToolHandler`; subclasses must not override.
276
+ */
277
+ resolveDirectConnection(runtime, toolArguments) {
278
+ // Reuse resolveConnection for id selection + validation; this method only
279
+ // adds the direct-vs-oauth narrowing on top of its type-neutral result.
280
+ const { connId, conn, clientManager } = this.resolveConnection(runtime, toolArguments);
281
+ // A resolved OAuth connection means the wiring is broken (a non-oauth tool
282
+ // somehow offered an oauth id), not that a caller legitimately asked for one.
283
+ if (conn.type !== "direct") {
284
+ throw new Error(`Wacky -- connection "${connId}" is ${conn.type}-typed; this tool requires a direct connection`);
285
+ }
286
+ // conn is narrowed to DirectConnectionConfig by the guard above.
287
+ return { connId, conn, clientManager };
288
+ }
86
289
  /**
87
290
  * Resolves a required string from an explicit tool argument, falling back to
88
291
  * a connection-config value. Throws if neither is present.
@@ -1 +1 @@
1
- {"version":3,"file":"base-tools.js","sourceR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AAmB;YAC/B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,OAAO;iBACd;aACF;YACD,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,KAAK;SACb,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACH,wBAAwB,CACtB,OAAe,EACf,iBAA0C;QAE1C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC1C,iBAAiB;YACjB,OAAO,EAAE,KAAK;SACf,CAAC;IACJ,CAAC;CACF"}
@@ -10,7 +10,28 @@
10
10
  * with `isError: true` so the agent receives a normal tool-call error
11
11
  * rather than an RPC failure.
12
12
  */
13
+ import { ConnectionConfig } from "../../config/models.js";
13
14
  import { ServerRuntime } from "../../server-runtime.js";
15
+ /**
16
+ * Shared env + Kafka-cluster resolver for Confluent Cloud REST handlers that
17
+ * address a resource by environment + cluster and carry those ids in the
18
+ * request URL/body (Connect, Tableflow). Distinct from the native-Kafka
19
+ * {@link resolveKafkaClusterArgs}, which returns `undefined` on direct because
20
+ * the `DirectClientManager` ignores cluster args — here the handler genuinely
21
+ * needs the concrete ids.
22
+ *
23
+ * - Direct: explicit tool args win, falling back to the connection's
24
+ * `kafka.env_id` / `kafka.cluster_id`. Throws `"Environment ID is required"` /
25
+ * `"Kafka Cluster ID is required"` if either value is absent from both
26
+ * sources.
27
+ * - OAuth: both args are required (an OAuth connection carries no `kafka` block
28
+ * to fall back to). Throws a discovery hint pointing at `list-environments` /
29
+ * `list-clusters` when either is missing.
30
+ */
31
+ export declare function resolveEnvAndClusterArgs(conn: ConnectionConfig, envIdArg: string | undefined, clusterIdArg: string | undefined): {
32
+ environment_id: string;
33
+ kafka_cluster_id: string;
34
+ };
14
35
  export declare function resolveKafkaClusterArgs(args: {
15
36
  cluster_id?: string;
16
37
  environment_id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"cluster-arg-resolvers.d.ts","sourceRoot":"","sources":["../../../src/confluent/tools/cluster-arg-resolvers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,wBAAgB,uBAAuB,CACrC,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,EACtD,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GACb;IAAE,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAe9D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,EACpD,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GACb;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAqBlD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,GACb,MAAM,CAaR;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IAAE,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,GAC1C,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAoBrD"}
1
+ {"version":3,"file":"cluster-arg-resolvers.d.ts","sourceRoot":"","sources":["../../../src/conf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