@zavudev/sdk-mcp 0.15.1 → 0.17.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 (476) hide show
  1. package/README.md +13 -228
  2. package/code-tool.d.mts +2 -44
  3. package/code-tool.d.mts.map +1 -1
  4. package/code-tool.d.ts +2 -44
  5. package/code-tool.d.ts.map +1 -1
  6. package/code-tool.js +2 -2
  7. package/code-tool.js.map +1 -1
  8. package/code-tool.mjs +2 -2
  9. package/code-tool.mjs.map +1 -1
  10. package/docs-search-tool.d.mts +3 -3
  11. package/docs-search-tool.d.mts.map +1 -1
  12. package/docs-search-tool.d.ts +3 -3
  13. package/docs-search-tool.d.ts.map +1 -1
  14. package/docs-search-tool.js +1 -1
  15. package/docs-search-tool.js.map +1 -1
  16. package/docs-search-tool.mjs +1 -1
  17. package/http.d.mts.map +1 -1
  18. package/http.d.ts.map +1 -1
  19. package/http.js +1 -18
  20. package/http.js.map +1 -1
  21. package/http.mjs +1 -18
  22. package/http.mjs.map +1 -1
  23. package/index.js +4 -40
  24. package/index.js.map +1 -1
  25. package/index.mjs +4 -40
  26. package/index.mjs.map +1 -1
  27. package/options.d.mts +0 -9
  28. package/options.d.mts.map +1 -1
  29. package/options.d.ts +0 -9
  30. package/options.d.ts.map +1 -1
  31. package/options.js +4 -359
  32. package/options.js.map +1 -1
  33. package/options.mjs +4 -359
  34. package/options.mjs.map +1 -1
  35. package/package.json +9 -49
  36. package/server.d.mts +3 -8
  37. package/server.d.mts.map +1 -1
  38. package/server.d.ts +3 -8
  39. package/server.d.ts.map +1 -1
  40. package/server.js +12 -65
  41. package/server.js.map +1 -1
  42. package/server.mjs +11 -62
  43. package/server.mjs.map +1 -1
  44. package/src/code-tool.ts +2 -2
  45. package/src/docs-search-tool.ts +1 -1
  46. package/src/http.ts +1 -19
  47. package/src/index.ts +5 -52
  48. package/src/options.ts +5 -386
  49. package/src/server.ts +12 -72
  50. package/src/stdio.ts +2 -3
  51. package/src/{tools/types.ts → types.ts} +1 -1
  52. package/stdio.d.mts +1 -2
  53. package/stdio.d.mts.map +1 -1
  54. package/stdio.d.ts +1 -2
  55. package/stdio.d.ts.map +1 -1
  56. package/stdio.js +2 -2
  57. package/stdio.js.map +1 -1
  58. package/stdio.mjs +2 -2
  59. package/stdio.mjs.map +1 -1
  60. package/{tools/types.d.mts → types.d.mts} +1 -1
  61. package/types.d.mts.map +1 -0
  62. package/{tools/types.d.ts → types.d.ts} +1 -1
  63. package/types.d.ts.map +1 -0
  64. package/types.js.map +1 -0
  65. package/types.mjs.map +1 -0
  66. package/compat.d.mts +0 -58
  67. package/compat.d.mts.map +0 -1
  68. package/compat.d.ts +0 -58
  69. package/compat.d.ts.map +0 -1
  70. package/compat.js +0 -387
  71. package/compat.js.map +0 -1
  72. package/compat.mjs +0 -378
  73. package/compat.mjs.map +0 -1
  74. package/dynamic-tools.d.mts +0 -12
  75. package/dynamic-tools.d.mts.map +0 -1
  76. package/dynamic-tools.d.ts +0 -12
  77. package/dynamic-tools.d.ts.map +0 -1
  78. package/dynamic-tools.js +0 -135
  79. package/dynamic-tools.js.map +0 -1
  80. package/dynamic-tools.mjs +0 -132
  81. package/dynamic-tools.mjs.map +0 -1
  82. package/filtering.d.mts +0 -3
  83. package/filtering.d.mts.map +0 -1
  84. package/filtering.d.ts +0 -3
  85. package/filtering.d.ts.map +0 -1
  86. package/filtering.js +0 -24
  87. package/filtering.js.map +0 -1
  88. package/filtering.mjs +0 -16
  89. package/filtering.mjs.map +0 -1
  90. package/src/compat.ts +0 -483
  91. package/src/dynamic-tools.ts +0 -153
  92. package/src/filtering.ts +0 -18
  93. package/src/tools/broadcasts/cancel-broadcasts.ts +0 -52
  94. package/src/tools/broadcasts/contacts/add-broadcasts-contacts.ts +0 -73
  95. package/src/tools/broadcasts/contacts/list-broadcasts-contacts.ts +0 -71
  96. package/src/tools/broadcasts/contacts/remove-broadcasts-contacts.ts +0 -43
  97. package/src/tools/broadcasts/create-broadcasts.ts +0 -134
  98. package/src/tools/broadcasts/delete-broadcasts.ts +0 -40
  99. package/src/tools/broadcasts/list-broadcasts.ts +0 -68
  100. package/src/tools/broadcasts/progress-broadcasts.ts +0 -54
  101. package/src/tools/broadcasts/retrieve-broadcasts.ts +0 -54
  102. package/src/tools/broadcasts/send-broadcasts.ts +0 -57
  103. package/src/tools/broadcasts/update-broadcasts.ts +0 -106
  104. package/src/tools/contacts/list-contacts.ts +0 -61
  105. package/src/tools/contacts/retrieve-by-phone-contacts.ts +0 -56
  106. package/src/tools/contacts/retrieve-contacts.ts +0 -54
  107. package/src/tools/contacts/update-contacts.ts +0 -61
  108. package/src/tools/index.ts +0 -149
  109. package/src/tools/introspect/validate-phone-introspect.ts +0 -52
  110. package/src/tools/messages/list-messages.ts +0 -78
  111. package/src/tools/messages/react-messages.ts +0 -59
  112. package/src/tools/messages/retrieve-messages.ts +0 -54
  113. package/src/tools/messages/send-messages.ts +0 -233
  114. package/src/tools/phone-numbers/list-phone-numbers.ts +0 -68
  115. package/src/tools/phone-numbers/purchase-phone-numbers.ts +0 -57
  116. package/src/tools/phone-numbers/release-phone-numbers.ts +0 -40
  117. package/src/tools/phone-numbers/retrieve-phone-numbers.ts +0 -56
  118. package/src/tools/phone-numbers/search-available-phone-numbers.ts +0 -72
  119. package/src/tools/phone-numbers/update-phone-numbers.ts +0 -62
  120. package/src/tools/senders/create-senders.ts +0 -86
  121. package/src/tools/senders/delete-senders.ts +0 -40
  122. package/src/tools/senders/get-profile-senders.ts +0 -54
  123. package/src/tools/senders/list-senders.ts +0 -58
  124. package/src/tools/senders/regenerate-webhook-secret-senders.ts +0 -54
  125. package/src/tools/senders/retrieve-senders.ts +0 -54
  126. package/src/tools/senders/update-profile-senders.ts +0 -107
  127. package/src/tools/senders/update-senders.ts +0 -90
  128. package/src/tools/senders/upload-profile-picture-senders.ts +0 -63
  129. package/src/tools/templates/create-templates.ts +0 -74
  130. package/src/tools/templates/delete-templates.ts +0 -40
  131. package/src/tools/templates/list-templates.ts +0 -58
  132. package/src/tools/templates/retrieve-templates.ts +0 -54
  133. package/src/tools/templates/submit-templates.ts +0 -66
  134. package/src/tools.ts +0 -1
  135. package/tools/broadcasts/cancel-broadcasts.d.mts +0 -51
  136. package/tools/broadcasts/cancel-broadcasts.d.mts.map +0 -1
  137. package/tools/broadcasts/cancel-broadcasts.d.ts +0 -51
  138. package/tools/broadcasts/cancel-broadcasts.d.ts.map +0 -1
  139. package/tools/broadcasts/cancel-broadcasts.js +0 -52
  140. package/tools/broadcasts/cancel-broadcasts.js.map +0 -1
  141. package/tools/broadcasts/cancel-broadcasts.mjs +0 -45
  142. package/tools/broadcasts/cancel-broadcasts.mjs.map +0 -1
  143. package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts +0 -51
  144. package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts.map +0 -1
  145. package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts +0 -51
  146. package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts.map +0 -1
  147. package/tools/broadcasts/contacts/add-broadcasts-contacts.js +0 -71
  148. package/tools/broadcasts/contacts/add-broadcasts-contacts.js.map +0 -1
  149. package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs +0 -64
  150. package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs.map +0 -1
  151. package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts +0 -51
  152. package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts.map +0 -1
  153. package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts +0 -51
  154. package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts.map +0 -1
  155. package/tools/broadcasts/contacts/list-broadcasts-contacts.js +0 -71
  156. package/tools/broadcasts/contacts/list-broadcasts-contacts.js.map +0 -1
  157. package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs +0 -64
  158. package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs.map +0 -1
  159. package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts +0 -51
  160. package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts.map +0 -1
  161. package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts +0 -51
  162. package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts.map +0 -1
  163. package/tools/broadcasts/contacts/remove-broadcasts-contacts.js +0 -40
  164. package/tools/broadcasts/contacts/remove-broadcasts-contacts.js.map +0 -1
  165. package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs +0 -36
  166. package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs.map +0 -1
  167. package/tools/broadcasts/create-broadcasts.d.mts +0 -51
  168. package/tools/broadcasts/create-broadcasts.d.mts.map +0 -1
  169. package/tools/broadcasts/create-broadcasts.d.ts +0 -51
  170. package/tools/broadcasts/create-broadcasts.d.ts.map +0 -1
  171. package/tools/broadcasts/create-broadcasts.js +0 -134
  172. package/tools/broadcasts/create-broadcasts.js.map +0 -1
  173. package/tools/broadcasts/create-broadcasts.mjs +0 -127
  174. package/tools/broadcasts/create-broadcasts.mjs.map +0 -1
  175. package/tools/broadcasts/delete-broadcasts.d.mts +0 -51
  176. package/tools/broadcasts/delete-broadcasts.d.mts.map +0 -1
  177. package/tools/broadcasts/delete-broadcasts.d.ts +0 -51
  178. package/tools/broadcasts/delete-broadcasts.d.ts.map +0 -1
  179. package/tools/broadcasts/delete-broadcasts.js +0 -37
  180. package/tools/broadcasts/delete-broadcasts.js.map +0 -1
  181. package/tools/broadcasts/delete-broadcasts.mjs +0 -33
  182. package/tools/broadcasts/delete-broadcasts.mjs.map +0 -1
  183. package/tools/broadcasts/list-broadcasts.d.mts +0 -51
  184. package/tools/broadcasts/list-broadcasts.d.mts.map +0 -1
  185. package/tools/broadcasts/list-broadcasts.d.ts +0 -51
  186. package/tools/broadcasts/list-broadcasts.d.ts.map +0 -1
  187. package/tools/broadcasts/list-broadcasts.js +0 -68
  188. package/tools/broadcasts/list-broadcasts.js.map +0 -1
  189. package/tools/broadcasts/list-broadcasts.mjs +0 -61
  190. package/tools/broadcasts/list-broadcasts.mjs.map +0 -1
  191. package/tools/broadcasts/progress-broadcasts.d.mts +0 -51
  192. package/tools/broadcasts/progress-broadcasts.d.mts.map +0 -1
  193. package/tools/broadcasts/progress-broadcasts.d.ts +0 -51
  194. package/tools/broadcasts/progress-broadcasts.d.ts.map +0 -1
  195. package/tools/broadcasts/progress-broadcasts.js +0 -54
  196. package/tools/broadcasts/progress-broadcasts.js.map +0 -1
  197. package/tools/broadcasts/progress-broadcasts.mjs +0 -47
  198. package/tools/broadcasts/progress-broadcasts.mjs.map +0 -1
  199. package/tools/broadcasts/retrieve-broadcasts.d.mts +0 -51
  200. package/tools/broadcasts/retrieve-broadcasts.d.mts.map +0 -1
  201. package/tools/broadcasts/retrieve-broadcasts.d.ts +0 -51
  202. package/tools/broadcasts/retrieve-broadcasts.d.ts.map +0 -1
  203. package/tools/broadcasts/retrieve-broadcasts.js +0 -54
  204. package/tools/broadcasts/retrieve-broadcasts.js.map +0 -1
  205. package/tools/broadcasts/retrieve-broadcasts.mjs +0 -47
  206. package/tools/broadcasts/retrieve-broadcasts.mjs.map +0 -1
  207. package/tools/broadcasts/send-broadcasts.d.mts +0 -51
  208. package/tools/broadcasts/send-broadcasts.d.mts.map +0 -1
  209. package/tools/broadcasts/send-broadcasts.d.ts +0 -51
  210. package/tools/broadcasts/send-broadcasts.d.ts.map +0 -1
  211. package/tools/broadcasts/send-broadcasts.js +0 -57
  212. package/tools/broadcasts/send-broadcasts.js.map +0 -1
  213. package/tools/broadcasts/send-broadcasts.mjs +0 -50
  214. package/tools/broadcasts/send-broadcasts.mjs.map +0 -1
  215. package/tools/broadcasts/update-broadcasts.d.mts +0 -51
  216. package/tools/broadcasts/update-broadcasts.d.mts.map +0 -1
  217. package/tools/broadcasts/update-broadcasts.d.ts +0 -51
  218. package/tools/broadcasts/update-broadcasts.d.ts.map +0 -1
  219. package/tools/broadcasts/update-broadcasts.js +0 -104
  220. package/tools/broadcasts/update-broadcasts.js.map +0 -1
  221. package/tools/broadcasts/update-broadcasts.mjs +0 -97
  222. package/tools/broadcasts/update-broadcasts.mjs.map +0 -1
  223. package/tools/contacts/list-contacts.d.mts +0 -51
  224. package/tools/contacts/list-contacts.d.mts.map +0 -1
  225. package/tools/contacts/list-contacts.d.ts +0 -51
  226. package/tools/contacts/list-contacts.d.ts.map +0 -1
  227. package/tools/contacts/list-contacts.js +0 -61
  228. package/tools/contacts/list-contacts.js.map +0 -1
  229. package/tools/contacts/list-contacts.mjs +0 -54
  230. package/tools/contacts/list-contacts.mjs.map +0 -1
  231. package/tools/contacts/retrieve-by-phone-contacts.d.mts +0 -51
  232. package/tools/contacts/retrieve-by-phone-contacts.d.mts.map +0 -1
  233. package/tools/contacts/retrieve-by-phone-contacts.d.ts +0 -51
  234. package/tools/contacts/retrieve-by-phone-contacts.d.ts.map +0 -1
  235. package/tools/contacts/retrieve-by-phone-contacts.js +0 -54
  236. package/tools/contacts/retrieve-by-phone-contacts.js.map +0 -1
  237. package/tools/contacts/retrieve-by-phone-contacts.mjs +0 -47
  238. package/tools/contacts/retrieve-by-phone-contacts.mjs.map +0 -1
  239. package/tools/contacts/retrieve-contacts.d.mts +0 -51
  240. package/tools/contacts/retrieve-contacts.d.mts.map +0 -1
  241. package/tools/contacts/retrieve-contacts.d.ts +0 -51
  242. package/tools/contacts/retrieve-contacts.d.ts.map +0 -1
  243. package/tools/contacts/retrieve-contacts.js +0 -54
  244. package/tools/contacts/retrieve-contacts.js.map +0 -1
  245. package/tools/contacts/retrieve-contacts.mjs +0 -47
  246. package/tools/contacts/retrieve-contacts.mjs.map +0 -1
  247. package/tools/contacts/update-contacts.d.mts +0 -51
  248. package/tools/contacts/update-contacts.d.mts.map +0 -1
  249. package/tools/contacts/update-contacts.d.ts +0 -51
  250. package/tools/contacts/update-contacts.d.ts.map +0 -1
  251. package/tools/contacts/update-contacts.js +0 -61
  252. package/tools/contacts/update-contacts.js.map +0 -1
  253. package/tools/contacts/update-contacts.mjs +0 -54
  254. package/tools/contacts/update-contacts.mjs.map +0 -1
  255. package/tools/index.d.mts +0 -10
  256. package/tools/index.d.mts.map +0 -1
  257. package/tools/index.d.ts +0 -10
  258. package/tools/index.d.ts.map +0 -1
  259. package/tools/index.js +0 -133
  260. package/tools/index.js.map +0 -1
  261. package/tools/index.mjs +0 -126
  262. package/tools/index.mjs.map +0 -1
  263. package/tools/introspect/validate-phone-introspect.d.mts +0 -51
  264. package/tools/introspect/validate-phone-introspect.d.mts.map +0 -1
  265. package/tools/introspect/validate-phone-introspect.d.ts +0 -51
  266. package/tools/introspect/validate-phone-introspect.d.ts.map +0 -1
  267. package/tools/introspect/validate-phone-introspect.js +0 -52
  268. package/tools/introspect/validate-phone-introspect.js.map +0 -1
  269. package/tools/introspect/validate-phone-introspect.mjs +0 -45
  270. package/tools/introspect/validate-phone-introspect.mjs.map +0 -1
  271. package/tools/messages/list-messages.d.mts +0 -51
  272. package/tools/messages/list-messages.d.mts.map +0 -1
  273. package/tools/messages/list-messages.d.ts +0 -51
  274. package/tools/messages/list-messages.d.ts.map +0 -1
  275. package/tools/messages/list-messages.js +0 -78
  276. package/tools/messages/list-messages.js.map +0 -1
  277. package/tools/messages/list-messages.mjs +0 -71
  278. package/tools/messages/list-messages.mjs.map +0 -1
  279. package/tools/messages/react-messages.d.mts +0 -51
  280. package/tools/messages/react-messages.d.mts.map +0 -1
  281. package/tools/messages/react-messages.d.ts +0 -51
  282. package/tools/messages/react-messages.d.ts.map +0 -1
  283. package/tools/messages/react-messages.js +0 -59
  284. package/tools/messages/react-messages.js.map +0 -1
  285. package/tools/messages/react-messages.mjs +0 -52
  286. package/tools/messages/react-messages.mjs.map +0 -1
  287. package/tools/messages/retrieve-messages.d.mts +0 -51
  288. package/tools/messages/retrieve-messages.d.mts.map +0 -1
  289. package/tools/messages/retrieve-messages.d.ts +0 -51
  290. package/tools/messages/retrieve-messages.d.ts.map +0 -1
  291. package/tools/messages/retrieve-messages.js +0 -54
  292. package/tools/messages/retrieve-messages.js.map +0 -1
  293. package/tools/messages/retrieve-messages.mjs +0 -47
  294. package/tools/messages/retrieve-messages.mjs.map +0 -1
  295. package/tools/messages/send-messages.d.mts +0 -51
  296. package/tools/messages/send-messages.d.mts.map +0 -1
  297. package/tools/messages/send-messages.d.ts +0 -51
  298. package/tools/messages/send-messages.d.ts.map +0 -1
  299. package/tools/messages/send-messages.js +0 -233
  300. package/tools/messages/send-messages.js.map +0 -1
  301. package/tools/messages/send-messages.mjs +0 -226
  302. package/tools/messages/send-messages.mjs.map +0 -1
  303. package/tools/phone-numbers/list-phone-numbers.d.mts +0 -51
  304. package/tools/phone-numbers/list-phone-numbers.d.mts.map +0 -1
  305. package/tools/phone-numbers/list-phone-numbers.d.ts +0 -51
  306. package/tools/phone-numbers/list-phone-numbers.d.ts.map +0 -1
  307. package/tools/phone-numbers/list-phone-numbers.js +0 -68
  308. package/tools/phone-numbers/list-phone-numbers.js.map +0 -1
  309. package/tools/phone-numbers/list-phone-numbers.mjs +0 -61
  310. package/tools/phone-numbers/list-phone-numbers.mjs.map +0 -1
  311. package/tools/phone-numbers/purchase-phone-numbers.d.mts +0 -51
  312. package/tools/phone-numbers/purchase-phone-numbers.d.mts.map +0 -1
  313. package/tools/phone-numbers/purchase-phone-numbers.d.ts +0 -51
  314. package/tools/phone-numbers/purchase-phone-numbers.d.ts.map +0 -1
  315. package/tools/phone-numbers/purchase-phone-numbers.js +0 -57
  316. package/tools/phone-numbers/purchase-phone-numbers.js.map +0 -1
  317. package/tools/phone-numbers/purchase-phone-numbers.mjs +0 -50
  318. package/tools/phone-numbers/purchase-phone-numbers.mjs.map +0 -1
  319. package/tools/phone-numbers/release-phone-numbers.d.mts +0 -51
  320. package/tools/phone-numbers/release-phone-numbers.d.mts.map +0 -1
  321. package/tools/phone-numbers/release-phone-numbers.d.ts +0 -51
  322. package/tools/phone-numbers/release-phone-numbers.d.ts.map +0 -1
  323. package/tools/phone-numbers/release-phone-numbers.js +0 -37
  324. package/tools/phone-numbers/release-phone-numbers.js.map +0 -1
  325. package/tools/phone-numbers/release-phone-numbers.mjs +0 -33
  326. package/tools/phone-numbers/release-phone-numbers.mjs.map +0 -1
  327. package/tools/phone-numbers/retrieve-phone-numbers.d.mts +0 -51
  328. package/tools/phone-numbers/retrieve-phone-numbers.d.mts.map +0 -1
  329. package/tools/phone-numbers/retrieve-phone-numbers.d.ts +0 -51
  330. package/tools/phone-numbers/retrieve-phone-numbers.d.ts.map +0 -1
  331. package/tools/phone-numbers/retrieve-phone-numbers.js +0 -54
  332. package/tools/phone-numbers/retrieve-phone-numbers.js.map +0 -1
  333. package/tools/phone-numbers/retrieve-phone-numbers.mjs +0 -47
  334. package/tools/phone-numbers/retrieve-phone-numbers.mjs.map +0 -1
  335. package/tools/phone-numbers/search-available-phone-numbers.d.mts +0 -51
  336. package/tools/phone-numbers/search-available-phone-numbers.d.mts.map +0 -1
  337. package/tools/phone-numbers/search-available-phone-numbers.d.ts +0 -51
  338. package/tools/phone-numbers/search-available-phone-numbers.d.ts.map +0 -1
  339. package/tools/phone-numbers/search-available-phone-numbers.js +0 -72
  340. package/tools/phone-numbers/search-available-phone-numbers.js.map +0 -1
  341. package/tools/phone-numbers/search-available-phone-numbers.mjs +0 -65
  342. package/tools/phone-numbers/search-available-phone-numbers.mjs.map +0 -1
  343. package/tools/phone-numbers/update-phone-numbers.d.mts +0 -51
  344. package/tools/phone-numbers/update-phone-numbers.d.mts.map +0 -1
  345. package/tools/phone-numbers/update-phone-numbers.d.ts +0 -51
  346. package/tools/phone-numbers/update-phone-numbers.d.ts.map +0 -1
  347. package/tools/phone-numbers/update-phone-numbers.js +0 -60
  348. package/tools/phone-numbers/update-phone-numbers.js.map +0 -1
  349. package/tools/phone-numbers/update-phone-numbers.mjs +0 -53
  350. package/tools/phone-numbers/update-phone-numbers.mjs.map +0 -1
  351. package/tools/senders/create-senders.d.mts +0 -51
  352. package/tools/senders/create-senders.d.mts.map +0 -1
  353. package/tools/senders/create-senders.d.ts +0 -51
  354. package/tools/senders/create-senders.d.ts.map +0 -1
  355. package/tools/senders/create-senders.js +0 -85
  356. package/tools/senders/create-senders.js.map +0 -1
  357. package/tools/senders/create-senders.mjs +0 -78
  358. package/tools/senders/create-senders.mjs.map +0 -1
  359. package/tools/senders/delete-senders.d.mts +0 -51
  360. package/tools/senders/delete-senders.d.mts.map +0 -1
  361. package/tools/senders/delete-senders.d.ts +0 -51
  362. package/tools/senders/delete-senders.d.ts.map +0 -1
  363. package/tools/senders/delete-senders.js +0 -37
  364. package/tools/senders/delete-senders.js.map +0 -1
  365. package/tools/senders/delete-senders.mjs +0 -33
  366. package/tools/senders/delete-senders.mjs.map +0 -1
  367. package/tools/senders/get-profile-senders.d.mts +0 -51
  368. package/tools/senders/get-profile-senders.d.mts.map +0 -1
  369. package/tools/senders/get-profile-senders.d.ts +0 -51
  370. package/tools/senders/get-profile-senders.d.ts.map +0 -1
  371. package/tools/senders/get-profile-senders.js +0 -54
  372. package/tools/senders/get-profile-senders.js.map +0 -1
  373. package/tools/senders/get-profile-senders.mjs +0 -47
  374. package/tools/senders/get-profile-senders.mjs.map +0 -1
  375. package/tools/senders/list-senders.d.mts +0 -51
  376. package/tools/senders/list-senders.d.mts.map +0 -1
  377. package/tools/senders/list-senders.d.ts +0 -51
  378. package/tools/senders/list-senders.d.ts.map +0 -1
  379. package/tools/senders/list-senders.js +0 -58
  380. package/tools/senders/list-senders.js.map +0 -1
  381. package/tools/senders/list-senders.mjs +0 -51
  382. package/tools/senders/list-senders.mjs.map +0 -1
  383. package/tools/senders/regenerate-webhook-secret-senders.d.mts +0 -51
  384. package/tools/senders/regenerate-webhook-secret-senders.d.mts.map +0 -1
  385. package/tools/senders/regenerate-webhook-secret-senders.d.ts +0 -51
  386. package/tools/senders/regenerate-webhook-secret-senders.d.ts.map +0 -1
  387. package/tools/senders/regenerate-webhook-secret-senders.js +0 -52
  388. package/tools/senders/regenerate-webhook-secret-senders.js.map +0 -1
  389. package/tools/senders/regenerate-webhook-secret-senders.mjs +0 -45
  390. package/tools/senders/regenerate-webhook-secret-senders.mjs.map +0 -1
  391. package/tools/senders/retrieve-senders.d.mts +0 -51
  392. package/tools/senders/retrieve-senders.d.mts.map +0 -1
  393. package/tools/senders/retrieve-senders.d.ts +0 -51
  394. package/tools/senders/retrieve-senders.d.ts.map +0 -1
  395. package/tools/senders/retrieve-senders.js +0 -54
  396. package/tools/senders/retrieve-senders.js.map +0 -1
  397. package/tools/senders/retrieve-senders.mjs +0 -47
  398. package/tools/senders/retrieve-senders.mjs.map +0 -1
  399. package/tools/senders/update-profile-senders.d.mts +0 -51
  400. package/tools/senders/update-profile-senders.d.mts.map +0 -1
  401. package/tools/senders/update-profile-senders.d.ts +0 -51
  402. package/tools/senders/update-profile-senders.d.ts.map +0 -1
  403. package/tools/senders/update-profile-senders.js +0 -105
  404. package/tools/senders/update-profile-senders.js.map +0 -1
  405. package/tools/senders/update-profile-senders.mjs +0 -98
  406. package/tools/senders/update-profile-senders.mjs.map +0 -1
  407. package/tools/senders/update-senders.d.mts +0 -51
  408. package/tools/senders/update-senders.d.mts.map +0 -1
  409. package/tools/senders/update-senders.d.ts +0 -51
  410. package/tools/senders/update-senders.d.ts.map +0 -1
  411. package/tools/senders/update-senders.js +0 -89
  412. package/tools/senders/update-senders.js.map +0 -1
  413. package/tools/senders/update-senders.mjs +0 -82
  414. package/tools/senders/update-senders.mjs.map +0 -1
  415. package/tools/senders/upload-profile-picture-senders.d.mts +0 -51
  416. package/tools/senders/upload-profile-picture-senders.d.mts.map +0 -1
  417. package/tools/senders/upload-profile-picture-senders.d.ts +0 -51
  418. package/tools/senders/upload-profile-picture-senders.d.ts.map +0 -1
  419. package/tools/senders/upload-profile-picture-senders.js +0 -61
  420. package/tools/senders/upload-profile-picture-senders.js.map +0 -1
  421. package/tools/senders/upload-profile-picture-senders.mjs +0 -54
  422. package/tools/senders/upload-profile-picture-senders.mjs.map +0 -1
  423. package/tools/templates/create-templates.d.mts +0 -51
  424. package/tools/templates/create-templates.d.mts.map +0 -1
  425. package/tools/templates/create-templates.d.ts +0 -51
  426. package/tools/templates/create-templates.d.ts.map +0 -1
  427. package/tools/templates/create-templates.js +0 -74
  428. package/tools/templates/create-templates.js.map +0 -1
  429. package/tools/templates/create-templates.mjs +0 -67
  430. package/tools/templates/create-templates.mjs.map +0 -1
  431. package/tools/templates/delete-templates.d.mts +0 -51
  432. package/tools/templates/delete-templates.d.mts.map +0 -1
  433. package/tools/templates/delete-templates.d.ts +0 -51
  434. package/tools/templates/delete-templates.d.ts.map +0 -1
  435. package/tools/templates/delete-templates.js +0 -37
  436. package/tools/templates/delete-templates.js.map +0 -1
  437. package/tools/templates/delete-templates.mjs +0 -33
  438. package/tools/templates/delete-templates.mjs.map +0 -1
  439. package/tools/templates/list-templates.d.mts +0 -51
  440. package/tools/templates/list-templates.d.mts.map +0 -1
  441. package/tools/templates/list-templates.d.ts +0 -51
  442. package/tools/templates/list-templates.d.ts.map +0 -1
  443. package/tools/templates/list-templates.js +0 -58
  444. package/tools/templates/list-templates.js.map +0 -1
  445. package/tools/templates/list-templates.mjs +0 -51
  446. package/tools/templates/list-templates.mjs.map +0 -1
  447. package/tools/templates/retrieve-templates.d.mts +0 -51
  448. package/tools/templates/retrieve-templates.d.mts.map +0 -1
  449. package/tools/templates/retrieve-templates.d.ts +0 -51
  450. package/tools/templates/retrieve-templates.d.ts.map +0 -1
  451. package/tools/templates/retrieve-templates.js +0 -54
  452. package/tools/templates/retrieve-templates.js.map +0 -1
  453. package/tools/templates/retrieve-templates.mjs +0 -47
  454. package/tools/templates/retrieve-templates.mjs.map +0 -1
  455. package/tools/templates/submit-templates.d.mts +0 -51
  456. package/tools/templates/submit-templates.d.mts.map +0 -1
  457. package/tools/templates/submit-templates.d.ts +0 -51
  458. package/tools/templates/submit-templates.d.ts.map +0 -1
  459. package/tools/templates/submit-templates.js +0 -66
  460. package/tools/templates/submit-templates.js.map +0 -1
  461. package/tools/templates/submit-templates.mjs +0 -59
  462. package/tools/templates/submit-templates.mjs.map +0 -1
  463. package/tools/types.d.mts.map +0 -1
  464. package/tools/types.d.ts.map +0 -1
  465. package/tools/types.js.map +0 -1
  466. package/tools/types.mjs.map +0 -1
  467. package/tools.d.mts +0 -2
  468. package/tools.d.mts.map +0 -1
  469. package/tools.d.ts +0 -2
  470. package/tools.d.ts.map +0 -1
  471. package/tools.js +0 -18
  472. package/tools.js.map +0 -1
  473. package/tools.mjs +0 -2
  474. package/tools.mjs.map +0 -1
  475. /package/{tools/types.js → types.js} +0 -0
  476. /package/{tools/types.mjs → types.mjs} +0 -0
