@codeqr/ts-mcp 0.8.0 → 0.19.3

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 (477) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +16 -218
  3. package/auth.d.mts +6 -0
  4. package/auth.d.mts.map +1 -0
  5. package/auth.d.ts +6 -0
  6. package/auth.d.ts.map +1 -0
  7. package/auth.js +37 -0
  8. package/auth.js.map +1 -0
  9. package/{headers.mjs → auth.mjs} +16 -2
  10. package/auth.mjs.map +1 -0
  11. package/code-tool-paths.cjs +4 -2
  12. package/code-tool-paths.cjs.map +1 -1
  13. package/code-tool-paths.d.cts +1 -1
  14. package/code-tool-paths.d.cts.map +1 -1
  15. package/code-tool-types.d.mts +7 -9
  16. package/code-tool-types.d.mts.map +1 -1
  17. package/code-tool-types.d.ts +7 -9
  18. package/code-tool-types.d.ts.map +1 -1
  19. package/code-tool-worker.d.mts.map +1 -1
  20. package/code-tool-worker.d.ts.map +1 -1
  21. package/code-tool-worker.js +95 -32
  22. package/code-tool-worker.js.map +1 -1
  23. package/code-tool-worker.mjs +95 -32
  24. package/code-tool-worker.mjs.map +1 -1
  25. package/code-tool.d.mts +12 -3
  26. package/code-tool.d.mts.map +1 -1
  27. package/code-tool.d.ts +12 -3
  28. package/code-tool.d.ts.map +1 -1
  29. package/code-tool.js +275 -109
  30. package/code-tool.js.map +1 -1
  31. package/code-tool.mjs +275 -109
  32. package/code-tool.mjs.map +1 -1
  33. package/docs-search-tool.d.mts +22 -9
  34. package/docs-search-tool.d.mts.map +1 -1
  35. package/docs-search-tool.d.ts +22 -9
  36. package/docs-search-tool.d.ts.map +1 -1
  37. package/docs-search-tool.js +31 -5
  38. package/docs-search-tool.js.map +1 -1
  39. package/docs-search-tool.mjs +31 -5
  40. package/docs-search-tool.mjs.map +1 -1
  41. package/http.d.mts +6 -3
  42. package/http.d.mts.map +1 -1
  43. package/http.d.ts +6 -3
  44. package/http.d.ts.map +1 -1
  45. package/http.js +108 -49
  46. package/http.js.map +1 -1
  47. package/http.mjs +108 -49
  48. package/http.mjs.map +1 -1
  49. package/index.js +19 -50
  50. package/index.js.map +1 -1
  51. package/index.mjs +19 -50
  52. package/index.mjs.map +1 -1
  53. package/instructions.d.mts +2 -0
  54. package/instructions.d.mts.map +1 -0
  55. package/instructions.d.ts +2 -0
  56. package/instructions.d.ts.map +1 -0
  57. package/instructions.js +42 -0
  58. package/instructions.js.map +1 -0
  59. package/instructions.mjs +39 -0
  60. package/instructions.mjs.map +1 -0
  61. package/logger.d.mts +7 -0
  62. package/logger.d.mts.map +1 -0
  63. package/logger.d.ts +7 -0
  64. package/logger.d.ts.map +1 -0
  65. package/logger.js +29 -0
  66. package/logger.js.map +1 -0
  67. package/logger.mjs +22 -0
  68. package/logger.mjs.map +1 -0
  69. package/methods.d.mts +10 -0
  70. package/methods.d.mts.map +1 -0
  71. package/methods.d.ts +10 -0
  72. package/methods.d.ts.map +1 -0
  73. package/methods.js +215 -0
  74. package/methods.js.map +1 -0
  75. package/methods.mjs +211 -0
  76. package/methods.mjs.map +1 -0
  77. package/options.d.mts +9 -9
  78. package/options.d.mts.map +1 -1
  79. package/options.d.ts +9 -9
  80. package/options.d.ts.map +1 -1
  81. package/options.js +54 -359
  82. package/options.js.map +1 -1
  83. package/options.mjs +54 -359
  84. package/options.mjs.map +1 -1
  85. package/package.json +67 -60
  86. package/server.d.mts +11 -16
  87. package/server.d.mts.map +1 -1
  88. package/server.d.ts +11 -16
  89. package/server.d.ts.map +1 -1
  90. package/server.js +86 -101
  91. package/server.js.map +1 -1
  92. package/server.mjs +85 -96
  93. package/server.mjs.map +1 -1
  94. package/src/{headers.ts → auth.ts} +18 -1
  95. package/src/code-tool-paths.cts +3 -1
  96. package/src/code-tool-types.ts +8 -9
  97. package/src/code-tool-worker.ts +110 -47
  98. package/src/code-tool.ts +362 -134
  99. package/src/docs-search-tool.ts +54 -6
  100. package/src/http.ts +128 -54
  101. package/src/index.ts +22 -63
  102. package/src/instructions.ts +60 -0
  103. package/src/logger.ts +28 -0
  104. package/src/methods.ts +236 -0
  105. package/src/options.ts +72 -384
  106. package/src/server.ts +99 -116
  107. package/src/stdio.ts +6 -5
  108. package/src/{tools/types.ts → types.ts} +14 -5
  109. package/src/util.ts +25 -0
  110. package/stdio.d.mts +1 -1
  111. package/stdio.d.mts.map +1 -1
  112. package/stdio.d.ts +1 -1
  113. package/stdio.d.ts.map +1 -1
  114. package/stdio.js +5 -4
  115. package/stdio.js.map +1 -1
  116. package/stdio.mjs +5 -4
  117. package/stdio.mjs.map +1 -1
  118. package/{tools/types.d.mts → types.d.mts} +10 -2
  119. package/types.d.mts.map +1 -0
  120. package/{tools/types.d.ts → types.d.ts} +10 -2
  121. package/types.d.ts.map +1 -0
  122. package/types.js.map +1 -0
  123. package/types.mjs.map +1 -0
  124. package/util.d.mts +4 -0
  125. package/util.d.mts.map +1 -0
  126. package/util.d.ts +4 -0
  127. package/util.d.ts.map +1 -0
  128. package/util.js +30 -0
  129. package/util.js.map +1 -0
  130. package/util.mjs +24 -0
  131. package/util.mjs.map +1 -0
  132. package/compat.d.mts +0 -58
  133. package/compat.d.mts.map +0 -1
  134. package/compat.d.ts +0 -58
  135. package/compat.d.ts.map +0 -1
  136. package/compat.js +0 -387
  137. package/compat.js.map +0 -1
  138. package/compat.mjs +0 -378
  139. package/compat.mjs.map +0 -1
  140. package/dynamic-tools.d.mts +0 -12
  141. package/dynamic-tools.d.mts.map +0 -1
  142. package/dynamic-tools.d.ts +0 -12
  143. package/dynamic-tools.d.ts.map +0 -1
  144. package/dynamic-tools.js +0 -135
  145. package/dynamic-tools.js.map +0 -1
  146. package/dynamic-tools.mjs +0 -132
  147. package/dynamic-tools.mjs.map +0 -1
  148. package/filtering.d.mts +0 -3
  149. package/filtering.d.mts.map +0 -1
  150. package/filtering.d.ts +0 -3
  151. package/filtering.d.ts.map +0 -1
  152. package/filtering.js +0 -24
  153. package/filtering.js.map +0 -1
  154. package/filtering.mjs +0 -16
  155. package/filtering.mjs.map +0 -1
  156. package/headers.d.mts +0 -4
  157. package/headers.d.mts.map +0 -1
  158. package/headers.d.ts +0 -4
  159. package/headers.d.ts.map +0 -1
  160. package/headers.js +0 -22
  161. package/headers.js.map +0 -1
  162. package/headers.mjs.map +0 -1
  163. package/src/compat.ts +0 -483
  164. package/src/dynamic-tools.ts +0 -153
  165. package/src/filtering.ts +0 -18
  166. package/src/tools/analytics/retrieve-analytics.ts +0 -441
  167. package/src/tools/domains/create-domains.ts +0 -75
  168. package/src/tools/domains/delete-domains.ts +0 -55
  169. package/src/tools/domains/list-domains.ts +0 -68
  170. package/src/tools/domains/update-domains.ts +0 -79
  171. package/src/tools/events/list-events.ts +0 -421
  172. package/src/tools/index.ts +0 -133
  173. package/src/tools/links/bulk/create-links-bulk.ts +0 -966
  174. package/src/tools/links/bulk/delete-links-bulk.ts +0 -59
  175. package/src/tools/links/count-links.ts +0 -957
  176. package/src/tools/links/create-links.ts +0 -957
  177. package/src/tools/links/delete-links.ts +0 -56
  178. package/src/tools/links/list-links.ts +0 -980
  179. package/src/tools/links/retrieve-info-links.ts +0 -75
  180. package/src/tools/links/update-links.ts +0 -964
  181. package/src/tools/links/upsert-links.ts +0 -958
  182. package/src/tools/projects/list-projects.ts +0 -51
  183. package/src/tools/projects/retrieve-projects.ts +0 -56
  184. package/src/tools/qrcodes/bulk/create-qrcodes-bulk.ts +0 -1077
  185. package/src/tools/qrcodes/bulk/delete-qrcodes-bulk.ts +0 -59
  186. package/src/tools/qrcodes/count-qrcodes.ts +0 -220
  187. package/src/tools/qrcodes/create-qrcodes.ts +0 -1067
  188. package/src/tools/qrcodes/delete-qrcodes.ts +0 -56
  189. package/src/tools/qrcodes/list-qrcodes.ts +0 -221
  190. package/src/tools/qrcodes/retrieve-qrcodes.ts +0 -67
  191. package/src/tools/qrcodes/update-qrcodes.ts +0 -1074
  192. package/src/tools/qrcodes/upsert-qrcodes.ts +0 -1068
  193. package/src/tools/tags/create-tags.ts +0 -59
  194. package/src/tools/tags/delete-tags.ts +0 -55
  195. package/src/tools/tags/list-tags.ts +0 -87
  196. package/src/tools/tags/update-tags.ts +0 -63
  197. package/src/tools/track/track-lead-track.ts +0 -93
  198. package/src/tools/track/track-sale-track.ts +0 -108
  199. package/src/tools.ts +0 -1
  200. package/tools/analytics/retrieve-analytics.d.mts +0 -45
  201. package/tools/analytics/retrieve-analytics.d.mts.map +0 -1
  202. package/tools/analytics/retrieve-analytics.d.ts +0 -45
  203. package/tools/analytics/retrieve-analytics.d.ts.map +0 -1
  204. package/tools/analytics/retrieve-analytics.js +0 -438
  205. package/tools/analytics/retrieve-analytics.js.map +0 -1
  206. package/tools/analytics/retrieve-analytics.mjs +0 -431
  207. package/tools/analytics/retrieve-analytics.mjs.map +0 -1
  208. package/tools/domains/create-domains.d.mts +0 -45
  209. package/tools/domains/create-domains.d.mts.map +0 -1
  210. package/tools/domains/create-domains.d.ts +0 -45
  211. package/tools/domains/create-domains.d.ts.map +0 -1
  212. package/tools/domains/create-domains.js +0 -74
  213. package/tools/domains/create-domains.js.map +0 -1
  214. package/tools/domains/create-domains.mjs +0 -67
  215. package/tools/domains/create-domains.mjs.map +0 -1
  216. package/tools/domains/delete-domains.d.mts +0 -45
  217. package/tools/domains/delete-domains.d.mts.map +0 -1
  218. package/tools/domains/delete-domains.d.ts +0 -45
  219. package/tools/domains/delete-domains.d.ts.map +0 -1
  220. package/tools/domains/delete-domains.js +0 -55
  221. package/tools/domains/delete-domains.js.map +0 -1
  222. package/tools/domains/delete-domains.mjs +0 -48
  223. package/tools/domains/delete-domains.mjs.map +0 -1
  224. package/tools/domains/list-domains.d.mts +0 -45
  225. package/tools/domains/list-domains.d.mts.map +0 -1
  226. package/tools/domains/list-domains.d.ts +0 -45
  227. package/tools/domains/list-domains.d.ts.map +0 -1
  228. package/tools/domains/list-domains.js +0 -67
  229. package/tools/domains/list-domains.js.map +0 -1
  230. package/tools/domains/list-domains.mjs +0 -60
  231. package/tools/domains/list-domains.mjs.map +0 -1
  232. package/tools/domains/update-domains.d.mts +0 -45
  233. package/tools/domains/update-domains.d.mts.map +0 -1
  234. package/tools/domains/update-domains.d.ts +0 -45
  235. package/tools/domains/update-domains.d.ts.map +0 -1
  236. package/tools/domains/update-domains.js +0 -78
  237. package/tools/domains/update-domains.js.map +0 -1
  238. package/tools/domains/update-domains.mjs +0 -71
  239. package/tools/domains/update-domains.mjs.map +0 -1
  240. package/tools/events/list-events.d.mts +0 -45
  241. package/tools/events/list-events.d.mts.map +0 -1
  242. package/tools/events/list-events.d.ts +0 -45
  243. package/tools/events/list-events.d.ts.map +0 -1
  244. package/tools/events/list-events.js +0 -418
  245. package/tools/events/list-events.js.map +0 -1
  246. package/tools/events/list-events.mjs +0 -411
  247. package/tools/events/list-events.mjs.map +0 -1
  248. package/tools/index.d.mts +0 -10
  249. package/tools/index.d.mts.map +0 -1
  250. package/tools/index.d.ts +0 -10
  251. package/tools/index.d.ts.map +0 -1
  252. package/tools/index.js +0 -117
  253. package/tools/index.js.map +0 -1
  254. package/tools/index.mjs +0 -110
  255. package/tools/index.mjs.map +0 -1
  256. package/tools/links/bulk/create-links-bulk.d.mts +0 -45
  257. package/tools/links/bulk/create-links-bulk.d.mts.map +0 -1
  258. package/tools/links/bulk/create-links-bulk.d.ts +0 -45
  259. package/tools/links/bulk/create-links-bulk.d.ts.map +0 -1
  260. package/tools/links/bulk/create-links-bulk.js +0 -956
  261. package/tools/links/bulk/create-links-bulk.js.map +0 -1
  262. package/tools/links/bulk/create-links-bulk.mjs +0 -949
  263. package/tools/links/bulk/create-links-bulk.mjs.map +0 -1
  264. package/tools/links/bulk/delete-links-bulk.d.mts +0 -45
  265. package/tools/links/bulk/delete-links-bulk.d.mts.map +0 -1
  266. package/tools/links/bulk/delete-links-bulk.d.ts +0 -45
  267. package/tools/links/bulk/delete-links-bulk.d.ts.map +0 -1
  268. package/tools/links/bulk/delete-links-bulk.js +0 -58
  269. package/tools/links/bulk/delete-links-bulk.js.map +0 -1
  270. package/tools/links/bulk/delete-links-bulk.mjs +0 -51
  271. package/tools/links/bulk/delete-links-bulk.mjs.map +0 -1
  272. package/tools/links/count-links.d.mts +0 -45
  273. package/tools/links/count-links.d.mts.map +0 -1
  274. package/tools/links/count-links.d.ts +0 -45
  275. package/tools/links/count-links.d.ts.map +0 -1
  276. package/tools/links/count-links.js +0 -951
  277. package/tools/links/count-links.js.map +0 -1
  278. package/tools/links/count-links.mjs +0 -944
  279. package/tools/links/count-links.mjs.map +0 -1
  280. package/tools/links/create-links.d.mts +0 -45
  281. package/tools/links/create-links.d.mts.map +0 -1
  282. package/tools/links/create-links.d.ts +0 -45
  283. package/tools/links/create-links.d.ts.map +0 -1
  284. package/tools/links/create-links.js +0 -947
  285. package/tools/links/create-links.js.map +0 -1
  286. package/tools/links/create-links.mjs +0 -940
  287. package/tools/links/create-links.mjs.map +0 -1
  288. package/tools/links/delete-links.d.mts +0 -45
  289. package/tools/links/delete-links.d.mts.map +0 -1
  290. package/tools/links/delete-links.d.ts +0 -45
  291. package/tools/links/delete-links.d.ts.map +0 -1
  292. package/tools/links/delete-links.js +0 -55
  293. package/tools/links/delete-links.js.map +0 -1
  294. package/tools/links/delete-links.mjs +0 -48
  295. package/tools/links/delete-links.mjs.map +0 -1
  296. package/tools/links/list-links.d.mts +0 -45
  297. package/tools/links/list-links.d.mts.map +0 -1
  298. package/tools/links/list-links.d.ts +0 -45
  299. package/tools/links/list-links.d.ts.map +0 -1
  300. package/tools/links/list-links.js +0 -973
  301. package/tools/links/list-links.js.map +0 -1
  302. package/tools/links/list-links.mjs +0 -966
  303. package/tools/links/list-links.mjs.map +0 -1
  304. package/tools/links/retrieve-info-links.d.mts +0 -45
  305. package/tools/links/retrieve-info-links.d.mts.map +0 -1
  306. package/tools/links/retrieve-info-links.d.ts +0 -45
  307. package/tools/links/retrieve-info-links.d.ts.map +0 -1
  308. package/tools/links/retrieve-info-links.js +0 -71
  309. package/tools/links/retrieve-info-links.js.map +0 -1
  310. package/tools/links/retrieve-info-links.mjs +0 -64
  311. package/tools/links/retrieve-info-links.mjs.map +0 -1
  312. package/tools/links/update-links.d.mts +0 -45
  313. package/tools/links/update-links.d.mts.map +0 -1
  314. package/tools/links/update-links.d.ts +0 -45
  315. package/tools/links/update-links.d.ts.map +0 -1
  316. package/tools/links/update-links.js +0 -953
  317. package/tools/links/update-links.js.map +0 -1
  318. package/tools/links/update-links.mjs +0 -946
  319. package/tools/links/update-links.mjs.map +0 -1
  320. package/tools/links/upsert-links.d.mts +0 -45
  321. package/tools/links/upsert-links.d.mts.map +0 -1
  322. package/tools/links/upsert-links.d.ts +0 -45
  323. package/tools/links/upsert-links.d.ts.map +0 -1
  324. package/tools/links/upsert-links.js +0 -947
  325. package/tools/links/upsert-links.js.map +0 -1
  326. package/tools/links/upsert-links.mjs +0 -940
  327. package/tools/links/upsert-links.mjs.map +0 -1
  328. package/tools/projects/list-projects.d.mts +0 -45
  329. package/tools/projects/list-projects.d.mts.map +0 -1
  330. package/tools/projects/list-projects.d.ts +0 -45
  331. package/tools/projects/list-projects.d.ts.map +0 -1
  332. package/tools/projects/list-projects.js +0 -51
  333. package/tools/projects/list-projects.js.map +0 -1
  334. package/tools/projects/list-projects.mjs +0 -44
  335. package/tools/projects/list-projects.mjs.map +0 -1
  336. package/tools/projects/retrieve-projects.d.mts +0 -45
  337. package/tools/projects/retrieve-projects.d.mts.map +0 -1
  338. package/tools/projects/retrieve-projects.d.ts +0 -45
  339. package/tools/projects/retrieve-projects.d.ts.map +0 -1
  340. package/tools/projects/retrieve-projects.js +0 -55
  341. package/tools/projects/retrieve-projects.js.map +0 -1
  342. package/tools/projects/retrieve-projects.mjs +0 -48
  343. package/tools/projects/retrieve-projects.mjs.map +0 -1
  344. package/tools/qrcodes/bulk/create-qrcodes-bulk.d.mts +0 -45
  345. package/tools/qrcodes/bulk/create-qrcodes-bulk.d.mts.map +0 -1
  346. package/tools/qrcodes/bulk/create-qrcodes-bulk.d.ts +0 -45
  347. package/tools/qrcodes/bulk/create-qrcodes-bulk.d.ts.map +0 -1
  348. package/tools/qrcodes/bulk/create-qrcodes-bulk.js +0 -1068
  349. package/tools/qrcodes/bulk/create-qrcodes-bulk.js.map +0 -1
  350. package/tools/qrcodes/bulk/create-qrcodes-bulk.mjs +0 -1061
  351. package/tools/qrcodes/bulk/create-qrcodes-bulk.mjs.map +0 -1
  352. package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.mts +0 -45
  353. package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.mts.map +0 -1
  354. package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.ts +0 -45
  355. package/tools/qrcodes/bulk/delete-qrcodes-bulk.d.ts.map +0 -1
  356. package/tools/qrcodes/bulk/delete-qrcodes-bulk.js +0 -58
  357. package/tools/qrcodes/bulk/delete-qrcodes-bulk.js.map +0 -1
  358. package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs +0 -51
  359. package/tools/qrcodes/bulk/delete-qrcodes-bulk.mjs.map +0 -1
  360. package/tools/qrcodes/count-qrcodes.d.mts +0 -45
  361. package/tools/qrcodes/count-qrcodes.d.mts.map +0 -1
  362. package/tools/qrcodes/count-qrcodes.d.ts +0 -45
  363. package/tools/qrcodes/count-qrcodes.d.ts.map +0 -1
  364. package/tools/qrcodes/count-qrcodes.js +0 -215
  365. package/tools/qrcodes/count-qrcodes.js.map +0 -1
  366. package/tools/qrcodes/count-qrcodes.mjs +0 -208
  367. package/tools/qrcodes/count-qrcodes.mjs.map +0 -1
  368. package/tools/qrcodes/create-qrcodes.d.mts +0 -45
  369. package/tools/qrcodes/create-qrcodes.d.mts.map +0 -1
  370. package/tools/qrcodes/create-qrcodes.d.ts +0 -45
  371. package/tools/qrcodes/create-qrcodes.d.ts.map +0 -1
  372. package/tools/qrcodes/create-qrcodes.js +0 -1059
  373. package/tools/qrcodes/create-qrcodes.js.map +0 -1
  374. package/tools/qrcodes/create-qrcodes.mjs +0 -1052
  375. package/tools/qrcodes/create-qrcodes.mjs.map +0 -1
  376. package/tools/qrcodes/delete-qrcodes.d.mts +0 -45
  377. package/tools/qrcodes/delete-qrcodes.d.mts.map +0 -1
  378. package/tools/qrcodes/delete-qrcodes.d.ts +0 -45
  379. package/tools/qrcodes/delete-qrcodes.d.ts.map +0 -1
  380. package/tools/qrcodes/delete-qrcodes.js +0 -55
  381. package/tools/qrcodes/delete-qrcodes.js.map +0 -1
  382. package/tools/qrcodes/delete-qrcodes.mjs +0 -48
  383. package/tools/qrcodes/delete-qrcodes.mjs.map +0 -1
  384. package/tools/qrcodes/list-qrcodes.d.mts +0 -45
  385. package/tools/qrcodes/list-qrcodes.d.mts.map +0 -1
  386. package/tools/qrcodes/list-qrcodes.d.ts +0 -45
  387. package/tools/qrcodes/list-qrcodes.d.ts.map +0 -1
  388. package/tools/qrcodes/list-qrcodes.js +0 -217
  389. package/tools/qrcodes/list-qrcodes.js.map +0 -1
  390. package/tools/qrcodes/list-qrcodes.mjs +0 -210
  391. package/tools/qrcodes/list-qrcodes.mjs.map +0 -1
  392. package/tools/qrcodes/retrieve-qrcodes.d.mts +0 -45
  393. package/tools/qrcodes/retrieve-qrcodes.d.mts.map +0 -1
  394. package/tools/qrcodes/retrieve-qrcodes.d.ts +0 -45
  395. package/tools/qrcodes/retrieve-qrcodes.d.ts.map +0 -1
  396. package/tools/qrcodes/retrieve-qrcodes.js +0 -65
  397. package/tools/qrcodes/retrieve-qrcodes.js.map +0 -1
  398. package/tools/qrcodes/retrieve-qrcodes.mjs +0 -58
  399. package/tools/qrcodes/retrieve-qrcodes.mjs.map +0 -1
  400. package/tools/qrcodes/update-qrcodes.d.mts +0 -45
  401. package/tools/qrcodes/update-qrcodes.d.mts.map +0 -1
  402. package/tools/qrcodes/update-qrcodes.d.ts +0 -45
  403. package/tools/qrcodes/update-qrcodes.d.ts.map +0 -1
  404. package/tools/qrcodes/update-qrcodes.js +0 -1065
  405. package/tools/qrcodes/update-qrcodes.js.map +0 -1
  406. package/tools/qrcodes/update-qrcodes.mjs +0 -1058
  407. package/tools/qrcodes/update-qrcodes.mjs.map +0 -1
  408. package/tools/qrcodes/upsert-qrcodes.d.mts +0 -45
  409. package/tools/qrcodes/upsert-qrcodes.d.mts.map +0 -1
  410. package/tools/qrcodes/upsert-qrcodes.d.ts +0 -45
  411. package/tools/qrcodes/upsert-qrcodes.d.ts.map +0 -1
  412. package/tools/qrcodes/upsert-qrcodes.js +0 -1059
  413. package/tools/qrcodes/upsert-qrcodes.js.map +0 -1
  414. package/tools/qrcodes/upsert-qrcodes.mjs +0 -1052
  415. package/tools/qrcodes/upsert-qrcodes.mjs.map +0 -1
  416. package/tools/tags/create-tags.d.mts +0 -45
  417. package/tools/tags/create-tags.d.mts.map +0 -1
  418. package/tools/tags/create-tags.d.ts +0 -45
  419. package/tools/tags/create-tags.d.ts.map +0 -1
  420. package/tools/tags/create-tags.js +0 -58
  421. package/tools/tags/create-tags.js.map +0 -1
  422. package/tools/tags/create-tags.mjs +0 -51
  423. package/tools/tags/create-tags.mjs.map +0 -1
  424. package/tools/tags/delete-tags.d.mts +0 -45
  425. package/tools/tags/delete-tags.d.mts.map +0 -1
  426. package/tools/tags/delete-tags.d.ts +0 -45
  427. package/tools/tags/delete-tags.d.ts.map +0 -1
  428. package/tools/tags/delete-tags.js +0 -55
  429. package/tools/tags/delete-tags.js.map +0 -1
  430. package/tools/tags/delete-tags.mjs +0 -48
  431. package/tools/tags/delete-tags.mjs.map +0 -1
  432. package/tools/tags/list-tags.d.mts +0 -45
  433. package/tools/tags/list-tags.d.mts.map +0 -1
  434. package/tools/tags/list-tags.d.ts +0 -45
  435. package/tools/tags/list-tags.d.ts.map +0 -1
  436. package/tools/tags/list-tags.js +0 -87
  437. package/tools/tags/list-tags.js.map +0 -1
  438. package/tools/tags/list-tags.mjs +0 -80
  439. package/tools/tags/list-tags.mjs.map +0 -1
  440. package/tools/tags/update-tags.d.mts +0 -45
  441. package/tools/tags/update-tags.d.mts.map +0 -1
  442. package/tools/tags/update-tags.d.ts +0 -45
  443. package/tools/tags/update-tags.d.ts.map +0 -1
  444. package/tools/tags/update-tags.js +0 -63
  445. package/tools/tags/update-tags.js.map +0 -1
  446. package/tools/tags/update-tags.mjs +0 -56
  447. package/tools/tags/update-tags.mjs.map +0 -1
  448. package/tools/track/track-lead-track.d.mts +0 -45
  449. package/tools/track/track-lead-track.d.mts.map +0 -1
  450. package/tools/track/track-lead-track.d.ts +0 -45
  451. package/tools/track/track-lead-track.d.ts.map +0 -1
  452. package/tools/track/track-lead-track.js +0 -87
  453. package/tools/track/track-lead-track.js.map +0 -1
  454. package/tools/track/track-lead-track.mjs +0 -80
  455. package/tools/track/track-lead-track.mjs.map +0 -1
  456. package/tools/track/track-sale-track.d.mts +0 -45
  457. package/tools/track/track-sale-track.d.mts.map +0 -1
  458. package/tools/track/track-sale-track.d.ts +0 -45
  459. package/tools/track/track-sale-track.d.ts.map +0 -1
  460. package/tools/track/track-sale-track.js +0 -99
  461. package/tools/track/track-sale-track.js.map +0 -1
  462. package/tools/track/track-sale-track.mjs +0 -92
  463. package/tools/track/track-sale-track.mjs.map +0 -1
  464. package/tools/types.d.mts.map +0 -1
  465. package/tools/types.d.ts.map +0 -1
  466. package/tools/types.js.map +0 -1
  467. package/tools/types.mjs.map +0 -1
  468. package/tools.d.mts +0 -2
  469. package/tools.d.mts.map +0 -1
  470. package/tools.d.ts +0 -2
  471. package/tools.d.ts.map +0 -1
  472. package/tools.js +0 -18
  473. package/tools.js.map +0 -1
  474. package/tools.mjs +0 -2
  475. package/tools.mjs.map +0 -1
  476. /package/{tools/types.js → types.js} +0 -0
  477. /package/{tools/types.mjs → types.mjs} +0 -0
