@rnsk/toolkits 0.0.8 → 0.0.10

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 (329) hide show
  1. package/README.md +15 -1
  2. package/dist/index.d.ts +15 -1
  3. package/dist/index.js +29 -1
  4. package/dist/toolkits/bitbucket/icon.d.ts +5 -0
  5. package/dist/toolkits/bitbucket/icon.js +6 -0
  6. package/dist/toolkits/bitbucket/manifest.d.ts +3 -0
  7. package/dist/toolkits/bitbucket/manifest.js +56 -0
  8. package/dist/toolkits/bitbucket/tools/client.d.ts +38 -0
  9. package/dist/toolkits/bitbucket/tools/client.js +87 -0
  10. package/dist/toolkits/bitbucket/tools/commits.d.ts +149 -0
  11. package/dist/toolkits/bitbucket/tools/commits.js +444 -0
  12. package/dist/toolkits/bitbucket/tools/index.d.ts +1093 -0
  13. package/dist/toolkits/bitbucket/tools/index.js +770 -0
  14. package/dist/toolkits/bitbucket/tools/issues.d.ts +73 -0
  15. package/dist/toolkits/bitbucket/tools/issues.js +234 -0
  16. package/dist/toolkits/bitbucket/tools/pipelines.d.ts +124 -0
  17. package/dist/toolkits/bitbucket/tools/pipelines.js +446 -0
  18. package/dist/toolkits/bitbucket/tools/pull-requests.d.ts +174 -0
  19. package/dist/toolkits/bitbucket/tools/pull-requests.js +541 -0
  20. package/dist/toolkits/bitbucket/tools/reports.d.ts +84 -0
  21. package/dist/toolkits/bitbucket/tools/reports.js +213 -0
  22. package/dist/toolkits/bitbucket/tools/repositories.d.ts +156 -0
  23. package/dist/toolkits/bitbucket/tools/repositories.js +531 -0
  24. package/dist/toolkits/bitbucket/tools/search.d.ts +17 -0
  25. package/dist/toolkits/bitbucket/tools/search.js +67 -0
  26. package/dist/toolkits/bitbucket/tools/snippets.d.ts +34 -0
  27. package/dist/toolkits/bitbucket/tools/snippets.js +122 -0
  28. package/dist/toolkits/bitbucket/tools/users-workspaces.d.ts +65 -0
  29. package/dist/toolkits/bitbucket/tools/users-workspaces.js +294 -0
  30. package/dist/toolkits/discord/icon.d.ts +5 -0
  31. package/dist/toolkits/discord/icon.js +12 -0
  32. package/dist/toolkits/discord/manifest.d.ts +3 -0
  33. package/dist/toolkits/discord/manifest.js +52 -0
  34. package/dist/toolkits/discord/tools/applications.d.ts +79 -0
  35. package/dist/toolkits/discord/tools/applications.js +216 -0
  36. package/dist/toolkits/discord/tools/client.d.ts +22 -0
  37. package/dist/toolkits/discord/tools/client.js +69 -0
  38. package/dist/toolkits/discord/tools/guilds.d.ts +39 -0
  39. package/dist/toolkits/discord/tools/guilds.js +123 -0
  40. package/dist/toolkits/discord/tools/index.d.ts +222 -0
  41. package/dist/toolkits/discord/tools/index.js +170 -0
  42. package/dist/toolkits/discord/tools/misc.d.ts +7 -0
  43. package/dist/toolkits/discord/tools/misc.js +40 -0
  44. package/dist/toolkits/discord/tools/users.d.ts +28 -0
  45. package/dist/toolkits/discord/tools/users.js +128 -0
  46. package/dist/toolkits/figma/tools/index.d.ts +1 -1
  47. package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
  48. package/dist/toolkits/gitlab/icon.d.ts +5 -0
  49. package/dist/toolkits/gitlab/icon.js +6 -0
  50. package/dist/toolkits/gitlab/manifest.d.ts +3 -0
  51. package/dist/toolkits/gitlab/manifest.js +36 -0
  52. package/dist/toolkits/gitlab/tools/client.d.ts +7 -0
  53. package/dist/toolkits/gitlab/tools/client.js +45 -0
  54. package/dist/toolkits/gitlab/tools/index.d.ts +306 -0
  55. package/dist/toolkits/gitlab/tools/index.js +36 -0
  56. package/dist/toolkits/gitlab/tools/issues.d.ts +45 -0
  57. package/dist/toolkits/gitlab/tools/issues.js +103 -0
  58. package/dist/toolkits/gitlab/tools/merge-requests.d.ts +35 -0
  59. package/dist/toolkits/gitlab/tools/merge-requests.js +91 -0
  60. package/dist/toolkits/gitlab/tools/pipelines.d.ts +30 -0
  61. package/dist/toolkits/gitlab/tools/pipelines.js +66 -0
  62. package/dist/toolkits/gitlab/tools/projects.d.ts +36 -0
  63. package/dist/toolkits/gitlab/tools/projects.js +94 -0
  64. package/dist/toolkits/gitlab/tools/repository.d.ts +21 -0
  65. package/dist/toolkits/gitlab/tools/repository.js +53 -0
  66. package/dist/toolkits/gitlab/tools/users-groups.d.ts +11 -0
  67. package/dist/toolkits/gitlab/tools/users-groups.js +30 -0
  68. package/dist/toolkits/google-ads/tools/get-rmf-report.d.ts +2 -2
  69. package/dist/toolkits/google-ads/tools/index.d.ts +2 -2
  70. package/dist/toolkits/google-analytics/icon.d.ts +5 -0
  71. package/dist/toolkits/google-analytics/icon.js +11 -0
  72. package/dist/toolkits/google-analytics/manifest.d.ts +3 -0
  73. package/dist/toolkits/google-analytics/manifest.js +48 -0
  74. package/dist/toolkits/google-analytics/tools/admin.d.ts +73 -0
  75. package/dist/toolkits/google-analytics/tools/admin.js +238 -0
  76. package/dist/toolkits/google-analytics/tools/audiences.d.ts +81 -0
  77. package/dist/toolkits/google-analytics/tools/audiences.js +190 -0
  78. package/dist/toolkits/google-analytics/tools/client.d.ts +47 -0
  79. package/dist/toolkits/google-analytics/tools/client.js +74 -0
  80. package/dist/toolkits/google-analytics/tools/custom-definitions.d.ts +62 -0
  81. package/dist/toolkits/google-analytics/tools/custom-definitions.js +106 -0
  82. package/dist/toolkits/google-analytics/tools/index.d.ts +16 -0
  83. package/dist/toolkits/google-analytics/tools/index.js +88 -0
  84. package/dist/toolkits/google-analytics/tools/links.d.ts +22 -0
  85. package/dist/toolkits/google-analytics/tools/links.js +56 -0
  86. package/dist/toolkits/google-analytics/tools/measurement.d.ts +3 -0
  87. package/dist/toolkits/google-analytics/tools/measurement.js +55 -0
  88. package/dist/toolkits/google-analytics/tools/reports.d.ts +136 -0
  89. package/dist/toolkits/google-analytics/tools/reports.js +200 -0
  90. package/dist/toolkits/google-contacts/icon.d.ts +5 -0
  91. package/dist/toolkits/google-contacts/icon.js +6 -0
  92. package/dist/toolkits/google-contacts/manifest.d.ts +3 -0
  93. package/dist/toolkits/google-contacts/manifest.js +48 -0
  94. package/dist/toolkits/google-contacts/tools/client.d.ts +19 -0
  95. package/dist/toolkits/google-contacts/tools/client.js +44 -0
  96. package/dist/toolkits/google-contacts/tools/contacts.d.ts +94 -0
  97. package/dist/toolkits/google-contacts/tools/contacts.js +273 -0
  98. package/dist/toolkits/google-contacts/tools/directory.d.ts +36 -0
  99. package/dist/toolkits/google-contacts/tools/directory.js +99 -0
  100. package/dist/toolkits/google-contacts/tools/groups.d.ts +68 -0
  101. package/dist/toolkits/google-contacts/tools/groups.js +169 -0
  102. package/dist/toolkits/google-contacts/tools/index.d.ts +347 -0
  103. package/dist/toolkits/google-contacts/tools/index.js +34 -0
  104. package/dist/toolkits/google-contacts/tools/photos.d.ts +26 -0
  105. package/dist/toolkits/google-contacts/tools/photos.js +52 -0
  106. package/dist/toolkits/google-maps/icon.d.ts +5 -0
  107. package/dist/toolkits/google-maps/icon.js +39 -0
  108. package/dist/toolkits/google-maps/manifest.d.ts +3 -0
  109. package/dist/toolkits/google-maps/manifest.js +55 -0
  110. package/dist/toolkits/google-maps/tools/client.d.ts +27 -0
  111. package/dist/toolkits/google-maps/tools/client.js +72 -0
  112. package/dist/toolkits/google-maps/tools/geocode.d.ts +49 -0
  113. package/dist/toolkits/google-maps/tools/geocode.js +168 -0
  114. package/dist/toolkits/google-maps/tools/index.d.ts +432 -0
  115. package/dist/toolkits/google-maps/tools/index.js +31 -0
  116. package/dist/toolkits/google-maps/tools/misc.d.ts +70 -0
  117. package/dist/toolkits/google-maps/tools/misc.js +158 -0
  118. package/dist/toolkits/google-maps/tools/places.d.ts +112 -0
  119. package/dist/toolkits/google-maps/tools/places.js +185 -0
  120. package/dist/toolkits/google-maps/tools/routes.d.ts +48 -0
  121. package/dist/toolkits/google-maps/tools/routes.js +97 -0
  122. package/dist/toolkits/google-maps/tools/tiles.d.ts +51 -0
  123. package/dist/toolkits/google-maps/tools/tiles.js +84 -0
  124. package/dist/toolkits/google-photos/icon.d.ts +5 -0
  125. package/dist/toolkits/google-photos/icon.js +6 -0
  126. package/dist/toolkits/google-photos/manifest.d.ts +3 -0
  127. package/dist/toolkits/google-photos/manifest.js +47 -0
  128. package/dist/toolkits/google-photos/tools/albums.d.ts +83 -0
  129. package/dist/toolkits/google-photos/tools/albums.js +180 -0
  130. package/dist/toolkits/google-photos/tools/client.d.ts +24 -0
  131. package/dist/toolkits/google-photos/tools/client.js +77 -0
  132. package/dist/toolkits/google-photos/tools/index.d.ts +261 -0
  133. package/dist/toolkits/google-photos/tools/index.js +22 -0
  134. package/dist/toolkits/google-photos/tools/media.d.ts +52 -0
  135. package/dist/toolkits/google-photos/tools/media.js +142 -0
  136. package/dist/toolkits/google-photos/tools/uploads.d.ts +58 -0
  137. package/dist/toolkits/google-photos/tools/uploads.js +107 -0
  138. package/dist/toolkits/google-tasks/tools/index.d.ts +1 -1
  139. package/dist/toolkits/google-tasks/tools/update-task-full.d.ts +1 -1
  140. package/dist/toolkits/groww/tools/index.d.ts +1 -1
  141. package/dist/toolkits/groww/tools/instruments.d.ts +1 -1
  142. package/dist/toolkits/hacker-news/icon.d.ts +5 -0
  143. package/dist/toolkits/hacker-news/icon.js +9 -0
  144. package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
  145. package/dist/toolkits/hacker-news/manifest.js +25 -0
  146. package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
  147. package/dist/toolkits/hacker-news/tools/client.js +51 -0
  148. package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
  149. package/dist/toolkits/hacker-news/tools/index.js +22 -0
  150. package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
  151. package/dist/toolkits/hacker-news/tools/items.js +126 -0
  152. package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
  153. package/dist/toolkits/hacker-news/tools/search.js +40 -0
  154. package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
  155. package/dist/toolkits/hacker-news/tools/stories.js +98 -0
  156. package/dist/toolkits/hostinger/icon.d.ts +5 -0
  157. package/dist/toolkits/hostinger/icon.js +6 -0
  158. package/dist/toolkits/hostinger/manifest.d.ts +3 -0
  159. package/dist/toolkits/hostinger/manifest.js +36 -0
  160. package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
  161. package/dist/toolkits/hostinger/tools/billing.js +35 -0
  162. package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
  163. package/dist/toolkits/hostinger/tools/client.js +57 -0
  164. package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
  165. package/dist/toolkits/hostinger/tools/dns.js +47 -0
  166. package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
  167. package/dist/toolkits/hostinger/tools/domains.js +62 -0
  168. package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
  169. package/dist/toolkits/hostinger/tools/hosting.js +38 -0
  170. package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
  171. package/dist/toolkits/hostinger/tools/index.js +35 -0
  172. package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
  173. package/dist/toolkits/hostinger/tools/vps.js +77 -0
  174. package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
  175. package/dist/toolkits/hostinger/tools/whois.js +85 -0
  176. package/dist/toolkits/hugging-face/icon.d.ts +5 -0
  177. package/dist/toolkits/hugging-face/icon.js +6 -0
  178. package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
  179. package/dist/toolkits/hugging-face/manifest.js +42 -0
  180. package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
  181. package/dist/toolkits/hugging-face/tools/client.js +192 -0
  182. package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
  183. package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
  184. package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
  185. package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
  186. package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
  187. package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
  188. package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
  189. package/dist/toolkits/hugging-face/tools/index.js +163 -0
  190. package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
  191. package/dist/toolkits/hugging-face/tools/inference.js +86 -0
  192. package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
  193. package/dist/toolkits/hugging-face/tools/models.js +273 -0
  194. package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
  195. package/dist/toolkits/hugging-face/tools/papers.js +91 -0
  196. package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
  197. package/dist/toolkits/hugging-face/tools/repos.js +201 -0
  198. package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
  199. package/dist/toolkits/hugging-face/tools/settings.js +88 -0
  200. package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
  201. package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
  202. package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
  203. package/dist/toolkits/hugging-face/tools/sql.js +47 -0
  204. package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
  205. package/dist/toolkits/hugging-face/tools/users.js +132 -0
  206. package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
  207. package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
  208. package/dist/toolkits/jira/icon.d.ts +5 -0
  209. package/dist/toolkits/jira/icon.js +6 -0
  210. package/dist/toolkits/jira/manifest.d.ts +3 -0
  211. package/dist/toolkits/jira/manifest.js +53 -0
  212. package/dist/toolkits/jira/tools/boards.d.ts +52 -0
  213. package/dist/toolkits/jira/tools/boards.js +104 -0
  214. package/dist/toolkits/jira/tools/client.d.ts +23 -0
  215. package/dist/toolkits/jira/tools/client.js +270 -0
  216. package/dist/toolkits/jira/tools/index.d.ts +1280 -0
  217. package/dist/toolkits/jira/tools/index.js +119 -0
  218. package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
  219. package/dist/toolkits/jira/tools/issue-fields.js +111 -0
  220. package/dist/toolkits/jira/tools/issues.d.ts +304 -0
  221. package/dist/toolkits/jira/tools/issues.js +593 -0
  222. package/dist/toolkits/jira/tools/meta.d.ts +212 -0
  223. package/dist/toolkits/jira/tools/meta.js +369 -0
  224. package/dist/toolkits/jira/tools/projects.d.ts +130 -0
  225. package/dist/toolkits/jira/tools/projects.js +263 -0
  226. package/dist/toolkits/jira/tools/search.d.ts +90 -0
  227. package/dist/toolkits/jira/tools/search.js +181 -0
  228. package/dist/toolkits/jira/tools/users.d.ts +114 -0
  229. package/dist/toolkits/jira/tools/users.js +221 -0
  230. package/dist/toolkits/neo4j/icon.d.ts +5 -0
  231. package/dist/toolkits/neo4j/icon.js +6 -0
  232. package/dist/toolkits/neo4j/manifest.d.ts +3 -0
  233. package/dist/toolkits/neo4j/manifest.js +33 -0
  234. package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
  235. package/dist/toolkits/neo4j/tools/analytics.js +91 -0
  236. package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
  237. package/dist/toolkits/neo4j/tools/client.js +105 -0
  238. package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
  239. package/dist/toolkits/neo4j/tools/index.js +30 -0
  240. package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
  241. package/dist/toolkits/neo4j/tools/instances.js +127 -0
  242. package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
  243. package/dist/toolkits/neo4j/tools/projects.js +110 -0
  244. package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
  245. package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
  246. package/dist/toolkits/neon/icon.d.ts +5 -0
  247. package/dist/toolkits/neon/icon.js +8 -0
  248. package/dist/toolkits/neon/manifest.d.ts +3 -0
  249. package/dist/toolkits/neon/manifest.js +36 -0
  250. package/dist/toolkits/neon/tools/auth.d.ts +115 -0
  251. package/dist/toolkits/neon/tools/auth.js +286 -0
  252. package/dist/toolkits/neon/tools/branches.d.ts +189 -0
  253. package/dist/toolkits/neon/tools/branches.js +465 -0
  254. package/dist/toolkits/neon/tools/client.d.ts +10 -0
  255. package/dist/toolkits/neon/tools/client.js +69 -0
  256. package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
  257. package/dist/toolkits/neon/tools/dataapi.js +111 -0
  258. package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
  259. package/dist/toolkits/neon/tools/endpoints.js +163 -0
  260. package/dist/toolkits/neon/tools/index.d.ts +976 -0
  261. package/dist/toolkits/neon/tools/index.js +130 -0
  262. package/dist/toolkits/neon/tools/meta.d.ts +4 -0
  263. package/dist/toolkits/neon/tools/meta.js +16 -0
  264. package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
  265. package/dist/toolkits/neon/tools/orgs.js +303 -0
  266. package/dist/toolkits/neon/tools/projects.d.ts +177 -0
  267. package/dist/toolkits/neon/tools/projects.js +468 -0
  268. package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
  269. package/dist/toolkits/neon/tools/snapshots.js +67 -0
  270. package/dist/toolkits/reddit/tools/index.d.ts +1 -1
  271. package/dist/toolkits/reddit/tools/search-across-subreddits.d.ts +1 -1
  272. package/dist/toolkits/slack/icon.d.ts +5 -0
  273. package/dist/toolkits/slack/icon.js +20 -0
  274. package/dist/toolkits/slack/manifest.d.ts +3 -0
  275. package/dist/toolkits/slack/manifest.js +93 -0
  276. package/dist/toolkits/slack/tools/admin-apps.d.ts +32 -0
  277. package/dist/toolkits/slack/tools/admin-apps.js +116 -0
  278. package/dist/toolkits/slack/tools/admin-conversations.d.ts +62 -0
  279. package/dist/toolkits/slack/tools/admin-conversations.js +246 -0
  280. package/dist/toolkits/slack/tools/admin-invites.d.ts +19 -0
  281. package/dist/toolkits/slack/tools/admin-invites.js +75 -0
  282. package/dist/toolkits/slack/tools/admin-users.d.ts +52 -0
  283. package/dist/toolkits/slack/tools/admin-users.js +182 -0
  284. package/dist/toolkits/slack/tools/audit.d.ts +20 -0
  285. package/dist/toolkits/slack/tools/audit.js +81 -0
  286. package/dist/toolkits/slack/tools/calls.d.ts +38 -0
  287. package/dist/toolkits/slack/tools/calls.js +141 -0
  288. package/dist/toolkits/slack/tools/canvas.d.ts +24 -0
  289. package/dist/toolkits/slack/tools/canvas.js +102 -0
  290. package/dist/toolkits/slack/tools/client.d.ts +22 -0
  291. package/dist/toolkits/slack/tools/client.js +73 -0
  292. package/dist/toolkits/slack/tools/conversations.d.ts +131 -0
  293. package/dist/toolkits/slack/tools/conversations.js +463 -0
  294. package/dist/toolkits/slack/tools/emoji.d.ts +29 -0
  295. package/dist/toolkits/slack/tools/emoji.js +118 -0
  296. package/dist/toolkits/slack/tools/files.d.ts +113 -0
  297. package/dist/toolkits/slack/tools/files.js +368 -0
  298. package/dist/toolkits/slack/tools/index.d.ts +28 -0
  299. package/dist/toolkits/slack/tools/index.js +187 -0
  300. package/dist/toolkits/slack/tools/messages.d.ts +106 -0
  301. package/dist/toolkits/slack/tools/messages.js +340 -0
  302. package/dist/toolkits/slack/tools/misc.d.ts +42 -0
  303. package/dist/toolkits/slack/tools/misc.js +127 -0
  304. package/dist/toolkits/slack/tools/reactions-stars-pins.d.ts +69 -0
  305. package/dist/toolkits/slack/tools/reactions-stars-pins.js +236 -0
  306. package/dist/toolkits/slack/tools/reminders.d.ts +22 -0
  307. package/dist/toolkits/slack/tools/reminders.js +83 -0
  308. package/dist/toolkits/slack/tools/search.d.ts +49 -0
  309. package/dist/toolkits/slack/tools/search.js +155 -0
  310. package/dist/toolkits/slack/tools/slack-lists.d.ts +65 -0
  311. package/dist/toolkits/slack/tools/slack-lists.js +282 -0
  312. package/dist/toolkits/slack/tools/teams.d.ts +75 -0
  313. package/dist/toolkits/slack/tools/teams.js +285 -0
  314. package/dist/toolkits/slack/tools/usergroups.d.ts +56 -0
  315. package/dist/toolkits/slack/tools/usergroups.js +194 -0
  316. package/dist/toolkits/slack/tools/users.d.ts +87 -0
  317. package/dist/toolkits/slack/tools/users.js +396 -0
  318. package/dist/toolkits/youtube/tools/add-video-to-playlist.d.ts +1 -1
  319. package/dist/toolkits/youtube/tools/delete-video.d.ts +1 -1
  320. package/dist/toolkits/youtube/tools/index.d.ts +10 -10
  321. package/dist/toolkits/youtube/tools/list-caption-track.d.ts +1 -1
  322. package/dist/toolkits/youtube/tools/list-playlist-items.d.ts +1 -1
  323. package/dist/toolkits/youtube/tools/list-video-categories.d.ts +1 -1
  324. package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
  325. package/dist/toolkits/youtube/tools/report-video-abuse.d.ts +1 -1
  326. package/dist/toolkits/youtube/tools/search-youtube.d.ts +1 -1
  327. package/dist/toolkits/youtube/tools/update-thumbnail.d.ts +1 -1
  328. package/dist/toolkits/youtube/tools/update-video.d.ts +1 -1
  329. package/package.json +1 -1