package/src/options.ts CHANGED
@@ -2,140 +2,31 @@ import qs from 'qs';
2
2
  import yargs from 'yargs';
3
3
  import { hideBin } from 'yargs/helpers';
4
4
  import z from 'zod';
5
- import { endpoints, Filter } from './tools';
6
- import { ClientCapabilities, knownClients, ClientType } from './compat';
7
5
 
8
6
  export type CLIOptions = McpOptions & {
9
- list: boolean;
10
7
  transport: 'stdio' | 'http';
11
8
  port: number | undefined;
12
9
  socket: string | undefined;
13
10
  };
14
11
 
15
12
  export type McpOptions = {
16
- client?: ClientType | undefined;
17
- includeDynamicTools?: boolean | undefined;
18
- includeAllTools?: boolean | undefined;
19
- includeCodeTools?: boolean | undefined;
20
13
  includeDocsTools?: boolean | undefined;
21
- filters?: Filter[] | undefined;
22
- capabilities?: Partial<ClientCapabilities> | undefined;
23
14
  };
24
15
 
25
- const CAPABILITY_CHOICES = [
26
- 'top-level-unions',
27
- 'valid-json',
28
- 'refs',
29
- 'unions',
30
- 'formats',
31
- 'tool-name-length',
32
- ] as const;
33
-
34
- type Capability = (typeof CAPABILITY_CHOICES)[number];
35
-
36
- function parseCapabilityValue(cap: string): { name: Capability; value?: number } {
37
- if (cap.startsWith('tool-name-length=')) {
38
- const parts = cap.split('=');
39
- if (parts.length === 2) {
40
- const length = parseInt(parts[1]!, 10);
41
- if (!isNaN(length)) {
42
- return { name: 'tool-name-length', value: length };
43
- }
44
- throw new Error(`Invalid tool-name-length value: ${parts[1]}. Expected a number.`);
45
- }
46
- throw new Error(`Invalid format for tool-name-length. Expected tool-name-length=N.`);
47
- }
48
- if (!CAPABILITY_CHOICES.includes(cap as Capability)) {
49
- throw new Error(`Unknown capability: ${cap}. Valid capabilities are: ${CAPABILITY_CHOICES.join(', ')}`);
50
- }
51
- return { name: cap as Capability };
52
- }
53
-
54
16
  export function parseCLIOptions(): CLIOptions {
55
17
  const opts = yargs(hideBin(process.argv))
56
18
  .option('tools', {
57
19
  type: 'string',
58
20
  array: true,
59
- choices: ['dynamic', 'all', 'code', 'docs'],
21
+ choices: ['code', 'docs'],
60
22
  description: 'Use dynamic tools or all tools',
61
23
  })
62
24
  .option('no-tools', {
63
25
  type: 'string',
64
26
  array: true,
65
- choices: ['dynamic', 'all', 'code', 'docs'],
27
+ choices: ['code', 'docs'],
66
28
  description: 'Do not use any dynamic or all tools',
67
29
  })
68
- .option('tool', {
69
- type: 'string',
70
- array: true,
71
- description: 'Include tools matching the specified names',
72
- })
73
- .option('resource', {
74
- type: 'string',
75
- array: true,
76
- description: 'Include tools matching the specified resources',
77
- })
78
- .option('operation', {
79
- type: 'string',
80
- array: true,
81
- choices: ['read', 'write'],
82
- description: 'Include tools matching the specified operations',
83
- })
84
- .option('tag', {
85
- type: 'string',
86
- array: true,
87
- description: 'Include tools with the specified tags',
88
- })
89
- .option('no-tool', {
90
- type: 'string',
91
- array: true,
92
- description: 'Exclude tools matching the specified names',
93
- })
94
- .option('no-resource', {
95
- type: 'string',
96
- array: true,
97
- description: 'Exclude tools matching the specified resources',
98
- })
99
- .option('no-operation', {
100
- type: 'string',
101
- array: true,
102
- description: 'Exclude tools matching the specified operations',
103
- })
104
- .option('no-tag', {
105
- type: 'string',
106
- array: true,
107
- description: 'Exclude tools with the specified tags',
108
- })
109
- .option('list', {
110
- type: 'boolean',
111
- description: 'List all tools and exit',
112
- })
113
- .option('client', {
114
- type: 'string',
115
- choices: Object.keys(knownClients),
116
- description: 'Specify the MCP client being used',
117
- })
118
- .option('capability', {
119
- type: 'string',
120
- array: true,
121
- description: 'Specify client capabilities',
122
- coerce: (values: string[]) => {
123
- return values.flatMap((v) => v.split(','));
124
- },
125
- })
126
- .option('no-capability', {
127
- type: 'string',
128
- array: true,
129
- description: 'Unset client capabilities',
130
- choices: CAPABILITY_CHOICES,
131
- coerce: (values: string[]) => {
132
- return values.flatMap((v) => v.split(','));
133
- },
134
- })
135
- .option('describe-capabilities', {
136
- type: 'boolean',
137
- description: 'Print detailed explanation of client capabilities and exit',
138
- })
139
30
  .option('transport', {
140
31
  type: 'string',
141
32
  choices: ['stdio', 'http'],
@@ -152,122 +43,19 @@ export function parseCLIOptions(): CLIOptions {
152
43
  })
153
44
  .help();
154
45
 
155
- for (const [command, desc] of examples()) {
156
- opts.example(command, desc);
157
- }
158
-
159
46
  const argv = opts.parseSync();
160
47
 
161
- // Handle describe-capabilities flag
162
- if (argv.describeCapabilities) {
163
- console.log(getCapabilitiesExplanation());
164
- process.exit(0);
165
- }
166
-
167
- const filters: Filter[] = [];
168
-
169
- // Helper function to support comma-separated values
170
- const splitValues = (values: string[] | undefined): string[] => {
171
- if (!values) return [];
172
- return values.flatMap((v) => v.split(','));
173
- };
174
-
175
- for (const tag of splitValues(argv.tag)) {
176
- filters.push({ type: 'tag', op: 'include', value: tag });
177
- }
178
-
179
- for (const tag of splitValues(argv.noTag)) {
180
- filters.push({ type: 'tag', op: 'exclude', value: tag });
181
- }
182
-
183
- for (const resource of splitValues(argv.resource)) {
184
- filters.push({ type: 'resource', op: 'include', value: resource });
185
- }
186
-
187
- for (const resource of splitValues(argv.noResource)) {
188
- filters.push({ type: 'resource', op: 'exclude', value: resource });
189
- }
190
-
191
- for (const tool of splitValues(argv.tool)) {
192
- filters.push({ type: 'tool', op: 'include', value: tool });
193
- }
194
-
195
- for (const tool of splitValues(argv.noTool)) {
196
- filters.push({ type: 'tool', op: 'exclude', value: tool });
197
- }
198
-
199
- for (const operation of splitValues(argv.operation)) {
200
- filters.push({ type: 'operation', op: 'include', value: operation });
201
- }
202
-
203
- for (const operation of splitValues(argv.noOperation)) {
204
- filters.push({ type: 'operation', op: 'exclude', value: operation });
205
- }
206
-
207
- // Parse client capabilities
208
- const clientCapabilities: Partial<ClientCapabilities> = {};
209
-
210
- // Apply individual capability overrides
211
- if (Array.isArray(argv.capability)) {
212
- for (const cap of argv.capability) {
213
- const parsedCap = parseCapabilityValue(cap);
214
- if (parsedCap.name === 'top-level-unions') {
215
- clientCapabilities.topLevelUnions = true;
216
- } else if (parsedCap.name === 'valid-json') {
217
- clientCapabilities.validJson = true;
218
- } else if (parsedCap.name === 'refs') {
219
- clientCapabilities.refs = true;
220
- } else if (parsedCap.name === 'unions') {
221
- clientCapabilities.unions = true;
222
- } else if (parsedCap.name === 'formats') {
223
- clientCapabilities.formats = true;
224
- } else if (parsedCap.name === 'tool-name-length') {
225
- clientCapabilities.toolNameLength = parsedCap.value;
226
- }
227
- }
228
- }
229
-
230
- // Handle no-capability options to unset capabilities
231
- if (Array.isArray(argv.noCapability)) {
232
- for (const cap of argv.noCapability) {
233
- if (cap === 'top-level-unions') {
234
- clientCapabilities.topLevelUnions = false;
235
- } else if (cap === 'valid-json') {
236
- clientCapabilities.validJson = false;
237
- } else if (cap === 'refs') {
238
- clientCapabilities.refs = false;
239
- } else if (cap === 'unions') {
240
- clientCapabilities.unions = false;
241
- } else if (cap === 'formats') {
242
- clientCapabilities.formats = false;
243
- } else if (cap === 'tool-name-length') {
244
- clientCapabilities.toolNameLength = undefined;
245
- }
246
- }
247
- }
248
-
249
- const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code' | 'docs') =>
48
+ const shouldIncludeToolType = (toolType: 'code' | 'docs') =>
250
49
  argv.noTools?.includes(toolType) ? false
251
50
  : argv.tools?.includes(toolType) ? true
252
51
  : undefined;
253
52
 
254
- const includeDynamicTools = shouldIncludeToolType('dynamic');
255
- const includeAllTools = shouldIncludeToolType('all');
256
- const includeCodeTools = shouldIncludeToolType('code');
257
53
  const includeDocsTools = shouldIncludeToolType('docs');
258
54
 
259
55
  const transport = argv.transport as 'stdio' | 'http';
260
56
 
261
- const client = argv.client as ClientType;
262
57
  return {
263
- client: client && client !== 'infer' && knownClients[client] ? client : undefined,
264
- includeDynamicTools,
265
- includeAllTools,
266
- includeCodeTools,
267
58
  includeDocsTools,
268
- filters,
269
- capabilities: clientCapabilities,
270
- list: argv.list || false,
271
59
  transport,
272
60
  port: argv.port,
273
61
  socket: argv.socket,
@@ -284,190 +72,21 @@ const coerceArray = <T extends z.ZodTypeAny>(zodType: T) =>
284
72
  );
285
73
 
286
74
  const QueryOptions = z.object({
287
- tools: coerceArray(z.enum(['dynamic', 'all', 'code', 'docs'])).describe('Specify which MCP tools to use'),
288
- no_tools: coerceArray(z.enum(['dynamic', 'all', 'code', 'docs'])).describe(
289
- 'Specify which MCP tools to not use.',
290
- ),
75
+ tools: coerceArray(z.enum(['code', 'docs'])).describe('Specify which MCP tools to use'),
76
+ no_tools: coerceArray(z.enum(['code', 'docs'])).describe('Specify which MCP tools to not use.'),
291
77
  tool: coerceArray(z.string()).describe('Include tools matching the specified names'),
292
- resource: coerceArray(z.string()).describe('Include tools matching the specified resources'),
293
- operation: coerceArray(z.enum(['read', 'write'])).describe(
294
- 'Include tools matching the specified operations',
295
- ),
296
- tag: coerceArray(z.string()).describe('Include tools with the specified tags'),
297
- no_tool: coerceArray(z.string()).describe('Exclude tools matching the specified names'),
298
- no_resource: coerceArray(z.string()).describe('Exclude tools matching the specified resources'),
299
- no_operation: coerceArray(z.enum(['read', 'write'])).describe(
300
- 'Exclude tools matching the specified operations',
301
- ),
302
- no_tag: coerceArray(z.string()).describe('Exclude tools with the specified tags'),
303
- client: ClientType.optional().describe('Specify the MCP client being used'),
304
- capability: coerceArray(z.string()).describe('Specify client capabilities'),
305
- no_capability: coerceArray(z.enum(CAPABILITY_CHOICES)).describe('Unset client capabilities'),
306
78
  });
307
79
 
308
80
  export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): McpOptions {
309
81
  const queryObject = typeof query === 'string' ? qs.parse(query) : query;
310
82
  const queryOptions = QueryOptions.parse(queryObject);
311
83
 
312
- const filters: Filter[] = [...(defaultOptions.filters ?? [])];
313
-
314
- for (const resource of queryOptions.resource || []) {
315
- filters.push({ type: 'resource', op: 'include', value: resource });
316
- }
317
- for (const operation of queryOptions.operation || []) {
318
- filters.push({ type: 'operation', op: 'include', value: operation });
319
- }
320
- for (const tag of queryOptions.tag || []) {
321
- filters.push({ type: 'tag', op: 'include', value: tag });
322
- }
323
- for (const tool of queryOptions.tool || []) {
324
- filters.push({ type: 'tool', op: 'include', value: tool });
325
- }
326
- for (const resource of queryOptions.no_resource || []) {
327
- filters.push({ type: 'resource', op: 'exclude', value: resource });
328
- }
329
- for (const operation of queryOptions.no_operation || []) {
330
- filters.push({ type: 'operation', op: 'exclude', value: operation });
331
- }
332
- for (const tag of queryOptions.no_tag || []) {
333
- filters.push({ type: 'tag', op: 'exclude', value: tag });
334
- }
335
- for (const tool of queryOptions.no_tool || []) {
336
- filters.push({ type: 'tool', op: 'exclude', value: tool });
337
- }
338
-
339
- // Parse client capabilities
340
- const clientCapabilities: Partial<ClientCapabilities> = { ...defaultOptions.capabilities };
341
-
342
- for (const cap of queryOptions.capability || []) {
343
- const parsed = parseCapabilityValue(cap);
344
- if (parsed.name === 'top-level-unions') {
345
- clientCapabilities.topLevelUnions = true;
346
- } else if (parsed.name === 'valid-json') {
347
- clientCapabilities.validJson = true;
348
- } else if (parsed.name === 'refs') {
349
- clientCapabilities.refs = true;
350
- } else if (parsed.name === 'unions') {
351
- clientCapabilities.unions = true;
352
- } else if (parsed.name === 'formats') {
353
- clientCapabilities.formats = true;
354
- } else if (parsed.name === 'tool-name-length') {
355
- clientCapabilities.toolNameLength = parsed.value;
356
- }
357
- }
358
-
359
- for (const cap of queryOptions.no_capability || []) {
360
- if (cap === 'top-level-unions') {
361
- clientCapabilities.topLevelUnions = false;
362
- } else if (cap === 'valid-json') {
363
- clientCapabilities.validJson = false;
364
- } else if (cap === 'refs') {
365
- clientCapabilities.refs = false;
366
- } else if (cap === 'unions') {
367
- clientCapabilities.unions = false;
368
- } else if (cap === 'formats') {
369
- clientCapabilities.formats = false;
370
- } else if (cap === 'tool-name-length') {
371
- clientCapabilities.toolNameLength = undefined;
372
- }
373
- }
374
-
375
- let dynamicTools: boolean | undefined =
376
- queryOptions.no_tools && queryOptions.no_tools?.includes('dynamic') ? false
377
- : queryOptions.tools?.includes('dynamic') ? true
378
- : defaultOptions.includeDynamicTools;
379
-
380
- let allTools: boolean | undefined =
381
- queryOptions.no_tools && queryOptions.no_tools?.includes('all') ? false
382
- : queryOptions.tools?.includes('all') ? true
383
- : defaultOptions.includeAllTools;
384
-
385
84
  let docsTools: boolean | undefined =
386
85
  queryOptions.no_tools && queryOptions.no_tools?.includes('docs') ? false
387
86
  : queryOptions.tools?.includes('docs') ? true
388
87
  : defaultOptions.includeDocsTools;
389
88
 
390
- let codeTools: boolean | undefined =
391
- queryOptions.no_tools && queryOptions.no_tools?.includes('code') ? false
392
- : queryOptions.tools?.includes('code') && defaultOptions.includeCodeTools ? true
393
- : defaultOptions.includeCodeTools;
394
-
395
89
  return {
396
- client: queryOptions.client ?? defaultOptions.client,
397
- includeDynamicTools: dynamicTools,
398
- includeAllTools: allTools,
399
- includeCodeTools: codeTools,
400
90
  includeDocsTools: docsTools,
401
- filters,
402
- capabilities: clientCapabilities,
403
91
  };
404
92
  }
405
-
406
- function getCapabilitiesExplanation(): string {
407
- return `
408
- Client Capabilities Explanation:
409
-
410
- Different Language Models (LLMs) and the MCP clients that use them have varying limitations in how they handle tool schemas. Capability flags allow you to inform the MCP server about these limitations.
411
-
412
- When a capability flag is set to false, the MCP server will automatically adjust the tool schemas to work around that limitation, ensuring broader compatibility.
413
-
414
- Available Capabilities:
415
-
416
- # top-level-unions
417
- Some clients/LLMs do not support JSON schemas with a union type (anyOf) at the root level. If a client lacks this capability, the MCP server splits tools with top-level unions into multiple separate tools, one for each variant in the union.
418
-
419
- # refs
420
- Some clients/LLMs do not support $ref pointers for schema reuse. If a client lacks this capability, the MCP server automatically inlines all references ($defs) directly into the schema. Properties that would cause circular references are removed during this process.
421
-
422
- # valid-json
423
- Some clients/LLMs may incorrectly send arguments as a JSON-encoded string instead of a proper JSON object. If a client *has* this capability, the MCP server will attempt to parse string values as JSON if the initial validation against the schema fails.
424
-
425
- # unions
426
- Some clients/LLMs do not support union types (anyOf) in JSON schemas. If a client lacks this capability, the MCP server removes all anyOf fields and uses only the first variant as the schema.
427
-
428
- # formats
429
- Some clients/LLMs do not support the 'format' keyword in JSON Schema specifications. If a client lacks this capability, the MCP server removes all format fields and appends the format information to the field's description in parentheses.
430
-
431
- # tool-name-length=N
432
- Some clients/LLMs impose a maximum length on tool names. If this capability is set, the MCP server will automatically truncate tool names exceeding the specified length (N), ensuring uniqueness by appending numbers if necessary.
433
-
434
- Client Presets (--client):
435
- Presets like '--client=openai-agents' or '--client=cursor' automatically configure these capabilities based on current known limitations of those clients, simplifying setup.
436
-
437
- Current presets:
438
- ${JSON.stringify(knownClients, null, 2)}
439
- `;
440
- }
441
-
442
- function examples(): [string, string][] {
443
- const firstEndpoint = endpoints[0]!;
444
- const secondEndpoint =
445
- endpoints.find((e) => e.metadata.resource !== firstEndpoint.metadata.resource) || endpoints[1];
446
- const tag = endpoints.find((e) => e.metadata.tags.length > 0)?.metadata.tags[0];
447
- const otherEndpoint = secondEndpoint || firstEndpoint;
448
-
449
- return [
450
- [
451
- `--tool="${firstEndpoint.tool.name}" ${secondEndpoint ? `--tool="${secondEndpoint.tool.name}"` : ''}`,
452
- 'Include tools by name',
453
- ],
454
- [
455
- `--resource="${firstEndpoint.metadata.resource}" --operation="read"`,
456
- 'Filter by resource and operation',
457
- ],
458
- [
459
- `--resource="${otherEndpoint.metadata.resource}*" --no-tool="${otherEndpoint.tool.name}"`,
460
- 'Use resource wildcards and exclusions',
461
- ],
462
- [`--client="cursor"`, 'Adjust schemas to be more compatible with Cursor'],
463
- [
464
- `--capability="top-level-unions" --capability="tool-name-length=40"`,
465
- 'Specify individual client capabilities',
466
- ],
467
- [
468
- `--client="cursor" --no-capability="tool-name-length"`,
469
- 'Use cursor client preset but remove tool name length limit',
470
- ],
471
- ...(tag ? [[`--tag="${tag}"`, 'Filter based on tags'] as [string, string]] : []),
472
- ];
473
- }
package/src/server.ts CHANGED
@@ -2,39 +2,26 @@
2
2
 
3
3
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
- import { Endpoint, endpoints, HandlerFunction, query } from './tools';
6
5
  import {
7
6
  CallToolRequestSchema,
8
7
  ListToolsRequestSchema,
9
8
  SetLevelRequestSchema,
10
- Implementation,
11
- Tool,
12
9
  } from '@modelcontextprotocol/sdk/types.js';
13
10
  import { ClientOptions } from '@zavudev/sdk';
14
11
  import Zavudev from '@zavudev/sdk';
15
- import {
16
- applyCompatibilityTransformations,
17
- ClientCapabilities,
18
- defaultClientCapabilities,
19
- knownClients,
20
- parseEmbeddedJSON,
21
- } from './compat';
22
- import { dynamicTools } from './dynamic-tools';
23
12
  import { codeTool } from './code-tool';
24
13
  import docsSearchTool from './docs-search-tool';
25
14
  import { McpOptions } from './options';
15
+ import { HandlerFunction, McpTool } from './types';
26
16
 
27
17
  export { McpOptions } from './options';
28
- export { ClientType } from './compat';
29
- export { Filter } from './tools';
30
18
  export { ClientOptions } from '@zavudev/sdk';
31
- export { endpoints } from './tools';
32
19
 
33
20
  export const newMcpServer = () =>
34
21
  new McpServer(
35
22
  {
36
23
  name: 'zavudev_sdk_api',
37
- version: '0.15.1',
24
+ version: '0.17.0',
38
25
  },
39
26
  { capabilities: { tools: {}, logging: {} } },
40
27
  );
@@ -52,25 +39,6 @@ export function initMcpServer(params: {
52
39
  mcpOptions?: McpOptions;
53
40
  }) {
54
41
  const server = params.server instanceof McpServer ? params.server.server : params.server;
55
- const mcpOptions = params.mcpOptions ?? {};
56
-
57
- let providedEndpoints: Endpoint[] | null = null;
58
- let endpointMap: Record<string, Endpoint> | null = null;
59
-
60
- const initTools = async (implementation?: Implementation) => {
61
- if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) {
62
- mcpOptions.client =
63
- implementation.name.toLowerCase().includes('claude') ? 'claude'
64
- : implementation.name.toLowerCase().includes('cursor') ? 'cursor'
65
- : undefined;
66
- mcpOptions.capabilities = {
67
- ...(mcpOptions.client && knownClients[mcpOptions.client]),
68
- ...mcpOptions.capabilities,
69
- };
70
- }
71
- providedEndpoints ??= await selectTools(endpoints, mcpOptions);
72
- endpointMap ??= Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint]));
73
- };
74
42
 