package/code-tool.mjs CHANGED
@@ -1,6 +1,28 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { dirname } from 'node:path';
3
- import { pathToFileURL } from 'node:url';
2
+ import { asErrorResult, asTextContentResult, } from "./types.mjs";
3
+ import { readEnv, requireValue } from "./util.mjs";
4
+ import { getLogger } from "./logger.mjs";
5
+ const prompt = `Runs JavaScript code to interact with the Codeqr API.
6
+
7
+ You are a skilled TypeScript programmer writing code to interface with the service.
8
+ Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.
9
+ For example:
10
+
11
+ \`\`\`
12
+ async function run(client) {
13
+ const link = await client.links.create({ url: 'REPLACE_ME' });
14
+
15
+ console.log(link.id);
16
+ }
17
+ \`\`\`
18
+
19
+ You will be returned anything that your function returns, plus the results of any console.log statements.
20
+ Do not add try-catch blocks for single API calls. The tool will handle errors for you.
21
+ Do not add comments unless necessary for generating better code.
22
+ Code will run in a container, and cannot interact with the network outside of the given SDK client.
23
+ Variables will not persist between calls, so make sure to return or log any data you might need later.
24
+ Remember that you are writing TypeScript code, so you need to be careful with your types.
25
+ Always type dynamic key-value stores explicitly as Record<string, YourValueType> instead of {}.`;
4
26
  /**
5
27
  * A tool that runs code against a copy of the SDK.
6
28
  *
@@ -8,128 +30,272 @@ import { pathToFileURL } from 'node:url';
8
30
  * we expose a single tool that can be used to search for endpoints by name, resource, operation, or tag, and then
9
31
  * a generic endpoint that can be used to invoke any endpoint with the provided arguments.
10
32
  *
11
- * @param endpoints - The endpoints to include in the list.
33
+ * @param blockedMethods - The methods to block for code execution. Blocking is done by simple string
34
+ * matching, so it is not secure against obfuscation. For stronger security, block in the downstream API
35
+ * with limited API keys.
36
+ * @param codeExecutionMode - Whether to execute code in a local Deno environment or in a remote
37
+ * sandbox environment hosted by Stainless.
12
38
  */