@@ -0,0 +1,593 @@
1
+ // @ts-nocheck
2
+ import { tool } from 'ai';
3
+ import { z } from 'zod';
4
+ import { jira, mdToAdf, resolveAssignee, getTransitionId } from './client.js';
5
+ import { createOneIssue, buildEditBody } from './issue-fields.js';
6
+ import { uploadAttachment } from './client.js';
7
+ const tokenField = z.string().optional().describe('Injected by system; do not provide');
8
+ export const jiraAddAttachment = tool({
9
+ description: "This action allows users to upload a file and attach it to a specific Jira issue. It supports various file formats and ensures that the attachment is associated with the correct issue key.",
10
+ inputSchema: z.object({
11
+ jiraToken: tokenField,
12
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
13
+ issueKey: z.string().describe("Issue key or ID to attach the file to, e.g. 'PROJ-123'."),
14
+ fileName: z.string().describe('Filename for the attachment, e.g. "screenshot.png".'),
15
+ fileContent: z.string().describe('Base64-encoded file content to upload.'),
16
+ mimeType: z.string().optional().describe('MIME type of the file, e.g. "image/png".'),
17
+ }),
18
+ execute: async ({ jiraToken, jiraCloudId, issueKey }) => {
19
+ return uploadAttachment(jiraToken, jiraCloudId, issueKey, { fileName, fileContent, mimeType });
20
+ },
21
+ });
22
+ export const jiraAddComment = tool({
23
+ description: "This action adds a rich comment to a specific Jira issue, allowing Markdown formatting. Users can specify visibility restrictions for the comment if needed.",
24
+ inputSchema: z.object({
25
+ jiraToken: tokenField,
26
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
27
+ comment: z.string().describe("The comment text. Supports Markdown formatting including **bold**, *italic*, 'code', links [text](url), lists, and @mentions. To mention users, use @username for single-word names or @\"Display Name\" for names with spaces. Plain URLs are not hyperlinked; use '[text](url)' format for clickable links."),
28
+ issueIdOrKey: z.string().describe("The ID or key of the issue to add the comment to."),
29
+ visibilityType: z.string().optional().describe("Specifies the type of visibility restriction for the comment. Valid values are 'group' or 'role'. If this field is used, 'visibility_value' must also be provided. IMPORTANT: 'group' visibility requires group-level visibility to be enabled in the Jira instance settings by an administrator. For 'role' visibility, use JIRA_GET_PROJECT_ROLES action to discover valid role names for the project."),
30
+ visibilityValue: z.string().optional().describe("Name of the group or role that can view the comment (required if visibility_type is set). IMPORTANT: These values are instance-specific and vary by Jira configuration. For role visibility: Use JIRA_GET_PROJECT_ROLES with your project key to discover valid role names (e.g., 'Administrator', 'Member', 'Viewer'). For group visibility: Use JIRA_GET_ALL_GROUPS to list available groups. Common roles include 'Administrator', 'Member', 'Viewer' but actual names depend on your project configuration."),
31
+ additionalProperties: z.record(z.any()).optional().describe("Additional properties to include in the comment request body. This can be used to pass extra fields supported by the Jira API that are not explicitly defined, such as 'properties' for EntityProperty objects. Format: {'properties': [{'key': 'myKey', 'value': {'myValue': 123}}]}."),
32
+ }),
33
+ execute: async ({ jiraToken, jiraCloudId, comment, issueIdOrKey, visibilityType, visibilityValue, additionalProperties }) => {
34
+ const body = { body: mdToAdf(comment) };
35
+ if (visibilityType && visibilityValue)
36
+ body.visibility = { type: visibilityType, value: visibilityValue };
37
+ if (additionalProperties && typeof additionalProperties === "object")
38
+ Object.assign(body, additionalProperties);
39
+ return jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}/comment`, method: 'POST', body });
40
+ },
41
+ });
42
+ export const jiraAddWatcherToIssue = tool({
43
+ description: "This action adds a specified user as a watcher to a Jira issue. A watcher receives notifications about updates to the issue.",
44
+ inputSchema: z.object({
45
+ jiraToken: tokenField,
46
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
47
+ accountId: z.string().describe("The Atlassian Account ID (accountId) of the user to be added as a watcher. Important: Usernames cannot be used due to Jira API privacy changes; the accountId is required. Resolve the accountId first using JIRA_GET_CURRENT_USER (for the calling user) or JIRA_FIND_USERS (for other users) before calling this tool."),
48
+ issueIdOrKey: z.string().describe("The ID (a numerical identifier, e.g., '10000') or key (a project-prefixed string, e.g., 'PROJ-123') of the Jira issue to which the watcher will be added."),
49
+ }),
50
+ execute: async ({ jiraToken, jiraCloudId, accountId, issueIdOrKey }) => {
51
+ return jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}/watchers`, method: 'POST', body: JSON.stringify(accountId) });
52
+ },
53
+ });
54
+ export const jiraAddWorklog = tool({
55
+ description: "Add a worklog entry to a Jira issue to track time spent. You can specify the time worked, when it started, an optional comment, and visibility restrictions.",
56
+ inputSchema: z.object({
57
+ jiraToken: tokenField,
58
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
59
+ expand: z.string().optional().describe("Use expand to include additional information about the worklog in the response. Accepts 'properties'."),
60
+ comment: z.record(z.any()).optional().describe("Atlassian Document Format comment structure."),
61
+ started: z.string().optional().describe("The datetime when the work was started in ISO 8601 format (e.g., '2024-01-15T09:00:00.000+0000'). If not provided, the current time is used."),
62
+ reduceBy: z.string().optional().describe("Amount to reduce the remaining estimate if adjust_estimate is 'manual' (e.g., '1h 30m', '2d')."),
63
+ timeSpent: z.string().optional().describe("The time spent as a Jira duration string (e.g., '2h 30m', '1d', '45m'). Either this or time_spent_seconds must be provided."),
64
+ visibility: z.record(z.any()).optional().describe("Details about the visibility restriction of a worklog."),
65
+ newEstimate: z.string().optional().describe("The new remaining estimate if adjust_estimate is 'new' (e.g., '2h', '3d 4h')."),
66
+ notifyUsers: z.boolean().optional().describe("Whether to notify users watching the issue about this worklog."),
67
+ adjustEstimate: z.enum(["new", "leave", "manual", "auto"]).optional().describe("Options for adjusting the issue's remaining estimate when adding a worklog."),
68
+ issueIdOrKey: z.string().describe("The ID or key of the Jira issue to add the worklog to."),
69
+ timeSpentSeconds: z.number().int().optional().describe("The time in seconds spent working on the issue. Either this or time_spent must be provided."),
70
+ overrideEditableFlag: z.boolean().optional().describe("Whether to add the worklog even if the issue is not editable (e.g., closed). Requires admin permissions."),
71
+ }),
72
+ execute: async ({ jiraToken, jiraCloudId, expand, comment, started, reduceBy, timeSpent, visibility, newEstimate, notifyUsers, adjustEstimate, issueIdOrKey, timeSpentSeconds, overrideEditableFlag }) => {
73
+ const queryParams = { adjustEstimate: adjustEstimate, expand: expand, notifyUsers: notifyUsers, newEstimate: newEstimate, reduceBy: reduceBy, increaseBy: increaseBy, overrideEditableFlag: overrideEditableFlag };
74
+ const body = { timeSpent: timeSpent, timeSpentSeconds: timeSpentSeconds, started: started, comment: comment, visibility: visibility };
75
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/worklog`, method: 'POST', query: queryParams, body });
76
+ },
77
+ });
78
+ export const jiraAssignIssue = tool({
79
+ description: "This action assigns a specified Jira issue to the designated user or the project's default assignee. It also allows for unassigning the issue by not providing an account ID and supports lookup by username or email.",
80
+ inputSchema: z.object({
81
+ jiraToken: tokenField,
82
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
83
+ accountId: z.string().optional().describe("The Atlassian Account ID of the user to assign the issue to. Use ''-1'' (as a string) to assign to the project's default assignee. Provide 'None' (Python null, which translates to JSON null) or omit this field to unassign the issue. Takes precedence over assignee_name if provided. JIRA_FIND_USERS may return multiple matches or omit emails due to privacy restrictions; verify the correct account_id before assigning."),
84
+ assigneeName: z.string().optional().describe("Name of the user to assign the issue to. Can be either an email address (e.g., 'john@company.com') or display name (e.g., 'John Doe'). The system will auto-detect the type and search accordingly. Ignored if account_id is also provided. On Jira Cloud, privacy settings may cause lookup failures; prefer resolving 'account_id' via JIRA_FIND_USERS first and passing it directly."),
85
+ issueIdOrKey: z.string().describe("The ID or key of the issue to be assigned."),
86
+ }),
87
+ execute: async ({ jiraToken, jiraCloudId, accountId, assigneeName, issueIdOrKey }) => {
88
+ const acc = await resolveAssignee(jiraToken, jiraCloudId, accountId, assigneeName);
89
+ return jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}/assignee`, method: 'PUT', body: { accountId: acc ?? null } });
90
+ },
91
+ });
92
+ export const jiraBulkCreateIssue = tool({
93
+ description: "This action creates multiple Jira issues in a single API call. It allows for bulk creation of issues with various attributes, such as assignee and priority, streamlining the issue management process.",
94
+ inputSchema: z.object({
95
+ jiraToken: tokenField,
96
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
97
+ issues: z.array(z.object({ projectKey: z.string(), summary: z.string() }).catchall(z.any())).min(1).max(50).describe('Issues to create (1-50). Each needs projectKey and summary; other create-issue fields allowed.'),
98
+ }),
99
+ execute: async ({ jiraToken, jiraCloudId }) => {
100
+ const created = [];
101
+ const errors = [];
102
+ for (let idx = 0; idx < issues.length; idx++) {
103
+ try {
104
+ const res = await createOneIssue(jiraToken, jiraCloudId, issues[idx]);
105
+ if (res?.error)
106
+ errors.push({ issueIndex: idx, errorMessages: [JSON.stringify(res.error)] });
107
+ else
108
+ created.push({ id: res.id, key: res.key, self: res.self });
109
+ }
110
+ catch (e) {
111
+ errors.push({ issueIndex: idx, errorMessages: [e instanceof Error ? e.message : "Unknown error"] });
112
+ }
113
+ }
114
+ return { issues: created, errors, totalRequested: issues.length, totalCreated: created.length, totalFailed: errors.length };
115
+ },
116
+ });
117
+ export const jiraCreateIssue = tool({
118
+ description: "Creates a new issue in a specified Jira project. This includes setting parameters such as the issue type, summary, and assignee details. Note: Some projects may have custom required fields - use JIRA_GET_CREATE_METADATA_ISSUE_TYPE_FIELDS (requires projectIdOrKey and issueTypeId) to discover them if needed.",
119
+ inputSchema: z.object({
120
+ jiraToken: tokenField,
121
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
122
+ labels: z.array(z.string()).optional().describe("List of labels to categorize the issue; new labels are created if they don't exist."),
123
+ parent: z.string().optional().describe("Parent issue key (e.g., 'PROJ-123') or issue ID. IMPORTANT: This field should ONLY be used when creating sub-task issue types (e.g., 'Sub-task', 'Subtask'). It is required for sub-tasks. Jira enforces strict hierarchy rules: standard issue types (Task, Story, Bug) can ONLY have Sub-tasks as children, not other standard issues. Epics can have Stories/Tasks/Bugs as children. Attempting to set a parent on a non-sub-task issue type or using an incompatible parent-child combination will result in a hierarchy error. The parent must be an existing issue in the same project. NOTE: Alternative field names 'parent_key' and 'parent_id' are also accepted and will be automatically mapped to this field."),
124
+ summary: z.string().describe("REQUIRED. Brief, descriptive title for the issue. This is the main headline that will appear in Jira (e.g., 'Fix login button not working', 'Add user profile page')."),
125
+ assignee: z.string().optional().describe("Account ID of the user to assign the issue to. Must be a valid Jira account ID in one of these formats: (1) Cloud format with tenant ID and UUID: '712020:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', or (2) Legacy 24-character hex string: '5b10a2844c20165700ede21g'. IMPORTANT: Do NOT pass email addresses here - use assignee_name field for emails. The account ID is validated to ensure the user exists and can be assigned to issues in the target project. Use JIRA_FIND_USERS to get valid account IDs. Takes precedence over assignee_name if both are provided. NOTE: Some Jira projects (especially Jira Service Management/Service Desk projects) may not allow setting the assignee at issue creation time because the field isn't on the project's create screen. If this occurs, the issue will be created successfully without the assignee, and you'll need to set the assignee separately using JIRA_ASSIGN_ISSUE after creation."),
126
+ dueDate: z.string().optional().describe("Expected resolution date in YYYY-MM-DD format."),
127
+ priority: z.string().optional().describe("Priority level for the issue. Can be either a priority name or a valid priority ID from the Jira instance. IMPORTANT: Priority names are completely instance-specific and vary by Jira configuration (e.g., some instances use 'Highest'/'High'/'Medium'/'Low'/'Lowest', while others use 'P0'/'P1'/'P2'/'P3'/'P4', or custom names). It is strongly recommended to either: (1) check available priorities for your instance first using JIRA_GET_ISSUE_EDIT_META or by inspecting existing issues, or (2) omit this field if unsure. When the global priority endpoint is available, the value is validated against available priorities. If validation is unavailable (404), the value is passed through to Jira for validation."),
128
+ reporter: z.string().optional().describe("Account ID of the user reporting the issue. Defaults to the API request user if unspecified."),
129
+ versions: z.array(z.string()).optional().describe("List of IDs for versions affected by this issue; versions must exist in the project."),
130
+ sprintId: z.number().int().optional().describe("ID of the sprint to assign this issue to. The issue will be added to the specified sprint if provided."),
131
+ components: z.array(z.string()).optional().describe("List of component IDs (e.g., '10000'); components must already exist in the project."),
132
+ issueType: z.string().describe("REQUIRED. Type of the issue - must be valid for the target project as available types vary by project configuration. CRITICAL: Always use JIRA_GET_ISSUE_TYPES to check valid types for your project BEFORE creating issues. Can be either a type name (e.g., 'Task', 'Story', 'Epic') or type ID (e.g., '10001'). Common types include Task, Story, Epic, and Bug, but NOT ALL projects support all types. Issue type names are localized based on your Jira instance's language settings (e.g., 'Task' in English, 'Задача' in Russian, 'Tâche' in French). Using the issue type ID is language-independent and more reliable."),
133
+ description: z.record(z.any()).optional().describe("Detailed description of the issue. Accepts either: (1) A plain text or Markdown string (converted to ADF internally), or (2) A pre-formatted Atlassian Document Format (ADF) dict with keys 'type'='doc', 'version'=1, and 'content' array. When passing ADF directly, formatting is preserved as-is."),
134
+ environment: z.record(z.any()).optional().describe("Environment details. Accepts either: (1) A plain text or Markdown string (converted to ADF internally), or (2) A pre-formatted Atlassian Document Format (ADF) dict with keys 'type'='doc', 'version'=1, and 'content' array. When passing ADF directly, formatting is preserved as-is."),
135
+ projectKey: z.string().describe("REQUIRED. Key of the Jira project where the issue will be created (e.g., 'KAN', 'DEV', 'PROJ'). This is the short uppercase code that appears in issue keys like 'PROJ-123'. Must be an existing project key in your Jira instance. Use JIRA_GET_ALL_PROJECTS to list available projects if you don't know the key."),
136
+ fixVersions: z.array(z.string()).optional().describe("List of IDs for versions where the issue is/will be fixed; versions must exist in the project."),
137
+ assigneeName: z.string().optional().describe("Name or email of the user to assign the issue to. Can be either an email address (e.g., 'john@company.com') or display name (e.g., 'John Doe'). The system will auto-detect the type and search accordingly. Ignored if assignee (account ID) is also provided. NOTE: Slack user IDs (e.g., 'U02QWF25EQ6') are not supported - use the Jira user's email, display name, or account ID instead. NOTE: Some Jira projects (especially Jira Service Management/Service Desk projects) may not allow setting the assignee at issue creation time because the field isn't on the project's create screen. If this occurs, the issue will be created successfully without the assignee, and you'll need to set the assignee separately using JIRA_ASSIGN_ISSUE after creation."),
138
+ additionalProperties: z.string().optional().describe("JSON string of additional fields to set on the issue. Use this for custom fields or any fields not covered by the standard parameters (e.g., Story Points, custom text fields, etc.). Format: '{\"customfield_10104\": 5, \"customfield_10200\": \"value\"}'. Rich text custom fields (textarea type) accept plain text or Markdown - they are automatically converted to Atlassian Document Format (ADF). You can also pass ADF directly as a JSON object. Use JIRA_GET_CREATE_METADATA_ISSUE_TYPE_FIELDS (requires projectIdOrKey and issueTypeId parameters) to discover available custom fields and their IDs - this is the recommended tool for creation-specific metadata. NOTE: The 'resolution' field cannot be set at issue creation - it can only be set during workflow transitions (e.g., when moving an issue to Done/Closed status). If 'resolution' is included, it will be automatically filtered out. IMPORTANT: Keys must use numeric IDs (e.g., 'customfield_10104'), NOT display names — using display names causes 400 Unknown field errors."),
139
+ }),
140
+ execute: async ({ jiraToken, jiraCloudId, labels, parent, summary, assignee, dueDate, priority, reporter, versions, sprintId, components, issueType, description, environment, projectKey, fixVersions, assigneeName, additionalProperties }) => {
141
+ return createOneIssue(jiraToken, jiraCloudId, { projectKey, summary, issueType, description, environment, assignee, assigneeName, priority, reporter, labels, components, versions, fixVersions, dueDate, parent, parentKey, parentId, sprintId, additionalProperties });
142
+ },
143
+ });
144
+ export const jiraCreateIssueLink = tool({
145
+ description: "This action links two Jira issues based on the specified relationship type. It allows users to track dependencies and relationships between issues within their projects.",
146
+ inputSchema: z.object({
147
+ jiraToken: tokenField,
148
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
149
+ comment: z.string().optional().describe("An optional textual comment to add to the created issue link, providing additional context."),
150
+ linkType: z.string().optional().describe("The name of the issue link type to create (e.g., 'Blocks', 'Relates', 'Duplicate', 'Cloners'). Provide either link_type or link_type_id. Use the JIRA_GET_ISSUE_LINK_TYPES action to retrieve valid link type names for your Jira instance."),
151
+ linkTypeId: z.string().optional().describe("The ID of the issue link type to create (preferred over link_type when known, as it is unambiguous). Provide either link_type or link_type_id. Use JIRA_GET_ISSUE_LINK_TYPES to retrieve valid link type IDs."),
152
+ inwardIssueKey: z.string().describe("The key of the issue that initiates the link relationship (the 'source' issue). For example, if creating a 'Blocks' link from Issue A to Issue B, Issue A is the inward issue."),
153
+ outwardIssueKey: z.string().describe("The key of the issue that is the target of the link relationship (the 'destination' issue). For example, if creating a 'Blocks' link from Issue A to Issue B, Issue B is the outward issue."),
154
+ }),
155
+ execute: async ({ jiraToken, jiraCloudId, comment, linkType, linkTypeId, inwardIssueKey, outwardIssueKey }) => {
156
+ const type = linkTypeId ? { id: linkTypeId } : linkType ? { name: linkType } : null;
157
+ if (!type)
158
+ return { error: "Provide linkType or linkTypeId." };
159
+ const body = { type, inwardIssue: { key: inwardIssueKey }, outwardIssue: { key: outwardIssueKey } };
160
+ if (comment)
161
+ body.comment = { body: comment };
162
+ const res = await jira(jiraToken, { cloudId: jiraCloudId, path: '/issueLink', method: 'POST', body });
163
+ if (res?.error)
164
+ return res;
165
+ return { success: true, inwardIssueKey, outwardIssueKey, linkType, linkTypeId };
166
+ },
167
+ });
168
+ export const jiraDeleteAttachment = tool({
169
+ description: "This action permanently deletes a specified attachment from Jira. It requires the attachment ID to perform the delete operation.",
170
+ inputSchema: z.object({
171
+ jiraToken: tokenField,
172
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
173
+ attachmentId: z.string().describe("The unique identifier of the attachment to delete."),
174
+ }),
175
+ execute: async ({ jiraToken, jiraCloudId, attachmentId }) => {
176
+ const queryParams = undefined;
177
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/attachment/${encodeURIComponent(attachmentId)}`, method: 'DELETE', query: queryParams });
178
+ },
179
+ });
180
+ export const jiraDeleteComment = tool({
181
+ description: "This action deletes a specified comment from a Jira issue. It requires the issue ID or key along with the comment ID to perform the delete operation.",
182
+ inputSchema: z.object({
183
+ jiraToken: tokenField,
184
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
185
+ id: z.string().describe("The unique identifier of the comment to be deleted (e.g., '10001')."),
186
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue from which the comment will be deleted."),
187
+ }),
188
+ execute: async ({ jiraToken, jiraCloudId, id, issueIdOrKey }) => {
189
+ const queryParams = undefined;
190
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/comment/${encodeURIComponent(id)}`, method: 'DELETE', query: queryParams });
191
+ },
192
+ });
193
+ export const jiraDeleteIssue = tool({
194
+ description: "This action deletes a specified Jira issue. It can also delete any associated subtasks if requested.",
195
+ inputSchema: z.object({
196
+ jiraToken: tokenField,
197
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
198
+ deleteSubtasks: z.boolean().optional().describe("If true, the issue's subtasks are also deleted. If false and the issue has subtasks, the deletion will fail."),
199
+ issueIdOrKey: z.string().describe("The ID or key of the issue to delete."),
200
+ }),
201
+ execute: async ({ jiraToken, jiraCloudId, deleteSubtasks, issueIdOrKey }) => {
202
+ const queryParams = { deleteSubtasks: deleteSubtasks };
203
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}`, method: 'DELETE', query: queryParams });
204
+ },
205
+ });
206
+ export const jiraDeleteWorklog = tool({
207
+ description: "This action deletes a specific worklog entry from a Jira issue. It provides options to notify users and adjust the issue's remaining estimate as needed.",
208
+ inputSchema: z.object({
209
+ jiraToken: tokenField,
210
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
211
+ worklogId: z.string().describe("The ID of the specific worklog entry to be deleted from the issue."),
212
+ increaseBy: z.string().optional().describe("Amount to increase the remaining estimate if 'adjust_estimate' is 'manual' (e.g., '1h 30m', '5d')."),
213
+ newEstimate: z.string().optional().describe("Value for the new remaining estimate if 'adjust_estimate' is 'new' (e.g., '2h', '3d 4h')."),
214
+ notifyUsers: z.boolean().optional().describe("If users watching the issue should be notified by email about the worklog deletion."),
215
+ adjustEstimate: z.enum(["new", "leave", "manual", "auto"]).optional().describe("Options for adjusting the issue's remaining estimate after deleting a worklog."),
216
+ issueIdOrKey: z.string().describe("The ID or key of the Jira issue from which the worklog will be deleted."),
217
+ overrideEditableFlag: z.boolean().optional().describe("If true, allows deletion of the worklog even if the issue is in a closed status, potentially bypassing workflow restrictions."),
218
+ }),
219
+ execute: async ({ jiraToken, jiraCloudId, worklogId, increaseBy, newEstimate, notifyUsers, adjustEstimate, issueIdOrKey, overrideEditableFlag }) => {
220
+ const queryParams = { notifyUsers: notifyUsers, adjustEstimate: adjustEstimate, newEstimate: newEstimate, increaseBy: increaseBy, overrideEditableFlag: overrideEditableFlag };
221
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/worklog/${encodeURIComponent(worklogId)}`, method: 'DELETE', query: queryParams });
222
+ },
223
+ });
224
+ export const jiraEditIssue = tool({
225
+ description: "Updates a specified Jira issue by changing its fields or adding new information. This action allows users to modify attributes such as the summary, description, and assignee of the issue.",
226
+ inputSchema: z.object({
227
+ jiraToken: tokenField,
228
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
229
+ fields: z.string().optional().describe("JSON string of fields for direct updates (e.g., summary, description). When including assignee in this object, you may provide either: (a) an accountId object '{\"assignee\": {\"accountId\": \"<id>\"}}', (b) a string email/display name '{\"assignee\": \"user@example.com\"}' or '{\"assignee\": \"Full Name\"}', or (c) null to unassign. String values are resolved to accountId automatically. See Jira's 'edit issue metadata' for available fields. Use 'update' for more complex operations like list modifications. IMPORTANT: The 'status' field cannot be updated via this action - use JIRA_TRANSITION_ISSUE action instead to change issue status. Rich text fields (description, environment, and custom textarea fields) support plain text or Markdown - they are automatically converted to Atlassian Document Format (ADF). You can also pass ADF directly as a JSON object."),
230
+ labels: z.array(z.string()).optional().describe("List of labels to set for the issue (replaces existing labels). New labels are created if they don't exist."),
231
+ update: z.string().optional().describe("JSON string for granular field operations (e.g., adding/removing labels, modifying list items). See Jira documentation for operation structure."),
232
+ summary: z.string().optional().describe("Brief, descriptive title for the issue."),
233
+ assignee: z.string().optional().describe("User to assign the issue to. Can be either an account ID (e.g., '5b10a2844c20165700ede21g') or name/email (e.g., 'john@company.com', 'John Doe'). When user email visibility is restricted, account ID is required. The system will auto-detect the type and search accordingly. Provide null or an empty string to unassign. Prefer using account ID when available to avoid visibility restrictions."),
234
+ dueDate: z.string().optional().describe("Expected resolution date in YYYY-MM-DD format. Use null to remove due date."),
235
+ description: z.string().optional().describe("Detailed description of the issue. Supports Markdown formatting including **bold**, *italic*, 'code', links [text](url), and lists. Note: Jira enforces size limits on the description field (typically ~32,767 characters, varies by instance). For very large content, consider splitting across comments or using attachments."),
236
+ notifyUsers: z.boolean().optional().describe("If true, sends notification email to watchers. Setting to 'False' requires admin or project admin permissions."),
237
+ returnIssue: z.boolean().optional().describe("If true, response includes full updated issue details; if false, response is minimal."),
238
+ issueIdOrKey: z.string().describe("ID or key of the Jira issue to be edited."),
239
+ sprintIdOrName: z.string().optional().describe("Sprint to assign this issue to. Can be either a sprint ID (e.g., '123', '456') or sprint name (e.g., 'Sprint 1', 'Release Sprint'). The sprint must exist and be accessible. Use JIRA_LIST_SPRINTS to find available sprints."),
240
+ priorityIdOrName: z.string().optional().describe("Priority level for the issue. Can be either a priority ID (e.g., '1', '2') or priority name (e.g., 'High', 'Medium', 'Low')."),
241
+ additionalProperties: z.record(z.any()).optional().describe("Additional properties to include in the request body. This can be used to pass extra fields supported by the Jira API that are not explicitly defined, such as custom fields or other issue properties. These are merged into the 'fields' object in the request. Format: {'customfield_12345': 'value', 'components': [{'name': 'Backend'}]}."),
242
+ overrideEditableFlag: z.boolean().optional().describe("If true, bypasses editable flag restrictions. Requires admin permissions."),
243
+ overrideScreenSecurity: z.boolean().optional().describe("If true, bypasses screen security restrictions. Requires admin permissions."),
244
+ }),
245
+ execute: async ({ jiraToken, jiraCloudId, fields, labels, update, summary, assignee, dueDate, description, notifyUsers, returnIssue, issueIdOrKey, sprintIdOrName, priorityIdOrName, additionalProperties, overrideEditableFlag, overrideScreenSecurity }) => {
246
+ const { fields: editFields, update: editUpdate } = await buildEditBody(jiraToken, jiraCloudId, { summary, description, assignee, labels, dueDate, priorityIdOrName, fields, update, additionalProperties });
247
+ const body = { fields: editFields };
248
+ if (editUpdate)
249
+ body.update = editUpdate;
250
+ const res = await jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}`, method: 'PUT', query: { notifyUsers, overrideEditableFlag, overrideScreenSecurity }, body });
251
+ if (res?.error)
252
+ return res;
253
+ if (sprintIdOrName && /^\d+$/.test(String(sprintIdOrName))) {
254
+ await jira(jiraToken, { cloudId: jiraCloudId, api: "agile/1.0", path: `/sprint/${sprintIdOrName}/issue`, method: "POST", body: { issues: [issueIdOrKey] } });
255
+ }
256
+ if (returnIssue) {
257
+ const full = await jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}` });
258
+ return { success: true, issueKey: issueIdOrKey, issueData: full };
259
+ }
260
+ return { success: true, issueKey: issueIdOrKey };
261
+ },
262
+ });
263
+ export const jiraFetchBulkIssues = tool({
264
+ description: "Tool to bulk fetch multiple Jira issues by their IDs or keys (max 100 per call). Use when you need to retrieve details for multiple issues efficiently in a single API call.",
265
+ inputSchema: z.object({
266
+ jiraToken: tokenField,
267
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
268
+ expand: z.array(z.string()).optional().describe("A list of expand options to include additional information about issues. Available options: 'renderedFields' (HTML-rendered field values), 'names' (display name of each field), 'schema' (field type schema), 'transitions' (all possible transitions), 'operations' (all possible operations), 'editmeta' (edit metadata), 'changelog' (recent updates, max 40), 'versionedRepresentations' (versioned field values)."),
269
+ fields: z.array(z.string()).optional().describe("A list of fields to return for each issue. This parameter accepts field names or IDs. Special values: '*all' returns all fields, '*navigable' returns navigable fields (default), prefix with minus to exclude (e.g., '-description' excludes description). Examples: ['summary', 'comment'] returns only summary and comments; ['-description'] returns all navigable fields except description; ['*all', '-comment'] returns all fields except comments."),
270
+ properties: z.array(z.string()).max(5).optional().describe("A list of issue property keys to include in the results. Maximum 5 issue property keys can be specified."),
271
+ fieldsByKeys: z.boolean().optional().describe("If true, reference fields by their key (rather than ID). Default is false."),
272
+ issueIdsOrKeys: z.array(z.string()).min(1).max(100).describe("REQUIRED. An array of issue IDs or issue keys to fetch. You can mix issue IDs and keys in the same query. Minimum 1 issue, maximum 100 issues per request."),
273
+ }),
274
+ execute: async ({ jiraToken, jiraCloudId, expand, fields, properties, fieldsByKeys, issueIdsOrKeys }) => {
275
+ const queryParams = undefined;
276
+ const body = { issueIdsOrKeys: issueIdsOrKeys, expand: expand, fields: fields, properties: properties, fieldsByKeys: fieldsByKeys };
277
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/bulkfetch`, method: 'POST', query: queryParams, body });
278
+ },
279
+ });
280
+ export const jiraGetAttachment = tool({
281
+ description: "Retrieves the binary content of a Jira attachment by ID. Use when you need to download a specific file attached to an issue.",
282
+ inputSchema: z.object({
283
+ jiraToken: tokenField,
284
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
285
+ fileName: z.string().describe("Desired filename for the downloaded attachment."),
286
+ attachmentId: z.string().describe("The unique identifier of the attachment to retrieve."),
287
+ }),
288
+ execute: async ({ jiraToken, jiraCloudId, fileName, attachmentId }) => {
289
+ const meta = await jira(jiraToken, { cloudId: jiraCloudId, path: `/attachment/${encodeURIComponent(attachmentId)}` });
290
+ if (meta?.error)
291
+ return meta;
292
+ return { ...meta, fileName };
293
+ },
294
+ });
295
+ export const jiraGetComment = tool({
296
+ description: "This action fetches a specific comment from a Jira issue by its ID. You can specify optional parameters to expand additional information in the response.",
297
+ inputSchema: z.object({
298
+ jiraToken: tokenField,
299
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
300
+ expand: z.string().optional().describe("Optional. Sections to expand, e.g., 'renderedBody' for HTML. See Jira API docs for other values."),
301
+ commentId: z.string().describe("Unique ID of the comment to retrieve."),
302
+ issueIdOrKey: z.string().describe("ID or key of the Jira issue (e.g., '10000' or 'PROJ-123')."),
303
+ }),
304
+ execute: async ({ jiraToken, jiraCloudId, expand, commentId, issueIdOrKey }) => {
305
+ const queryParams = { expand: expand };
306
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/comment/${encodeURIComponent(commentId)}`, method: 'GET', query: queryParams });
307
+ },
308
+ });
309
+ export const jiraGetIssue = tool({
310
+ description: "This action retrieves a specific Jira issue using its ID or key. Users can customize the fields and additional data included in the response to suit their specific needs.",
311
+ inputSchema: z.object({
312
+ jiraToken: tokenField,
313
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
314
+ expand: z.string().optional().describe("A comma-separated list of entities to include with the issue. To retrieve update history, include 'changelog' in this list (e.g., 'changelog'). Other common expansions include 'renderedFields' (HTML content), 'transitions' (available workflows), and 'operations' (available actions)."),
315
+ fields: z.array(z.string()).optional().describe("A list of field names or IDs to return for the issue. If omitted or empty, a default set of fields (often all fields or all navigable fields) is returned. For specific fields, provide a list like '[\"summary\", \"status\"]'."),
316
+ issueKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue to retrieve."),
317
+ properties: z.array(z.string()).optional().describe("A list of issue property keys to include in the response. Issue properties are extra key-value data attached to an issue, often by apps. Example: '[\"jira.meta.data\", \"com.example.custom.info\"]'."),
318
+ fieldsByKeys: z.boolean().optional().describe("If true, the strings in the 'fields' parameter are interpreted as field keys (e.g., 'summary') instead of field IDs (e.g., 'customfield_10000'). Default is false (uses field IDs)."),
319
+ updateHistory: z.boolean().optional().describe("Controls whether viewing the issue adds it to the user's 'Recently viewed' list. This does not control inclusion of update history in the response. To include update history, use the 'expand' parameter with 'changelog'."),
320
+ }),
321
+ execute: async ({ jiraToken, jiraCloudId, expand, fields, issueKey, properties, fieldsByKeys, updateHistory }) => {
322
+ const queryParams = { fields: fields, expand: expand, properties: properties, fieldsByKeys: fieldsByKeys, updateHistory: updateHistory };
323
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueKey)}`, method: 'GET', query: queryParams });
324
+ },
325
+ });
326
+ export const jiraGetIssueEditMetadata = tool({
327
+ description: "Tool to retrieve editable fields for a Jira issue. Use before running an edit action to fetch custom field metadata and required fields.",
328
+ inputSchema: z.object({
329
+ jiraToken: tokenField,
330
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
331
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue to inspect."),
332
+ overrideEditableFlag: z.boolean().optional().describe("Skip workflow/step editability checks when true. Intended for apps with Administer Jira permission."),
333
+ overrideScreenSecurity: z.boolean().optional().describe("Skip screen and field-configuration visibility checks when true. Intended for apps with Administer Jira permission."),
334
+ }),
335
+ execute: async ({ jiraToken, jiraCloudId, issueIdOrKey, overrideEditableFlag, overrideScreenSecurity }) => {
336
+ const queryParams = { overrideEditableFlag: overrideEditableFlag, overrideScreenSecurity: overrideScreenSecurity };
337
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/editmeta`, method: 'GET', query: queryParams });
338
+ },
339
+ });
340
+ export const jiraGetIssueLinkTypes = tool({
341
+ description: "This action retrieves all issue link types configured in the Jira instance. It provides a comprehensive list of the relationships available for issues in your project.",
342
+ inputSchema: z.object({
343
+ jiraToken: tokenField,
344
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
345
+ }),
346
+ execute: async ({ jiraToken, jiraCloudId }) => {
347
+ const queryParams = undefined;
348
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issueLinkType`, method: 'GET', query: queryParams });
349
+ },
350
+ });
351
+ export const jiraGetIssuePickerSuggestions = tool({
352
+ description: "Retrieves issue picker suggestions from Jira for auto-completion when searching for issues.",
353
+ inputSchema: z.object({
354
+ jiraToken: tokenField,
355
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
356
+ query: z.string().optional().describe("A string to match against text fields in the issue such as title, description, or comments."),
357
+ currentJQL: z.string().optional().describe("A JQL query defining a list of issues to search for the query term. Note that 'username' and 'userkey' cannot be used as search terms for this parameter, due to privacy reasons. Use 'accountId' instead."),
358
+ showSubTasks: z.boolean().optional().describe("Indicate whether to include subtasks in the suggestions list."),
359
+ currentIssueKey: z.string().optional().describe("The key of an issue to exclude from search results. For example, the issue the user is viewing when they perform this query."),
360
+ currentProjectId: z.string().optional().describe("The ID of a project that suggested issues must belong to."),
361
+ showSubTaskParent: z.boolean().optional().describe("When 'currentIssueKey' is a subtask, whether to include the parent issue in the suggestions if it matches the query."),
362
+ }),
363
+ execute: async ({ jiraToken, jiraCloudId, query, currentJQL, showSubTasks, currentIssueKey, currentProjectId, showSubTaskParent }) => {
364
+ const queryParams = { query: query, currentJQL: currentJQL, showSubTasks: showSubTasks, currentIssueKey: currentIssueKey, currentProjectId: currentProjectId, showSubTaskParent: showSubTaskParent };
365
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/picker`, method: 'GET', query: queryParams });
366
+ },
367
+ });
368
+ export const jiraGetIssueProperty = tool({
369
+ description: "This action retrieves a specific property associated with a Jira issue using its ID or key. It allows users to access custom information stored in Jira properties.",
370
+ inputSchema: z.object({
371
+ jiraToken: tokenField,
372
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
373
+ propertyKey: z.string().describe("The key of the issue property to retrieve. Property keys are often dot-separated, like 'com.example.property.key'."),
374
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'TEST-123') of the Jira issue."),
375
+ }),
376
+ execute: async ({ jiraToken, jiraCloudId, propertyKey, issueIdOrKey }) => {
377
+ const queryParams = undefined;
378
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/properties/${encodeURIComponent(propertyKey)}`, method: 'GET', query: queryParams });
379
+ },
380
+ });
381
+ export const jiraGetIssueWatchers = tool({
382
+ description: "This action retrieves the list of users watching a specific Jira issue. It allows clients to understand who is interested in updates for that issue.",
383
+ inputSchema: z.object({
384
+ jiraToken: tokenField,
385
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
386
+ issueIdOrKey: z.string().describe("The ID or key of the Jira issue for which to retrieve watchers. This can be the numerical ID (e.g., '10000') or the human-readable key (e.g., 'PROJ-123')."),
387
+ }),
388
+ execute: async ({ jiraToken, jiraCloudId, issueIdOrKey }) => {
389
+ const queryParams = undefined;
390
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/watchers`, method: 'GET', query: queryParams });
391
+ },
392
+ });
393
+ export const jiraGetIssueWorklogs = tool({
394
+ description: "Retrieves all worklogs associated with a specific Jira issue. This includes filtering options such as start dates and pagination for large sets of worklogs.",
395
+ inputSchema: z.object({
396
+ jiraToken: tokenField,
397
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
398
+ startAt: z.number().int().optional().describe("Index of the first worklog to return (for pagination). Defaults to 0."),
399
+ maxResults: z.number().int().optional().describe("Maximum number of worklogs to return per page. Defaults to a system-defined limit."),
400
+ startedAfter: z.number().int().optional().describe("Filters worklogs to include only those started after this Unix timestamp (milliseconds)."),
401
+ startedBefore: z.number().int().optional().describe("Filters worklogs to include only those started before this Unix timestamp (milliseconds)."),
402
+ issueIdOrKey: z.string().describe("The ID or key of the issue for which worklogs are to be fetched."),
403
+ }),
404
+ execute: async ({ jiraToken, jiraCloudId, startAt, maxResults, startedAfter, startedBefore, issueIdOrKey }) => {
405
+ const queryParams = { startAt: startAt, maxResults: maxResults, startedAfter: startedAfter, startedBefore: startedBefore };
406
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/worklog`, method: 'GET', query: queryParams });
407
+ },
408
+ });
409
+ export const jiraGetRemoteIssueLinks = tool({
410
+ description: "This action retrieves remote issue links associated with a specified Jira issue. You can filter the links by providing an optional global ID for a specific link retrieval.",
411
+ inputSchema: z.object({
412
+ jiraToken: tokenField,
413
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
414
+ globalId: z.string().optional().describe("Optional. The global ID of a specific remote issue link to retrieve, provided by the external linking application. If specified, only the remote issue link matching this global ID is returned."),
415
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJECT-123') of the Jira issue for which to retrieve remote links."),
416
+ }),
417
+ execute: async ({ jiraToken, jiraCloudId, globalId, issueIdOrKey }) => {
418
+ const queryParams = { globalId: globalId };
419
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/remotelink`, method: 'GET', query: queryParams });
420
+ },
421
+ });
422
+ export const jiraGetTransitions = tool({
423
+ description: "This action retrieves the available workflow transitions for a specified Jira issue. It can return details about the transitions, including their IDs and names, as well as whether they are currently available for use.",
424
+ inputSchema: z.object({
425
+ jiraToken: tokenField,
426
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
427
+ expand: z.string().optional().describe("A comma-separated list of properties to expand in the response. Use 'transitions.fields' to include the fields associated with each transition, providing details on what input is expected or allowed."),
428
+ transitionId: z.string().optional().describe("The ID of a specific transition to retrieve. If provided, only details for this transition are returned."),
429
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue for which to retrieve transitions."),
430
+ skipRemoteOnlyCondition: z.boolean().optional().describe("If true, conditions defined by remote apps that only run remotely will be skipped during evaluation."),
431
+ sortByOpsBarAndStatus: z.boolean().optional().describe("If true, sorts the returned transitions by their order in the operations bar and then by status category."),
432
+ includeUnavailableTransitions: z.boolean().optional().describe("If true, transitions that are not currently available for the issue (e.g., due to unmet conditions) will be included in the response. Use this as a diagnostic step when an expected target status is missing from the default response."),
433
+ }),
434
+ execute: async ({ jiraToken, jiraCloudId, expand, transitionId, issueIdOrKey, skipRemoteOnlyCondition, sortByOpsBarAndStatus, includeUnavailableTransitions }) => {
435
+ const queryParams = { expand: expand, transitionId: transitionId, skipRemoteOnlyCondition: skipRemoteOnlyCondition, sortByOpsBarAndStatus: sortByOpsBarAndStatus, includeUnavailableTransitions: includeUnavailableTransitions };
436
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/transitions`, method: 'GET', query: queryParams });
437
+ },
438
+ });
439
+ export const jiraGetVotes = tool({
440
+ description: "This action retrieves the voting information associated with a specific Jira issue. It provides details such as the total number of votes and whether the user has voted on that issue.",
441
+ inputSchema: z.object({
442
+ jiraToken: tokenField,
443
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
444
+ issueIdOrKey: z.string().describe("The ID or key of the Jira issue (e.g., 'PROJ-123' or '10000')."),
445
+ }),
446
+ execute: async ({ jiraToken, jiraCloudId, issueIdOrKey }) => {
447
+ const queryParams = undefined;
448
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/votes`, method: 'GET', query: queryParams });
449
+ },
450
+ });
451
+ export const jiraGetWorklog = tool({
452
+ description: "Retrieves the worklog entries for a specified Jira issue. This action provides detailed information on time spent by users on the issue, allowing for effective tracking and reporting of work activity.",
453
+ inputSchema: z.object({
454
+ jiraToken: tokenField,
455
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
456
+ expand: z.string().optional().describe("A comma-separated list of worklog properties to expand in the response. For instance, 'properties' can be used to include custom fields associated with the worklogs. Refer to the Jira API documentation for other possible values."),
457
+ startAt: z.number().int().optional().describe("The 0-based index of the first worklog to return. Used for pagination to retrieve results beyond the initial page. For example, if 'maxResults' is 50, 'startAt=50' retrieves the second page."),
458
+ maxResults: z.number().int().optional().describe("The maximum number of worklogs to return per page. Used for pagination. If not specified, a Jira-defined default is used (e.g., 50)."),
459
+ startedAfter: z.number().int().optional().describe("Filters worklogs to include only those started on or after this specified date and time. Provide as a Unix timestamp in milliseconds (milliseconds since January 1, 1970, 00:00:00 UTC)."),
460
+ startedBefore: z.number().int().optional().describe("Filters worklogs to include only those started on or before this specified date and time. Provide as a Unix timestamp in milliseconds (milliseconds since January 1, 1970, 00:00:00 UTC)."),
461
+ issueIdOrKey: z.string().describe("The ID (e.g., '10001') or key (e.g., 'PROJECT-123') of the Jira issue for which to retrieve worklogs."),
462
+ }),
463
+ execute: async ({ jiraToken, jiraCloudId, expand, startAt, maxResults, startedAfter, startedBefore, issueIdOrKey }) => {
464
+ const queryParams = { expand: expand, startAt: startAt, maxResults: maxResults, startedAfter: startedAfter, startedBefore: startedBefore };
465
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/worklog`, method: 'GET', query: queryParams });
466
+ },
467
+ });
468
+ export const jiraListComments = tool({
469
+ description: "Tool to retrieve multiple comments by their IDs in a single request. Use when you need to fetch specific comments efficiently. Supports up to 1000 comment IDs per request with optional expansion for rendered HTML and properties.",
470
+ inputSchema: z.object({
471
+ jiraToken: tokenField,
472
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
473
+ ids: z.array(z.number().int()).min(1).max(1000).describe("The list of comment IDs to retrieve. A maximum of 1000 IDs can be specified."),
474
+ expand: z.string().optional().describe("Use expand to include additional information about comments in the response. This parameter accepts a comma-separated list. Expand options include: 'renderedBody' (returns the comment body rendered in HTML), 'properties' (returns the comment's properties)."),
475
+ }),
476
+ execute: async ({ jiraToken, jiraCloudId, ids, expand }) => {
477
+ const queryParams = undefined;
478
+ const body = { ids: ids, expand: expand };
479
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/comment/list`, method: 'POST', query: queryParams, body });
480
+ },
481
+ });
482
+ export const jiraListIssueComments = tool({
483
+ description: "This action fetches paginated comments associated with a specific Jira issue. It allows users to retrieve details such as the comment content and the authorship information.",
484
+ inputSchema: z.object({
485
+ jiraToken: tokenField,
486
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
487
+ expand: z.string().optional().describe("Use 'renderedBody' to include the HTML-rendered version of the comment body in the response."),
488
+ orderBy: z.string().optional().describe("Specifies the field to sort comments by; use 'created' for ascending by creation date (currently the only supported value)."),
489
+ startAt: z.number().int().min(0).optional().describe("The 0-based index of the first comment to return."),
490
+ maxResults: z.number().int().min(1).max(100).optional().describe("The maximum number of comments to return per page. Note: Jira Cloud enforces a maximum of ~100 comments per page for this endpoint, regardless of the requested value."),
491
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue from which to retrieve comments."),
492
+ }),
493
+ execute: async ({ jiraToken, jiraCloudId, expand, orderBy, startAt, maxResults, issueIdOrKey }) => {
494
+ const queryParams = { startAt: startAt, maxResults: maxResults, orderBy: orderBy, expand: expand };
495
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/comment`, method: 'GET', query: queryParams });
496
+ },
497
+ });
498
+ export const jiraRemoveWatcherFromIssue = tool({
499
+ description: "This action allows you to remove a specified user from the watchers list of a given issue. You need to provide the issue identification and the user's account ID for the operation to succeed.",
500
+ inputSchema: z.object({
501
+ jiraToken: tokenField,
502
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
503
+ accountId: z.string().describe("The account ID of the user to remove from the issue's watchers list. Must be an account ID, not a username; retrieve via JIRA_GET_CURRENT_USER or JIRA_FIND_USERS."),
504
+ issueIdOrKey: z.string().describe("The ID or key of the issue."),
505
+ }),
506
+ execute: async ({ jiraToken, jiraCloudId, accountId, issueIdOrKey }) => {
507
+ const queryParams = { accountId: accountId };
508
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/watchers`, method: 'DELETE', query: queryParams });
509
+ },
510
+ });
511
+ export const jiraSendNotificationForIssue = tool({
512
+ description: "This action sends a customized email notification related to a specific Jira issue. It includes customizable fields for the subject, message content, and recipients, ensuring tailored communication for issue updates.",
513
+ inputSchema: z.object({
514
+ jiraToken: tokenField,
515
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
516
+ to: z.record(z.any()).describe("A 'NotificationRecipients' object specifying who should receive the notification. At least one recipient category (e.g., reporter, assignee, a user, or a group) within this object must be configured."),
517
+ subject: z.string().describe("The subject line for the email notification."),
518
+ restrict: z.record(z.any()).optional().describe("Optional restrictions defining who can receive the notification. If specified, notifications are sent only to users who meet the criteria in 'groups' (if provided) AND 'permissions' (if provided), AND also have general permission to view the issue."),
519
+ htmlBody: z.string().optional().describe("The HTML content of the email notification. This field is optional unless 'restrict' is used, in which case it becomes mandatory. It is recommended to also provide 'text_body' for email clients that do not support HTML."),
520
+ textBody: z.string().describe("The plain text content of the email notification. This field is always mandatory."),
521
+ issueIdOrKey: z.string().describe("The ID (e.g., '10000') or key (e.g., 'PROJ-123') of the Jira issue for which the notification will be sent."),
522
+ }),
523
+ execute: async ({ jiraToken, jiraCloudId, to, subject, restrict, htmlBody, textBody, issueIdOrKey }) => {
524
+ const queryParams = undefined;
525
+ const body = { subject: subject, textBody: textBody, htmlBody: htmlBody, to: to, restrict: restrict };
526
+ return jira(jiraToken, { cloudId: jiraCloudId, api: 'api/3', path: `/issue/${encodeURIComponent(issueIdOrKey)}/notify`, method: 'POST', query: queryParams, body });
527
+ },
528
+ });
529
+ export const jiraTransitionIssue = tool({
530
+ description: "This action transitions a specified Jira issue to a different status based on the selected workflow transition. It supports optional comments and assignee information. Note: Only fields configured on the transition screen can be set during the transition.",
531
+ inputSchema: z.object({
532
+ jiraToken: tokenField,
533
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
534
+ comment: z.string().optional().describe("Optional comment to add during the transition. Supports Markdown-style formatting that is automatically converted to Atlassian Document Format (ADF). Supported formatting: **bold** (wrap text in double asterisks), *italic* or _italic_ (single asterisks or underscores), 'inline code' (backticks), [link text](https://url) for hyperlinks, bullet lists (lines starting with -, *, or +), and numbered lists (lines starting with 1., 2., etc.). Example: 'Fixed **critical** bug in 'user.login()' method. See [docs](https://example.com) for details.'"),
535
+ assignee: z.string().optional().describe("Account ID of the user to assign the issue to during transition. Takes precedence over assignee_name."),
536
+ resolution: z.string().optional().describe("Resolution to set when CLOSING an issue (e.g., 'Done', 'Fixed', 'Won't Do'). IMPORTANT: Only use this when transitioning to a final status like 'Done', 'Closed', or 'Resolved'. Do NOT set this for intermediate transitions like 'In Progress', 'In Review', or 'To Do' - resolution is only available when completing/closing an issue."),
537
+ assigneeName: z.string().optional().describe("Name of the user to assign the issue to during transition. Can be either an email address (e.g., 'john@company.com') or display name (e.g., 'John Doe'). The system will auto-detect the type and search accordingly. Ignored if assignee (account ID) is provided."),
538
+ issueIdOrKey: z.string().describe("The ID or key of the issue to transition."),
539
+ transitionFields: z.record(z.any()).optional().describe("Fields to include in the transition payload. Use this for fields that appear on the transition screen and may be required by the workflow (e.g., 'timetracking', custom fields). Format: {'timetracking': {'originalEstimate': '2h'}, 'customfield_10001': 'value'}. For time tracking, use format like '1d 2h' (1 day 2 hours), '30m' (30 minutes), or '1w' (1 week). Note: assignee, resolution, and comment are handled by dedicated parameters and don't need to be included here."),
540
+ additionalProperties: z.record(z.any()).optional().describe("Additional properties to include at the top level of the transition request body. This can be used to pass extra fields supported by the Jira API that are not explicitly defined, such as 'historyMetadata' for audit trail customization or 'properties' for entity properties. Format: {'historyMetadata': {'type': 'myplugin:type'}, 'properties': [{'key': 'myKey', 'value': {...}}]}."),
541
+ transitionIdOrName: z.string().describe("The ID or name of the transition to apply. IMPORTANT: Transition names are workflow-specific and vary between Jira projects (e.g., one project may have 'In Progress' while another has 'In Development'). It is strongly recommended to first retrieve available transitions for the issue using JIRA_GET_TRANSITIONS or JIRA_GET_ISSUE (with expand='transitions') to ensure you use a valid transition name for this specific issue's workflow. Available transitions also depend on the issue's *current status*, not just the project — never reuse cached transition IDs across different issues or statuses. When multiple transitions share similar names, prefer the numeric ID to avoid applying the wrong state change."),
542
+ }),
543
+ execute: async ({ jiraToken, jiraCloudId, comment, assignee, resolution, assigneeName, issueIdOrKey, transitionFields, additionalProperties, transitionIdOrName }) => {
544
+ const tid = await getTransitionId(jiraToken, jiraCloudId, issueIdOrKey, transitionIdOrName);
545
+ if (!tid)
546
+ return { error: `No transition "${transitionIdOrName}" is available for issue ${issueIdOrKey}. Use JiraGetTransitions first.` };
547
+ const fields = { ...(transitionFields ?? {}) };
548
+ const acc = await resolveAssignee(jiraToken, jiraCloudId, assignee, assigneeName);
549
+ if (acc)
550
+ fields.assignee = { accountId: acc };
551
+ if (resolution)
552
+ fields.resolution = { name: resolution };
553
+ const body = { transition: { id: tid }, fields };
554
+ if (comment)
555
+ body.update = { comment: [{ add: { body: mdToAdf(comment) } }] };
556
+ if (additionalProperties && typeof additionalProperties === "object")
557
+ Object.assign(body, additionalProperties);
558
+ const res = await jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}/transitions`, method: 'POST', body });
559
+ if (res?.error)
560
+ return res;
561
+ return { success: true, issueKey: issueIdOrKey, transitionName: transitionIdOrName };
562
+ },
563
+ });
564
+ export const jiraUpdateComment = tool({
565
+ description: "This action updates an existing comment on a Jira issue. Users can modify the comment text and adjust visibility settings as needed.",
566
+ inputSchema: z.object({
567
+ jiraToken: tokenField,
568
+ jiraCloudId: z.string().optional().describe('Optional Jira Cloud site ID. If omitted, your first accessible site is used automatically.'),
569
+ commentId: z.string().describe("The unique ID of the comment to be updated."),
570
+ commentText: z.string().describe("The new text content for the comment. This will replace the existing comment body. Supports plain text and basic formatting like *bold*, _italic_, and @mentions. Mentions support two formats: @username (no spaces) and @\"Display Name\" (quoted to allow spaces). Quoted mentions like @\"John Doe\" are converted to rich mentions where possible."),
571
+ notifyUsers: z.boolean().optional().describe("A boolean flag indicating whether to send notifications to users about the comment update. Defaults to True."),
572
+ issueIdOrKey: z.string().describe("The ID or key of the Jira issue where the comment is located. This can be the numerical ID or the project key followed by the issue number (e.g., 'PROJ-123')."),
573
+ visibilityType: z.string().optional().describe("Optional. The type of visibility restriction to apply to the comment. If provided, 'visibility_value' must also be specified. Valid values are 'group' or 'role'."),
574
+ visibilityValue: z.string().optional().describe("Optional. The name of the group or role to restrict comment visibility to. Required if 'visibility_type' is specified. For 'group' type, provide the group name (e.g., 'jira-administrators'). For 'role' type, provide the project role name (e.g., 'Administrators')."),
575
+ additionalProperties: z.string().optional().describe("JSON string of comment properties as key-value pairs. Values can be any JSON type (strings, numbers, objects, arrays, booleans, null). Note: Primitive values (strings, numbers, booleans, null) and arrays are automatically wrapped in {\"value\": ...} to match Jira's entity property requirements. Object values are passed through as-is. Format: '{\"property_key\": \"string value\"}' or '{\"property_key\": {\"custom\": \"object\"}}'."),
576
+ }),
577
+ execute: async ({ jiraToken, jiraCloudId, commentId, commentText, notifyUsers, issueIdOrKey, visibilityType, visibilityValue, additionalProperties }) => {
578
+ const body = { body: mdToAdf(commentText) };
579
+ if (visibilityType && visibilityValue)
580
+ body.visibility = { type: visibilityType, value: visibilityValue };
581
+ if (additionalProperties) {
582
+ try {
583
+ const parsed = JSON.parse(additionalProperties);
584
+ const props = Object.entries(parsed).map(([key, value]) => ({ key, value: value !== null && typeof value === "object" && !Array.isArray(value) ? value : { value } }));
585
+ if (props.length > 0)
586
+ body.properties = props;
587
+ }
588
+ catch { /* ignore malformed JSON */ }
589
+ }
590
+ return jira(jiraToken, { cloudId: jiraCloudId, path: `/issue/${encodeURIComponent(issueIdOrKey)}/comment/${encodeURIComponent(commentId)}`, method: 'PUT', query: { notifyUsers }, body });
591
+ },
592
+ });
593
+ //# sourceMappingURL=issues.js.map