75
43
  const logAtLevel =
76
44
  (level: 'debug' | 'info' | 'warning' | 'error') =>
@@ -96,26 +64,23 @@ export function initMcpServer(params: {
96
64
  },
97
65
  });
98
66
 
67
+ const providedTools = selectTools(params.mcpOptions);
68
+ const toolMap = Object.fromEntries(providedTools.map((mcpTool) => [mcpTool.tool.name, mcpTool]));
69
+
99
70
  server.setRequestHandler(ListToolsRequestSchema, async () => {
100
- if (providedEndpoints === null) {
101
- await initTools(server.getClientVersion());
102
- }
103
71
  return {
104
- tools: providedEndpoints!.map((endpoint) => endpoint.tool),
72
+ tools: providedTools.map((mcpTool) => mcpTool.tool),
105
73
  };
106
74
  });
107
75
 
108
76
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
109
- if (endpointMap === null) {
110
- await initTools(server.getClientVersion());
111
- }
112
77
  const { name, arguments: args } = request.params;
113
- const endpoint = endpointMap![name];
114
- if (!endpoint) {
78
+ const mcpTool = toolMap[name];
79
+ if (!mcpTool) {
115
80
  throw new Error(`Unknown tool: ${name}`);
116
81
  }
117
82
 
118
- return executeHandler(endpoint.tool, endpoint.handler, client, args, mcpOptions.capabilities);
83
+ return executeHandler(mcpTool.handler, client, args);
119
84
  });