13
- export async function codeTool() {
39
+ export function codeTool({ blockedMethods, codeExecutionMode, }) {
14
40
  const metadata = { resource: 'all', operation: 'write', tags: [] };
15
41
  const tool = {
16
42
  name: 'execute',
17
- description: 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client named "client", and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
18
- inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
43
+ description: prompt,
44
+ inputSchema: {
45
+ type: 'object',
46
+ properties: {
47
+ code: {
48
+ type: 'string',
49
+ description: 'Code to execute.',
50
+ },
51
+ intent: {
52
+ type: 'string',
53
+ description: 'Task you are trying to perform. Used for improving the service.',
54
+ },
55
+ },
56
+ required: ['code'],
57
+ },
58
+ };
59
+ const logger = getLogger();
60
+ const handler = async ({ reqContext, args, }) => {
61
+ const code = args.code;
62
+ // Do very basic blocking of code that includes forbidden method names.
63
+ //
64
+ // WARNING: This is not secure against obfuscation and other evasion methods. If
65
+ // stronger security blocks are required, then these should be enforced in the downstream
66
+ // API (e.g., by having users call the MCP server with API keys with limited permissions).
67
+ if (blockedMethods) {
68
+ const blockedMatches = blockedMethods.filter((method) => code.includes(method.fullyQualifiedName));
69
+ if (blockedMatches.length > 0) {
70
+ return asErrorResult(`The following methods have been blocked by the MCP server and cannot be used in code execution: ${blockedMatches
71
+ .map((m) => m.fullyQualifiedName)
72
+ .join(', ')}`);
73
+ }
74
+ }
75
+ let result;
76
+ const startTime = Date.now();
77
+ if (codeExecutionMode === 'local') {
78
+ logger.debug('Executing code in local Deno environment');
79
+ result = await localDenoHandler({ reqContext, args });
80
+ }
81
+ else {
82
+ logger.debug('Executing code in remote Stainless environment');
83
+ result = await remoteStainlessHandler({ reqContext, args });
84
+ }
85
+ logger.info({
86
+ codeExecutionMode,
87
+ durationMs: Date.now() - startTime,
88
+ isError: result.isError,
89
+ contentRows: result.content?.length ?? 0,
90
+ }, 'Got code tool execution result');
91
+ return result;
92
+ };
93
+ return { metadata, tool, handler };
94
+ }
95
+ const remoteStainlessHandler = async ({ reqContext, args, }) => {
96
+ const code = args.code;
97
+ const intent = args.intent;
98
+ const client = reqContext.client;
99
+ const codeModeEndpoint = readEnv('CODE_MODE_ENDPOINT_URL') ?? 'https://api.stainless.com/api/ai/code-tool';
100
+ const localClientEnvs = {
101
+ CODEQR_API_KEY: requireValue(readEnv('CODEQR_API_KEY') ?? client.apiKey, 'set CODEQR_API_KEY environment variable or provide apiKey client option'),
102
+ CODEQR_BASE_URL: readEnv('CODEQR_BASE_URL') ?? client.baseURL ?? undefined,
103
+ };
104
+ // Merge any upstream client envs from the request header, with upstream values taking precedence.
105
+ const mergedClientEnvs = { ...localClientEnvs, ...reqContext.upstreamClientEnvs };
106
+ // Setting a Stainless API key authenticates requests to the code tool endpoint.
107
+ const res = await fetch(codeModeEndpoint, {
108
+ method: 'POST',
109
+ headers: {
110
+ ...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
111
+ 'Content-Type': 'application/json',
112
+ 'x-stainless-mcp-client-envs': JSON.stringify(mergedClientEnvs),
113
+ },
114
+ body: JSON.stringify({
115
+ project_name: 'codeqr',
116
+ code,
117
+ intent,
118
+ client_opts: {},
119
+ }),
120
+ });
121
+ if (!res.ok) {
122
+ if (res.status === 404 && !reqContext.stainlessApiKey) {
123
+ throw new Error('Could not access code tool for this project. You may need to provide a Stainless API key via the STAINLESS_API_KEY environment variable, the --stainless-api-key flag, or the x-stainless-api-key HTTP header.');
124
+ }
125
+ throw new Error(`${res.status}: ${res.statusText} error when trying to contact Code Tool server. Details: ${await res.text()}`);
126
+ }
127
+ const { is_error, result, log_lines, err_lines } = (await res.json());
128
+ const hasLogs = log_lines.length > 0 || err_lines.length > 0;
129
+ const output = {
130
+ result,
131
+ ...(log_lines.length > 0 && { log_lines }),
132
+ ...(err_lines.length > 0 && { err_lines }),
19
133
  };
20
- // Import dynamically to avoid failing at import time in cases where the environment is not well-supported.
134
+ if (is_error) {
135
+ return asErrorResult(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2));
136
+ }
137
+ return asTextContentResult(output);
138
+ };
139
+ const localDenoHandler = async ({ reqContext, args, }) => {
140
+ const fs = await import('node:fs');
141
+ const path = await import('node:path');
142
+ const url = await import('node:url');
21
143
  const { newDenoHTTPWorker } = await import('@valtown/deno-http-worker');
22
- const { workerPath } = await import('./code-tool-paths.cjs');
23
- const handler = async (client, args) => {
24
- const baseURLHostname = new URL(client.baseURL).hostname;
25
- const { code } = args;
26
- const worker = await newDenoHTTPWorker(pathToFileURL(workerPath), {
27
- runFlags: [
28
- `--node-modules-dir=manual`,
29
- `--allow-read=code-tool-worker.mjs,${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`,
30
- `--allow-net=${baseURLHostname}`,
31
- // Allow environment variables because instantiating the client will try to read from them,
32
- // even though they are not set.
33
- '--allow-env',
34
- ],
35
- printOutput: true,
36
- spawnOptions: {
37
- cwd: dirname(workerPath),
38
- },
39
- });
144
+ const { getWorkerPath } = await import('./code-tool-paths.cjs');
145
+ const workerPath = getWorkerPath();
146
+ const client = reqContext.client;
147
+ const baseURLHostname = new URL(client.baseURL).hostname;
148
+ const { code } = args;
149
+ let denoPath;
150
+ const packageRoot = path.resolve(path.dirname(workerPath), '..');
151
+ const packageNodeModulesPath = path.resolve(packageRoot, 'node_modules');
152
+ // Check if deno is in PATH
153
+ const { execSync } = await import('node:child_process');
154
+ try {
155
+ execSync('command -v deno', { stdio: 'ignore' });
156
+ denoPath = 'deno';
157
+ }
158
+ catch {
40
159
  try {
41
- const resp = await new Promise((resolve, reject) => {
42
- worker.addEventListener('exit', (exitCode) => {
43
- reject(new Error(`Worker exited with code ${exitCode}`));
44
- });
45
- const opts = {
46
- baseURL: client.baseURL,
47
- apiKey: client.apiKey,
48
- defaultHeaders: {
49
- 'X-Stainless-MCP': 'true',
50
- },
51
- };
52
- const req = worker.request('http://localhost', {
53
- headers: {
54
- 'content-type': 'application/json',
55
- },
56
- method: 'POST',
57
- }, (resp) => {
58
- const body = [];
59
- resp.on('error', (err) => {
60
- reject(err);
61
- });
62
- resp.on('data', (chunk) => {
63
- body.push(chunk);
64
- });
65
- resp.on('end', () => {
66
- resolve(new Response(Buffer.concat(body).toString(), {
67
- status: resp.statusCode ?? 200,
68
- headers: resp.headers,
69
- }));
70
- });
160
+ // Use deno binary in node_modules if it's found
161
+ const denoNodeModulesPath = path.resolve(packageNodeModulesPath, 'deno', 'bin.cjs');
162
+ await fs.promises.access(denoNodeModulesPath, fs.constants.X_OK);
163
+ denoPath = denoNodeModulesPath;
164
+ }
165
+ catch {
166
+ return asErrorResult('Deno is required for code execution but was not found. ' +
167
+ 'Install it from https://deno.land or run: npm install deno');
168
+ }
169
+ }
170
+ const allowReadPaths = [
171
+ 'code-tool-worker.mjs',
172
+ `${workerPath.replace(/([\/\\]node_modules)[\/\\].+$/, '$1')}/`,
173
+ packageRoot,
174
+ ];
175
+ // Follow symlinks in node_modules to allow read access to workspace-linked packages
176
+ try {
177
+ const sdkPkgName = '@codeqr/ts';
178
+ const sdkDir = path.resolve(packageNodeModulesPath, sdkPkgName);
179
+ const realSdkDir = fs.realpathSync(sdkDir);
180
+ if (realSdkDir !== sdkDir) {
181
+ allowReadPaths.push(realSdkDir);
182
+ }
183
+ }
184
+ catch {
185
+ // Ignore if symlink resolution fails
186
+ }
187
+ const allowRead = allowReadPaths.join(',');
188
+ const worker = await newDenoHTTPWorker(url.pathToFileURL(workerPath), {
189
+ denoExecutable: denoPath,
190
+ runFlags: [
191
+ `--node-modules-dir=manual`,
192
+ `--allow-read=${allowRead}`,
193
+ `--allow-net=${baseURLHostname}`,
194
+ // Allow environment variables because instantiating the client will try to read from them,
195
+ // even though they are not set.
196
+ '--allow-env',
197
+ ],
198
+ printOutput: true,
199
+ spawnOptions: {
200
+ cwd: path.dirname(workerPath),
201
+ // Merge any upstream client envs into the Deno subprocess environment,
202
+ // with the upstream env vars taking precedence.
203
+ env: { ...process.env, ...reqContext.upstreamClientEnvs },
204
+ },
205
+ });
206
+ try {
207
+ const resp = await new Promise((resolve, reject) => {
208
+ worker.addEventListener('exit', (exitCode) => {
209
+ reject(new Error(`Worker exited with code ${exitCode}`));
210
+ });
211
+ // Strip null/undefined values so that the worker SDK client can fall back to
212
+ // reading from environment variables (including any upstreamClientEnvs).
213
+ const opts = Object.fromEntries(Object.entries({
214
+ baseURL: client.baseURL,
215
+ apiKey: client.apiKey,
216
+ defaultHeaders: {
217
+ 'X-Stainless-MCP': 'true',
218
+ },
219
+ }).filter(([_, v]) => v != null));
220
+ const req = worker.request('http://localhost', {
221
+ headers: {
222
+ 'content-type': 'application/json',
223
+ },
224
+ method: 'POST',
225
+ }, (resp) => {
226
+ const body = [];
227
+ resp.on('error', (err) => {
228
+ reject(err);
71
229
  });
72
- const body = JSON.stringify({
73
- opts,
74
- code,
230
+ resp.on('data', (chunk) => {
231
+ body.push(chunk);
75
232
  });
76
- req.write(body, (err) => {
77
- if (err != null) {
78
- reject(err);
79
- }
233
+ resp.on('end', () => {
234
+ resolve(new Response(Buffer.concat(body).toString(), {
235
+ status: resp.statusCode ?? 200,
236
+ headers: resp.headers,
237
+ }));
80
238
  });
81
- req.end();
82
239
  });
83
- if (resp.status === 200) {
84
- const { result, logLines, errLines } = (await resp.json());
85
- const returnOutput = result == null ? null : ({
240
+ const body = JSON.stringify({
241
+ opts,
242
+ code,
243
+ });
244
+ req.write(body, (err) => {
245
+ if (err != null) {
246
+ reject(err);
247
+ }
248
+ });
249
+ req.end();
250
+ });
251
+ if (resp.status === 200) {
252
+ const { result, log_lines, err_lines } = (await resp.json());
253
+ const returnOutput = result == null ? null : ({
254
+ type: 'text',
255
+ text: typeof result === 'string' ? result : JSON.stringify(result),
256
+ });
257
+ const logOutput = log_lines.length === 0 ?
258
+ null
259
+ : {
86
260
  type: 'text',
87
- text: typeof result === 'string' ? result : JSON.stringify(result),
88
- });
89
- const logOutput = logLines.length === 0 ?
90
- null
91
- : {
92
- type: 'text',
93
- text: logLines.join('\n'),
94
- };
95
- const errOutput = errLines.length === 0 ?
96
- null
97
- : {
98
- type: 'text',
99
- text: 'Error output:\n' + errLines.join('\n'),
100
- };
101
- return {
102
- content: [returnOutput, logOutput, errOutput].filter((block) => block !== null),
261
+ text: log_lines.join('\n'),
103
262
  };
104
- }
105
- else {
106
- const { message, logLines, errLines } = (await resp.json());
107
- const messageOutput = message == null ? null : ({
263
+ const errOutput = err_lines.length === 0 ?
264
+ null
265
+ : {
108
266
  type: 'text',
109
- text: message,
110
- });
111
- const logOutput = logLines.length === 0 ?
112
- null
113
- : {
114
- type: 'text',
115
- text: logLines.join('\n'),
116
- };
117
- const errOutput = errLines.length === 0 ?
118
- null
119
- : {
120
- type: 'text',
121
- text: 'Error output:\n' + errLines.join('\n'),
122
- };
123
- return {
124
- content: [messageOutput, logOutput, errOutput].filter((block) => block !== null),
125
- isError: true,
267
+ text: 'Error output:\n' + err_lines.join('\n'),
126
268
  };
127
- }
269
+ return {
270
+ content: [returnOutput, logOutput, errOutput].filter((block) => block !== null),
271
+ };
128
272
  }
129
- finally {
130
- worker.terminate();
273
+ else {
274
+ const { result, log_lines, err_lines } = (await resp.json());
275
+ const messageOutput = result == null ? null : ({
276
+ type: 'text',
277
+ text: typeof result === 'string' ? result : JSON.stringify(result),
278
+ });
279
+ const logOutput = log_lines.length === 0 ?
280
+ null
281
+ : {
282
+ type: 'text',
283
+ text: log_lines.join('\n'),
284
+ };
285
+ const errOutput = err_lines.length === 0 ?
286
+ null
287
+ : {
288
+ type: 'text',
289
+ text: 'Error output:\n' + err_lines.join('\n'),
290
+ };
291
+ return {
292
+ content: [messageOutput, logOutput, errOutput].filter((block) => block !== null),
293
+ isError: true,
294
+ };
131
295
  }
132
- };
133
- return { metadata, tool, handler };
134
- }
296
+ }
297
+ finally {
298
+ worker.terminate();
299
+ }
300
+ };
135
301
  //# sourceMappingURL=code-tool.mjs.map
package/code-tool.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.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M,CAAC;aACnE,CACF,CAAC;YACJ,MAAM,SAAS,GACb,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBACtB,IAAI;gBACN,CAAC,CAAC;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC3B,CAAC;YACN,MAAM,SAAS,GACb,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBACtB,IAAI;gBACN,CAAC,CAAC;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,iBAAiB,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC/C,CAAC;YACN,OAAO;gBACL,OAAO,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;gBAChF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;AACH,CAAC,CAAC"}
@@ -1,44 +1,57 @@
1
- import { Metadata } from "./tools/types.mjs";
2
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import { Metadata, McpRequestContext } from "./types.mjs";
3
3
  export declare const metadata: Metadata;
4
4
  export declare const tool: Tool;
5
- export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
5
+ export declare const handler: ({ reqContext, args, }: {
6
+ reqContext: McpRequestContext;
7
+ args: Record<string, unknown> | undefined;
8
+ }) => Promise<import("./types").ToolCallResult>;
6
9
  declare const _default: {
7
10
  metadata: Metadata;
8
11
  tool: {
9
- [x: string]: unknown;
10
- name: string;
11
12
  inputSchema: {
12
13
  [x: string]: unknown;
13
14
  type: "object";
14
15
  properties?: {
15
- [x: string]: unknown;
16
+ [x: string]: object;
16
17
  } | undefined;
17
18
  required?: string[] | undefined;
18
19
  };
19
- title?: string | undefined;
20
+ name: string;
20
21
  description?: string | undefined;
21
22
  outputSchema?: {
22
23
  [x: string]: unknown;
23
24
  type: "object";
24
25
  properties?: {
25
- [x: string]: unknown;
26
+ [x: string]: object;
26
27
  } | undefined;
27
28
  required?: string[] | undefined;
28
29
  } | undefined;
29
30
  annotations?: {
30
- [x: string]: unknown;
31
31
  title?: string | undefined;
32
32
  readOnlyHint?: boolean | undefined;
33
33
  destructiveHint?: boolean | undefined;
34
34
  idempotentHint?: boolean | undefined;
35
35
  openWorldHint?: boolean | undefined;
36
36
  } | undefined;
37
+ execution?: {
38
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
39
+ } | undefined;
37
40
  _meta?: {
38
41
  [x: string]: unknown;
39
42
  } | undefined;
43
+ icons?: {
44
+ src: string;
45
+ mimeType?: string | undefined;
46
+ sizes?: string[] | undefined;
47
+ theme?: "light" | "dark" | undefined;
48
+ }[] | undefined;
49
+ title?: string | undefined;
40
50
  };
41
- handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
51
+ handler: ({ reqContext, args, }: {
52
+ reqContext: McpRequestContext;
53
+ args: Record<string, unknown> | undefined;
54
+ }) => Promise<import("./types").ToolCallResult>;
42
55
  };
43
56
  export default _default;
44
57
  //# sourceMappingURL=docs-search-tool.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CA8CA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjDC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAgDD,wBAA2C"}
@@ -1,44 +1,57 @@
1
- import { Metadata } from "./tools/types.js";
2
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import { Metadata, McpRequestContext } from "./types.js";
3
3
  export declare const metadata: Metadata;
4
4
  export declare const tool: Tool;
5
- export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
5
+ export declare const handler: ({ reqContext, args, }: {
6
+ reqContext: McpRequestContext;
7
+ args: Record<string, unknown> | undefined;
8
+ }) => Promise<import("./types").ToolCallResult>;
6
9
  declare const _default: {
7
10
  metadata: Metadata;
8
11
  tool: {
9
- [x: string]: unknown;
10
- name: string;
11
12
  inputSchema: {
12
13
  [x: string]: unknown;
13
14
  type: "object";
14
15
  properties?: {
15
- [x: string]: unknown;
16
+ [x: string]: object;
16
17
  } | undefined;
17
18
  required?: string[] | undefined;
18
19
  };
19
- title?: string | undefined;
20
+ name: string;
20
21
  description?: string | undefined;
21
22
  outputSchema?: {
22
23
  [x: string]: unknown;
23
24
  type: "object";
24
25
  properties?: {
25
- [x: string]: unknown;
26
+ [x: string]: object;
26
27
  } | undefined;
27
28
  required?: string[] | undefined;
28
29
  } | undefined;
29
30
  annotations?: {
30
- [x: string]: unknown;
31
31
  title?: string | undefined;
32
32
  readOnlyHint?: boolean | undefined;
33
33
  destructiveHint?: boolean | undefined;
34
34
  idempotentHint?: boolean | undefined;
35
35
  openWorldHint?: boolean | undefined;
36
36
  } | undefined;
37
+ execution?: {
38
+ taskSupport?: "optional" | "required" | "forbidden" | undefined;
39
+ } | undefined;
37
40
  _meta?: {
38
41
  [x: string]: unknown;
39
42
  } | undefined;
43
+ icons?: {
44
+ src: string;
45
+ mimeType?: string | undefined;
46
+ sizes?: string[] | undefined;
47
+ theme?: "light" | "dark" | undefined;
48
+ }[] | undefined;
49
+ title?: string | undefined;
40
50
  };
41
- handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./tools/types").ToolCallResult>;
51
+ handler: ({ reqContext, args, }: {
52
+ reqContext: McpRequestContext;
53
+ args: Record<string, unknown> | undefined;
54
+ }) => Promise<import("./types").ToolCallResult>;
42
55
  };
43
56
  export default _default;
44
57
  //# sourceMappingURL=docs-search-tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,oDAKlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAL+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOnF,wBAA2C"}
1
+ {"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;AAG3D,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA2BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CA8CA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAjDC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAgDD,wBAA2C"}