120
85
 
121
86
  server.setRequestHandler(SetLevelRequestSchema, async (request) => {
@@ -145,47 +110,22 @@ export function initMcpServer(params: {
145
110
  /**
146
111
  * Selects the tools to include in the MCP Server based on the provided options.
147
112
  */
148
- export async function selectTools(endpoints: Endpoint[], options?: McpOptions): Promise<Endpoint[]> {
149
- const filteredEndpoints = query(options?.filters ?? [], endpoints);
150
-
151
- let includedTools = filteredEndpoints.slice();
152
-
153
- if (includedTools.length > 0) {
154
- if (options?.includeDynamicTools) {
155
- includedTools = dynamicTools(includedTools);
156
- }
157
- } else {
158
- if (options?.includeAllTools) {
159
- includedTools = endpoints.slice();
160
- } else if (options?.includeDynamicTools) {
161
- includedTools = dynamicTools(endpoints);
162
- } else if (options?.includeCodeTools) {
163
- includedTools = [await codeTool()];
164
- } else {
165
- includedTools = endpoints.slice();
166
- }
167
- }
113
+ export function selectTools(options?: McpOptions): McpTool[] {
114
+ const includedTools = [codeTool()];
168
115
  if (options?.includeDocsTools ?? true) {
169
116
  includedTools.push(docsSearchTool);
170
117
  }
171
- const capabilities = { ...defaultClientCapabilities, ...options?.capabilities };
172
- return applyCompatibilityTransformations(includedTools, capabilities);
118
+ return includedTools;
173
119
  }
174
120
 
175
121
  /**
176
122
  * Runs the provided handler with the given client and arguments.
177
123
  */
178
124
  export async function executeHandler(
179
- tool: Tool,
180
125
  handler: HandlerFunction,
181
126
  client: Zavudev,
182
127
  args: Record<string, unknown> | undefined,
183
- compatibilityOptions?: Partial<ClientCapabilities>,
184
128
  ) {
185
- const options = { ...defaultClientCapabilities, ...compatibilityOptions };
186
- if (!options.validJson && args) {
187
- args = parseEmbeddedJSON(args, tool.inputSchema);
188
- }
189
129
  return await handler(client, args || {});
190
130
  }
191
131
 
package/src/stdio.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
2
2
  import { initMcpServer, newMcpServer } from './server';
3
- import { McpOptions } from './options';
4
3
 
5
- export const launchStdioServer = async (options: McpOptions) => {
4
+ export const launchStdioServer = async () => {
6
5
  const server = newMcpServer();
7
6
 
8
- initMcpServer({ server, mcpOptions: options });
7
+ initMcpServer({ server });
9
8
 
10
9
  const transport = new StdioServerTransport();
11
10
  await server.connect(transport);
@@ -108,7 +108,7 @@ export type Metadata = {
108
108
  operationId?: string;
109
109
  };
110
110
 
111
- export type Endpoint = {
111
+ export type McpTool = {
112
112
  metadata: Metadata;
113
113
  tool: Tool;
114
114
  handler: HandlerFunction;
package/stdio.d.mts CHANGED
@@ -1,3 +1,2 @@
1
- import { McpOptions } from "./options.mjs";
2
- export declare const launchStdioServer: (options: McpOptions) => Promise<void>;
1
+ export declare const launchStdioServer: () => Promise<void>;
3
2
  //# sourceMappingURL=stdio.d.mts.map
package/stdio.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE;AAErB,eAAO,MAAM,iBAAiB,GAAU,SAAS,UAAU,kBAQ1D,CAAC"}
1
+ {"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,qBAQ7B,CAAC"}
package/stdio.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { McpOptions } from "./options.js";
2
- export declare const launchStdioServer: (options: McpOptions) => Promise<void>;
1
+ export declare const launchStdioServer: () => Promise<void>;
3
2
  //# sourceMappingURL=stdio.d.ts.map
package/stdio.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAEO,EAAE,UAAU,EAAE;AAErB,eAAO,MAAM,iBAAiB,GAAU,SAAS,UAAU,kBAQ1D,CAAC"}
1
+ {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,qBAQ7B,CAAC"}
package/stdio.js CHANGED
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.launchStdioServer = void 0;
4
4
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
5
5
  const server_1 = require("./server.js");
6
- const launchStdioServer = async (options) => {
6
+ const launchStdioServer = async () => {
7
7
  const server = (0, server_1.newMcpServer)();
8
- (0, server_1.initMcpServer)({ server, mcpOptions: options });
8
+ (0, server_1.initMcpServer)({ server });
9
9
  const transport = new stdio_js_1.StdioServerTransport();
10
10
  await server.connect(transport);
11
11
  console.error('MCP Server running on stdio');
package/stdio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AACjF,wCAAuD;AAGhD,MAAM,iBAAiB,GAAG,KAAK,EAAE,OAAmB,EAAE,EAAE;IAC7D,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;IAE9B,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IAE/C,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
1
+ {"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AACjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IAC1C,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;IAE9B,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}