@steuerboard/mcp 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/README.md +29 -46
  2. package/bin/mcp-server.js +1197 -442
  3. package/bin/mcp-server.js.map +63 -47
  4. package/esm/src/cloudflare-worker/cloudflare-worker.d.ts +1 -1
  5. package/esm/src/cloudflare-worker/cloudflare-worker.d.ts.map +1 -1
  6. package/esm/src/cloudflare-worker/cloudflare-worker.js +8 -5
  7. package/esm/src/cloudflare-worker/cloudflare-worker.js.map +1 -1
  8. package/esm/src/cloudflare-worker/landing-page.d.ts +1 -1
  9. package/esm/src/cloudflare-worker/landing-page.d.ts.map +1 -1
  10. package/esm/src/cloudflare-worker/landing-page.js +9 -9
  11. package/esm/src/cloudflare-worker/landing-page.js.map +1 -1
  12. package/esm/src/funcs/adminClientsCreateClient.d.ts +17 -0
  13. package/esm/src/funcs/adminClientsCreateClient.d.ts.map +1 -0
  14. package/esm/src/funcs/adminClientsCreateClient.js +89 -0
  15. package/esm/src/funcs/adminClientsCreateClient.js.map +1 -0
  16. package/esm/src/funcs/adminClientsGetClient.js +4 -6
  17. package/esm/src/funcs/adminClientsGetClient.js.map +1 -1
  18. package/esm/src/funcs/adminClientsListClients.d.ts.map +1 -1
  19. package/esm/src/funcs/adminClientsListClients.js +24 -18
  20. package/esm/src/funcs/adminClientsListClients.js.map +1 -1
  21. package/esm/src/funcs/{authGetV1Me.d.ts → authMe.d.ts} +3 -3
  22. package/esm/src/funcs/authMe.d.ts.map +1 -0
  23. package/esm/src/funcs/{authGetV1Me.js → authMe.js} +5 -5
  24. package/esm/src/funcs/authMe.js.map +1 -0
  25. package/esm/src/funcs/filesCreateFile.js +31 -33
  26. package/esm/src/funcs/filesCreateFile.js.map +1 -1
  27. package/esm/src/funcs/filesDeleteFile.js +4 -6
  28. package/esm/src/funcs/filesDeleteFile.js.map +1 -1
  29. package/esm/src/funcs/filesGetFile.js +4 -4
  30. package/esm/src/funcs/filesGetFile.js.map +1 -1
  31. package/esm/src/funcs/filesListFiles.d.ts.map +1 -1
  32. package/esm/src/funcs/filesListFiles.js +19 -13
  33. package/esm/src/funcs/filesListFiles.js.map +1 -1
  34. package/esm/src/funcs/filesUpdateFile.js +4 -4
  35. package/esm/src/funcs/filesUpdateFile.js.map +1 -1
  36. package/esm/src/funcs/{healthCheckGetV1.d.ts → healthIndex.d.ts} +3 -3
  37. package/esm/src/funcs/{authGetV1Me.d.ts.map → healthIndex.d.ts.map} +1 -1
  38. package/esm/src/funcs/{healthCheckGetV1.js → healthIndex.js} +5 -5
  39. package/esm/src/funcs/healthIndex.js.map +1 -0
  40. package/esm/src/funcs/{healthCheckGetV1Ping.d.ts → healthPing.d.ts} +4 -4
  41. package/esm/src/funcs/healthPing.d.ts.map +1 -0
  42. package/esm/src/funcs/{healthCheckGetV1Ping.js → healthPing.js} +8 -12
  43. package/esm/src/funcs/healthPing.js.map +1 -0
  44. package/esm/src/funcs/tasksCreateTask.js +5 -1
  45. package/esm/src/funcs/tasksCreateTask.js.map +1 -1
  46. package/esm/src/funcs/tasksDeleteTask.js +8 -4
  47. package/esm/src/funcs/tasksDeleteTask.js.map +1 -1
  48. package/esm/src/funcs/tasksGetTask.js +8 -4
  49. package/esm/src/funcs/tasksGetTask.js.map +1 -1
  50. package/esm/src/funcs/tasksListTasks.d.ts +1 -1
  51. package/esm/src/funcs/tasksListTasks.d.ts.map +1 -1
  52. package/esm/src/funcs/tasksListTasks.js +27 -14
  53. package/esm/src/funcs/tasksListTasks.js.map +1 -1
  54. package/esm/src/funcs/tasksUpdateTask.js +5 -1
  55. package/esm/src/funcs/tasksUpdateTask.js.map +1 -1
  56. package/esm/src/funcs/workspacesCreateWorkspace.d.ts +16 -0
  57. package/esm/src/funcs/workspacesCreateWorkspace.d.ts.map +1 -0
  58. package/esm/src/funcs/workspacesCreateWorkspace.js +92 -0
  59. package/esm/src/funcs/workspacesCreateWorkspace.js.map +1 -0
  60. package/esm/src/funcs/workspacesGetWorkspace.js +4 -6
  61. package/esm/src/funcs/workspacesGetWorkspace.js.map +1 -1
  62. package/esm/src/funcs/workspacesListWorkspaces.d.ts.map +1 -1
  63. package/esm/src/funcs/workspacesListWorkspaces.js +19 -11
  64. package/esm/src/funcs/workspacesListWorkspaces.js.map +1 -1
  65. package/esm/src/lib/config.d.ts +3 -3
  66. package/esm/src/lib/config.d.ts.map +1 -1
  67. package/esm/src/lib/config.js +4 -6
  68. package/esm/src/lib/config.js.map +1 -1
  69. package/esm/src/mcp-server/mcp-server.js +1 -1
  70. package/esm/src/mcp-server/mcp-server.js.map +1 -1
  71. package/esm/src/mcp-server/server.d.ts.map +1 -1
  72. package/esm/src/mcp-server/server.js +24 -19
  73. package/esm/src/mcp-server/server.js.map +1 -1
  74. package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts +7 -0
  75. package/esm/src/mcp-server/tools/adminClientsCreateClient.d.ts.map +1 -0
  76. package/esm/src/mcp-server/tools/adminClientsCreateClient.js +28 -0
  77. package/esm/src/mcp-server/tools/adminClientsCreateClient.js.map +1 -0
  78. package/esm/src/mcp-server/tools/adminClientsListClients.d.ts.map +1 -1
  79. package/esm/src/mcp-server/tools/adminClientsListClients.js +1 -2
  80. package/esm/src/mcp-server/tools/adminClientsListClients.js.map +1 -1
  81. package/esm/src/mcp-server/tools/authMe.d.ts +3 -0
  82. package/esm/src/mcp-server/tools/authMe.d.ts.map +1 -0
  83. package/esm/src/mcp-server/tools/{healthCheckGetV1.js → authMe.js} +6 -6
  84. package/esm/src/mcp-server/tools/authMe.js.map +1 -0
  85. package/esm/src/mcp-server/tools/healthIndex.d.ts +3 -0
  86. package/esm/src/mcp-server/tools/healthIndex.d.ts.map +1 -0
  87. package/esm/src/mcp-server/tools/{authGetV1Me.js → healthIndex.js} +6 -6
  88. package/esm/src/mcp-server/tools/healthIndex.js.map +1 -0
  89. package/esm/src/mcp-server/tools/healthPing.d.ts +3 -0
  90. package/esm/src/mcp-server/tools/healthPing.d.ts.map +1 -0
  91. package/esm/src/mcp-server/tools/{healthCheckGetV1Ping.js → healthPing.js} +6 -6
  92. package/esm/src/mcp-server/tools/healthPing.js.map +1 -0
  93. package/esm/src/mcp-server/tools/tasksListTasks.d.ts +1 -1
  94. package/esm/src/mcp-server/tools/tasksListTasks.js +1 -1
  95. package/esm/src/mcp-server/tools/tasksListTasks.js.map +1 -1
  96. package/esm/src/mcp-server/tools/workspacesCreateWorkspace.d.ts +7 -0
  97. package/esm/src/mcp-server/tools/workspacesCreateWorkspace.d.ts.map +1 -0
  98. package/esm/src/mcp-server/tools/workspacesCreateWorkspace.js +28 -0
  99. package/esm/src/mcp-server/tools/workspacesCreateWorkspace.js.map +1 -0
  100. package/esm/src/mcp-server/tools.d.ts.map +1 -1
  101. package/esm/src/mcp-server/tools.js +10 -11
  102. package/esm/src/mcp-server/tools.js.map +1 -1
  103. package/esm/src/models/autherror.d.ts +13 -0
  104. package/esm/src/models/autherror.d.ts.map +1 -0
  105. package/esm/src/models/autherror.js +17 -0
  106. package/esm/src/models/autherror.js.map +1 -0
  107. package/esm/src/models/badrequest.d.ts +13 -0
  108. package/esm/src/models/badrequest.d.ts.map +1 -0
  109. package/esm/src/models/badrequest.js +17 -0
  110. package/esm/src/models/badrequest.js.map +1 -0
  111. package/esm/src/models/client.d.ts +4 -4
  112. package/esm/src/models/client.d.ts.map +1 -1
  113. package/esm/src/models/client.js +4 -4
  114. package/esm/src/models/client.js.map +1 -1
  115. package/esm/src/models/clientcreate.d.ts +25 -0
  116. package/esm/src/models/clientcreate.d.ts.map +1 -0
  117. package/esm/src/models/clientcreate.js +27 -0
  118. package/esm/src/models/clientcreate.js.map +1 -0
  119. package/esm/src/models/createclientop.d.ts +51 -0
  120. package/esm/src/models/createclientop.d.ts.map +1 -0
  121. package/esm/src/models/createclientop.js +50 -0
  122. package/esm/src/models/createclientop.js.map +1 -0
  123. package/esm/src/models/createfileop.d.ts +29 -9
  124. package/esm/src/models/createfileop.d.ts.map +1 -1
  125. package/esm/src/models/createfileop.js +29 -5
  126. package/esm/src/models/createfileop.js.map +1 -1
  127. package/esm/src/models/createtaskop.d.ts +25 -4
  128. package/esm/src/models/createtaskop.d.ts.map +1 -1
  129. package/esm/src/models/createtaskop.js +22 -3
  130. package/esm/src/models/createtaskop.js.map +1 -1
  131. package/esm/src/models/createworkspaceop.d.ts +59 -0
  132. package/esm/src/models/createworkspaceop.d.ts.map +1 -0
  133. package/esm/src/models/createworkspaceop.js +57 -0
  134. package/esm/src/models/createworkspaceop.js.map +1 -0
  135. package/esm/src/models/deletefileop.d.ts +19 -12
  136. package/esm/src/models/deletefileop.d.ts.map +1 -1
  137. package/esm/src/models/deletefileop.js +20 -7
  138. package/esm/src/models/deletefileop.js.map +1 -1
  139. package/esm/src/models/deletetaskop.d.ts +20 -4
  140. package/esm/src/models/deletetaskop.d.ts.map +1 -1
  141. package/esm/src/models/deletetaskop.js +21 -3
  142. package/esm/src/models/deletetaskop.js.map +1 -1
  143. package/esm/src/models/getclientop.d.ts +17 -12
  144. package/esm/src/models/getclientop.d.ts.map +1 -1
  145. package/esm/src/models/getclientop.js +18 -7
  146. package/esm/src/models/getclientop.js.map +1 -1
  147. package/esm/src/models/getfileop.d.ts +21 -8
  148. package/esm/src/models/getfileop.d.ts.map +1 -1
  149. package/esm/src/models/getfileop.js +19 -4
  150. package/esm/src/models/getfileop.js.map +1 -1
  151. package/esm/src/models/gettaskop.d.ts +20 -4
  152. package/esm/src/models/gettaskop.d.ts.map +1 -1
  153. package/esm/src/models/gettaskop.js +21 -3
  154. package/esm/src/models/gettaskop.js.map +1 -1
  155. package/esm/src/models/getworkspaceop.d.ts +19 -12
  156. package/esm/src/models/getworkspaceop.d.ts.map +1 -1
  157. package/esm/src/models/getworkspaceop.js +20 -7
  158. package/esm/src/models/getworkspaceop.js.map +1 -1
  159. package/esm/src/models/indexop.d.ts +18 -0
  160. package/esm/src/models/indexop.d.ts.map +1 -0
  161. package/esm/src/models/indexop.js +16 -0
  162. package/esm/src/models/indexop.js.map +1 -0
  163. package/esm/src/models/listclientsop.d.ts +28 -26
  164. package/esm/src/models/listclientsop.d.ts.map +1 -1
  165. package/esm/src/models/listclientsop.js +27 -19
  166. package/esm/src/models/listclientsop.js.map +1 -1
  167. package/esm/src/models/listfilesop.d.ts +20 -16
  168. package/esm/src/models/listfilesop.d.ts.map +1 -1
  169. package/esm/src/models/listfilesop.js +21 -12
  170. package/esm/src/models/listfilesop.js.map +1 -1
  171. package/esm/src/models/listtasksop.d.ts +33 -9
  172. package/esm/src/models/listtasksop.d.ts.map +1 -1
  173. package/esm/src/models/listtasksop.js +41 -9
  174. package/esm/src/models/listtasksop.js.map +1 -1
  175. package/esm/src/models/listworkspacesop.d.ts +20 -16
  176. package/esm/src/models/listworkspacesop.d.ts.map +1 -1
  177. package/esm/src/models/listworkspacesop.js +21 -11
  178. package/esm/src/models/listworkspacesop.js.map +1 -1
  179. package/esm/src/models/meop.d.ts +41 -0
  180. package/esm/src/models/meop.d.ts.map +1 -0
  181. package/esm/src/models/meop.js +38 -0
  182. package/esm/src/models/meop.js.map +1 -0
  183. package/esm/src/models/notfound.d.ts +13 -0
  184. package/esm/src/models/notfound.d.ts.map +1 -0
  185. package/esm/src/models/notfound.js +18 -0
  186. package/esm/src/models/notfound.js.map +1 -0
  187. package/esm/src/models/paginatedclients.d.ts +9 -0
  188. package/esm/src/models/paginatedclients.d.ts.map +1 -0
  189. package/esm/src/models/paginatedclients.js +11 -0
  190. package/esm/src/models/paginatedclients.js.map +1 -0
  191. package/esm/src/models/paginatedfiles.d.ts +9 -0
  192. package/esm/src/models/paginatedfiles.d.ts.map +1 -0
  193. package/esm/src/models/paginatedfiles.js +11 -0
  194. package/esm/src/models/paginatedfiles.js.map +1 -0
  195. package/esm/src/models/paginatedtasks.d.ts +9 -0
  196. package/esm/src/models/paginatedtasks.d.ts.map +1 -0
  197. package/esm/src/models/paginatedtasks.js +11 -0
  198. package/esm/src/models/paginatedtasks.js.map +1 -0
  199. package/esm/src/models/paginatedworkspaces.d.ts +9 -0
  200. package/esm/src/models/paginatedworkspaces.d.ts.map +1 -0
  201. package/esm/src/models/paginatedworkspaces.js +11 -0
  202. package/esm/src/models/paginatedworkspaces.js.map +1 -0
  203. package/esm/src/models/pingop.d.ts +18 -0
  204. package/esm/src/models/pingop.d.ts.map +1 -0
  205. package/esm/src/models/pingop.js +16 -0
  206. package/esm/src/models/pingop.js.map +1 -0
  207. package/esm/src/models/ratelimit.d.ts +13 -0
  208. package/esm/src/models/ratelimit.d.ts.map +1 -0
  209. package/esm/src/models/ratelimit.js +17 -0
  210. package/esm/src/models/ratelimit.js.map +1 -0
  211. package/esm/src/models/updatefileop.d.ts +22 -9
  212. package/esm/src/models/updatefileop.d.ts.map +1 -1
  213. package/esm/src/models/updatefileop.js +20 -5
  214. package/esm/src/models/updatefileop.js.map +1 -1
  215. package/esm/src/models/updatetaskop.d.ts +20 -4
  216. package/esm/src/models/updatetaskop.d.ts.map +1 -1
  217. package/esm/src/models/updatetaskop.js +21 -3
  218. package/esm/src/models/updatetaskop.js.map +1 -1
  219. package/esm/src/models/workspacecreate.d.ts +6 -0
  220. package/esm/src/models/workspacecreate.d.ts.map +1 -0
  221. package/esm/src/models/workspacecreate.js +8 -0
  222. package/esm/src/models/workspacecreate.js.map +1 -0
  223. package/manifest.json +17 -9
  224. package/package.json +7 -6
  225. package/src/cloudflare-worker/cloudflare-worker.ts +12 -9
  226. package/src/cloudflare-worker/landing-page.ts +9 -9
  227. package/src/funcs/adminClientsCreateClient.ts +172 -0
  228. package/src/funcs/adminClientsGetClient.ts +6 -5
  229. package/src/funcs/adminClientsListClients.ts +138 -131
  230. package/src/funcs/{authGetV1Me.ts → authMe.ts} +11 -10
  231. package/src/funcs/filesCreateFile.ts +41 -39
  232. package/src/funcs/filesDeleteFile.ts +7 -5
  233. package/src/funcs/filesGetFile.ts +7 -3
  234. package/src/funcs/filesListFiles.ts +138 -130
  235. package/src/funcs/filesUpdateFile.ts +7 -3
  236. package/src/funcs/{healthCheckGetV1.ts → healthIndex.ts} +9 -7
  237. package/src/funcs/{healthCheckGetV1Ping.ts → healthPing.ts} +12 -17
  238. package/src/funcs/tasksCreateTask.ts +10 -1
  239. package/src/funcs/tasksDeleteTask.ts +11 -2
  240. package/src/funcs/tasksGetTask.ts +11 -2
  241. package/src/funcs/tasksListTasks.ts +141 -125
  242. package/src/funcs/tasksUpdateTask.ts +10 -1
  243. package/src/funcs/workspacesCreateWorkspace.ts +175 -0
  244. package/src/funcs/workspacesGetWorkspace.ts +7 -5
  245. package/src/funcs/workspacesListWorkspaces.ts +139 -129
  246. package/src/lib/config.ts +41 -42
  247. package/src/mcp-server/mcp-server.ts +10 -10
  248. package/src/mcp-server/server.ts +78 -71
  249. package/src/mcp-server/tools/adminClientsCreateClient.ts +37 -0
  250. package/src/mcp-server/tools/adminClientsListClients.ts +22 -24
  251. package/src/mcp-server/tools/{authGetV1Me.ts → authMe.ts} +4 -4
  252. package/src/mcp-server/tools/{healthCheckGetV1.ts → healthIndex.ts} +4 -4
  253. package/src/mcp-server/tools/{healthCheckGetV1Ping.ts → healthPing.ts} +5 -5
  254. package/src/mcp-server/tools/tasksListTasks.ts +1 -1
  255. package/src/mcp-server/tools/workspacesCreateWorkspace.ts +37 -0
  256. package/src/mcp-server/tools.ts +96 -98
  257. package/src/models/autherror.ts +32 -0
  258. package/src/models/badrequest.ts +35 -0
  259. package/src/models/client.ts +8 -6
  260. package/src/models/clientcreate.ts +58 -0
  261. package/src/models/createclientop.ts +136 -0
  262. package/src/models/createfileop.ts +78 -26
  263. package/src/models/createtaskop.ts +59 -10
  264. package/src/models/createworkspaceop.ts +158 -0
  265. package/src/models/deletefileop.ts +41 -30
  266. package/src/models/deletetaskop.ts +43 -10
  267. package/src/models/getclientop.ts +38 -30
  268. package/src/models/getfileop.ts +47 -20
  269. package/src/models/gettaskop.ts +43 -10
  270. package/src/models/getworkspaceop.ts +41 -30
  271. package/src/models/indexop.ts +39 -0
  272. package/src/models/listclientsop.ts +60 -49
  273. package/src/models/listfilesop.ts +42 -34
  274. package/src/models/listtasksop.ts +72 -16
  275. package/src/models/listworkspacesop.ts +45 -35
  276. package/src/models/meop.ts +96 -0
  277. package/src/models/notfound.ts +32 -0
  278. package/src/models/paginatedclients.ts +18 -0
  279. package/src/models/paginatedfiles.ts +18 -0
  280. package/src/models/paginatedtasks.ts +18 -0
  281. package/src/models/paginatedworkspaces.ts +21 -0
  282. package/src/models/pingop.ts +39 -0
  283. package/src/models/ratelimit.ts +32 -0
  284. package/src/models/updatefileop.ts +49 -22
  285. package/src/models/updatetaskop.ts +41 -7
  286. package/src/models/workspacecreate.ts +15 -0
  287. package/worker-configuration.d.ts +7024 -6203
  288. package/esm/src/funcs/authGetV1Me.js.map +0 -1
  289. package/esm/src/funcs/healthCheckGetV1.d.ts.map +0 -1
  290. package/esm/src/funcs/healthCheckGetV1.js.map +0 -1
  291. package/esm/src/funcs/healthCheckGetV1Ping.d.ts.map +0 -1
  292. package/esm/src/funcs/healthCheckGetV1Ping.js.map +0 -1
  293. package/esm/src/mcp-server/tools/authGetV1Me.d.ts +0 -3
  294. package/esm/src/mcp-server/tools/authGetV1Me.d.ts.map +0 -1
  295. package/esm/src/mcp-server/tools/authGetV1Me.js.map +0 -1
  296. package/esm/src/mcp-server/tools/healthCheckGetV1.d.ts +0 -3
  297. package/esm/src/mcp-server/tools/healthCheckGetV1.d.ts.map +0 -1
  298. package/esm/src/mcp-server/tools/healthCheckGetV1.js.map +0 -1
  299. package/esm/src/mcp-server/tools/healthCheckGetV1Ping.d.ts +0 -3
  300. package/esm/src/mcp-server/tools/healthCheckGetV1Ping.d.ts.map +0 -1
  301. package/esm/src/mcp-server/tools/healthCheckGetV1Ping.js.map +0 -1
  302. package/esm/src/models/getv1meop.d.ts +0 -21
  303. package/esm/src/models/getv1meop.d.ts.map +0 -1
  304. package/esm/src/models/getv1meop.js +0 -19
  305. package/esm/src/models/getv1meop.js.map +0 -1
  306. package/esm/src/models/getv1op.d.ts +0 -16
  307. package/esm/src/models/getv1op.d.ts.map +0 -1
  308. package/esm/src/models/getv1op.js +0 -14
  309. package/esm/src/models/getv1op.js.map +0 -1
  310. package/esm/src/models/getv1pingop.d.ts +0 -16
  311. package/esm/src/models/getv1pingop.d.ts.map +0 -1
  312. package/esm/src/models/getv1pingop.js +0 -14
  313. package/esm/src/models/getv1pingop.js.map +0 -1
  314. package/src/models/getv1meop.ts +0 -48
  315. package/src/models/getv1op.ts +0 -36
  316. package/src/models/getv1pingop.ts +0 -36
@@ -7,33 +7,31 @@ import { ListClientsRequest$zodSchema } from "../../models/listclientsop.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: ListClientsRequest$zodSchema.optional(),
10
+ request: ListClientsRequest$zodSchema.optional(),
11
11
  };
12
12
 
13
13
  export const tool$adminClientsListClients: ToolDefinition<typeof args> = {
14
- name: "admin-clients-list-clients",
15
- description: `List clients
14
+ name: "admin-clients-list-clients",
15
+ description: `List clients
16
16
 
17
17
  Returns a list of clients.`,
18
- args,
19
- tool: async (client, args, ctx) => {
20
- const [result, apiCall] = await adminClientsListClients(
21
- client,
22
- args.request,
23
- { fetchOptions: { signal: ctx.signal } },
24
- ).$inspect();
25
-
26
- if (!result.ok) {
27
- return {
28
- content: [{ type: "text", text: result.error.message }],
29
- isError: true,
30
- };
31
- }
32
-
33
- const value = result.value;
34
-
35
- const formattedResult = await formatResult(value, apiCall);
36
-
37
- return formattedResult;
38
- },
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await adminClientsListClients(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
39
37
  };
@@ -2,14 +2,14 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { authGetV1Me } from "../../funcs/authGetV1Me.js";
5
+ import { authMe } from "../../funcs/authMe.js";
6
6
  import { formatResult, ToolDefinition } from "../tools.js";
7
7
 
8
- export const tool$authGetV1Me: ToolDefinition = {
9
- name: "auth-get-v1-me",
8
+ export const tool$authMe: ToolDefinition = {
9
+ name: "auth-me",
10
10
  description: `Me`,
11
11
  tool: async (client, ctx) => {
12
- const [result, apiCall] = await authGetV1Me(
12
+ const [result, apiCall] = await authMe(
13
13
  client,
14
14
  { fetchOptions: { signal: ctx.signal } },
15
15
  ).$inspect();
@@ -2,14 +2,14 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { healthCheckGetV1 } from "../../funcs/healthCheckGetV1.js";
5
+ import { healthIndex } from "../../funcs/healthIndex.js";
6
6
  import { formatResult, ToolDefinition } from "../tools.js";
7
7
 
8
- export const tool$healthCheckGetV1: ToolDefinition = {
9
- name: "health-check-get-v1",
8
+ export const tool$healthIndex: ToolDefinition = {
9
+ name: "health-index",
10
10
  description: `Index`,
11
11
  tool: async (client, ctx) => {
12
- const [result, apiCall] = await healthCheckGetV1(
12
+ const [result, apiCall] = await healthIndex(
13
13
  client,
14
14
  { fetchOptions: { signal: ctx.signal } },
15
15
  ).$inspect();
@@ -2,14 +2,14 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { healthCheckGetV1Ping } from "../../funcs/healthCheckGetV1Ping.js";
5
+ import { healthPing } from "../../funcs/healthPing.js";
6
6
  import { formatResult, ToolDefinition } from "../tools.js";
7
7
 
8
- export const tool$healthCheckGetV1Ping: ToolDefinition = {
9
- name: "health-check-get-v1-ping",
10
- description: `Ping`,
8
+ export const tool$healthPing: ToolDefinition = {
9
+ name: "health-ping",
10
+ description: `Ping Pong`,
11
11
  tool: async (client, ctx) => {
12
- const [result, apiCall] = await healthCheckGetV1Ping(
12
+ const [result, apiCall] = await healthPing(
13
13
  client,
14
14
  { fetchOptions: { signal: ctx.signal } },
15
15
  ).$inspect();
@@ -7,7 +7,7 @@ import { ListTasksRequest$zodSchema } from "../../models/listtasksop.js";
7
7
  import { formatResult, ToolDefinition } from "../tools.js";
8
8
 
9
9
  const args = {
10
- request: ListTasksRequest$zodSchema.optional(),
10
+ request: ListTasksRequest$zodSchema,
11
11
  };
12
12
 
13
13
  export const tool$tasksListTasks: ToolDefinition<typeof args> = {
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { workspacesCreateWorkspace } from "../../funcs/workspacesCreateWorkspace.js";
6
+ import { CreateWorkspaceRequest$zodSchema } from "../../models/createworkspaceop.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: CreateWorkspaceRequest$zodSchema,
11
+ };
12
+
13
+ export const tool$workspacesCreateWorkspace: ToolDefinition<typeof args> = {
14
+ name: "workspaces-create-workspace",
15
+ description: `Create a workspace
16
+
17
+ Creates a new workspace and returns the created workspace object.`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await workspacesCreateWorkspace(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -5,9 +5,9 @@
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
7
7
  import {
8
- CallToolResult,
9
- ServerNotification,
10
- ServerRequest,
8
+ CallToolResult,
9
+ ServerNotification,
10
+ ServerRequest,
11
11
  } from "@modelcontextprotocol/sdk/types.js";
12
12
  import { objectOutputType, ZodRawShape, ZodTypeAny } from "zod";
13
13
  import { SteuerboardCore } from "../core.js";
@@ -16,120 +16,118 @@ import { MCPScope } from "./scopes.js";
16
16
  import { isAsyncIterable, isBinaryData, valueToBase64 } from "./shared.js";
17
17
 
18
18
  export type ToolDefinition<Args extends undefined | ZodRawShape = undefined> =
19
- Args extends ZodRawShape
20
- ? {
21
- name: string;
22
- description: string;
23
- scopes?: MCPScope[];
24
- args: Args;
25
- tool: (
26
- client: SteuerboardCore,
27
- args: objectOutputType<Args, ZodTypeAny>,
28
- extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
29
- ) => CallToolResult | Promise<CallToolResult>;
30
- }
31
- : {
32
- name: string;
33
- description: string;
34
- scopes?: MCPScope[];
35
- args?: undefined;
36
- tool: (
37
- client: SteuerboardCore,
38
- extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
39
- ) => CallToolResult | Promise<CallToolResult>;
40
- };
19
+ Args extends ZodRawShape ? {
20
+ name: string;
21
+ description: string;
22
+ scopes?: MCPScope[];
23
+ args: Args;
24
+ tool: (
25
+ client: SteuerboardCore,
26
+ args: objectOutputType<Args, ZodTypeAny>,
27
+ extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
28
+ ) => CallToolResult | Promise<CallToolResult>;
29
+ }
30
+ : {
31
+ name: string;
32
+ description: string;
33
+ scopes?: MCPScope[];
34
+ args?: undefined;
35
+ tool: (
36
+ client: SteuerboardCore,
37
+ extra: RequestHandlerExtra<ServerRequest, ServerNotification>,
38
+ ) => CallToolResult | Promise<CallToolResult>;
39
+ };
41
40
 
42
41
  // Optional function to assist with formatting tool results
43
42
  export async function formatResult(
44
- value: unknown,
45
- init: { response?: Response | undefined },
43
+ value: unknown,
44
+ init: { response?: Response | undefined },
46
45
  ): Promise<CallToolResult> {
47
- if (typeof value === "undefined") {
48
- return { content: [] };
49
- }
46
+ if (typeof value === "undefined") {
47
+ return { content: [] };
48
+ }
50
49
 
51
- const { response } = init;
52
- const contentType = response?.headers.get("content-type") ?? "";
53
- let content: CallToolResult["content"] = [];
50
+ const { response } = init;
51
+ const contentType = response?.headers.get("content-type") ?? "";
52
+ let content: CallToolResult["content"] = [];
54
53
 
55
- if (/\bjson\b/i.test(contentType)) {
56
- content = [{ type: "text", text: JSON.stringify(value) }];
57
- } else if (
58
- contentType.startsWith("text/event-stream") &&
59
- isAsyncIterable(value)
60
- ) {
61
- content = await consumeSSE(value);
62
- } else if (contentType.startsWith("text/") && typeof value === "string") {
63
- content = [{ type: "text", text: value }];
64
- } else if (isBinaryData(value) && contentType.startsWith("image/")) {
65
- const data = await valueToBase64(value);
66
- content =
67
- data == null ? [] : [{ type: "image", data, mimeType: contentType }];
68
- } else {
69
- return {
70
- content: [
71
- {
72
- type: "text",
73
- text: `Unsupported content type: "${contentType}"`,
74
- },
75
- ],
76
- isError: true,
77
- };
78
- }
54
+ if (contentType.search(/\bjson\b/g)) {
55
+ content = [{ type: "text", text: JSON.stringify(value) }];
56
+ } else if (
57
+ contentType.startsWith("text/event-stream")
58
+ && isAsyncIterable(value)
59
+ ) {
60
+ content = await consumeSSE(value);
61
+ } else if (contentType.startsWith("text/") && typeof value === "string") {
62
+ content = [{ type: "text", text: value }];
63
+ } else if (isBinaryData(value) && contentType.startsWith("image/")) {
64
+ const data = await valueToBase64(value);
65
+ content = data == null
66
+ ? []
67
+ : [{ type: "image", data, mimeType: contentType }];
68
+ } else {
69
+ return {
70
+ content: [{
71
+ type: "text",
72
+ text: `Unsupported content type: "${contentType}"`,
73
+ }],
74
+ isError: true,
75
+ };
76
+ }
79
77
 
80
- return { content };
78
+ return { content };
81
79
  }
82
80
 
83
81
  async function consumeSSE(
84
- value: AsyncIterable<unknown>,
82
+ value: AsyncIterable<unknown>,
85
83
  ): Promise<CallToolResult["content"]> {
86
- const content: CallToolResult["content"] = [];
84
+ const content: CallToolResult["content"] = [];
87
85
 
88
- for await (const chunk of value) {
89
- if (typeof chunk === "string") {
90
- content.push({ type: "text", text: chunk });
91
- } else {
92
- content.push({ type: "text", text: JSON.stringify(chunk) });
93
- }
94
- }
86
+ for await (const chunk of value) {
87
+ if (typeof chunk === "string") {
88
+ content.push({ type: "text", text: chunk });
89
+ } else {
90
+ content.push({ type: "text", text: JSON.stringify(chunk) });
91
+ }
92
+ }
95
93
 
96
- return content;
94
+ return content;
97
95
  }
98
96
 
99
97
  export function createRegisterTool(
100
- logger: ConsoleLogger,
101
- server: McpServer,
102
- getSDK: () => SteuerboardCore,
103
- allowedScopes: Set<MCPScope>,
104
- allowedTools?: Set<string>,
98
+ logger: ConsoleLogger,
99
+ server: McpServer,
100
+ getSDK: () => SteuerboardCore,
101
+ allowedScopes: Set<MCPScope>,
102
+ allowedTools?: Set<string>,
105
103
  ): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
106
- return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
107
- if (allowedTools && !allowedTools.has(tool.name)) {
108
- return;
109
- }
104
+ return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
105
+ if (allowedTools && !allowedTools.has(tool.name)) {
106
+ return;
107
+ }
110
108
 
111
- const scopes = tool.scopes ?? [];
112
- if (allowedScopes.size > 0 && scopes.length === 0) {
113
- return;
114
- }
109
+ const scopes = tool.scopes ?? [];
110
+ if (allowedScopes.size > 0 && scopes.length === 0) {
111
+ return;
112
+ }
115
113
 
116
- if (
117
- allowedScopes.size > 0 &&
118
- !scopes.every((s: MCPScope) => allowedScopes.has(s))
119
- ) {
120
- return;
121
- }
114
+ if (
115
+ allowedScopes.size > 0
116
+ && !scopes.every((s: MCPScope) => allowedScopes.has(s))
117
+ ) {
118
+ return;
119
+ }
122
120
 
123
- if (tool.args) {
124
- server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
125
- return tool.tool(getSDK(), args, ctx);
126
- });
127
- } else {
128
- server.tool(tool.name, tool.description, async (ctx) => {
129
- return tool.tool(getSDK(), ctx);
130
- });
131
- }
121
+ if (tool.args) {
122
+ server.tool(tool.name, tool.description, tool.args, async (args, ctx) => {
123
+ return tool.tool(getSDK(), args, ctx);
124
+ });
125
+ } else {
126
+ server.tool(tool.name, tool.description, async (ctx) => {
127
+ return tool.tool(getSDK(), ctx);
128
+ });
129
+ }
132
130
 
133
- logger.debug("Registered tool", { name: tool.name });
134
- };
131
+ logger.debug("Registered tool", { name: tool.name });
132
+ };
135
133
  }
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export const AuthErrorType$zodSchema = z.enum([
8
+ "auth_error",
9
+ ]);
10
+
11
+ export type AuthErrorType = z.infer<typeof AuthErrorType$zodSchema>;
12
+
13
+ export const AuthErrorCode$zodSchema = z.enum([
14
+ "unauthorized",
15
+ ]);
16
+
17
+ export type AuthErrorCode = z.infer<typeof AuthErrorCode$zodSchema>;
18
+
19
+ export type AuthError = {
20
+ status_code: number;
21
+ type: AuthErrorType;
22
+ code: AuthErrorCode;
23
+ message: string;
24
+ };
25
+
26
+ export const AuthError$zodSchema: z.ZodType<AuthError, z.ZodTypeDef, unknown> =
27
+ z.object({
28
+ code: AuthErrorCode$zodSchema,
29
+ message: z.string(),
30
+ status_code: z.number(),
31
+ type: AuthErrorType$zodSchema,
32
+ });
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ export const BadRequestType$zodSchema = z.enum([
8
+ "bad_request",
9
+ ]);
10
+
11
+ export type BadRequestType = z.infer<typeof BadRequestType$zodSchema>;
12
+
13
+ export const BadRequestCode$zodSchema = z.enum([
14
+ "missing_client_id",
15
+ ]);
16
+
17
+ export type BadRequestCode = z.infer<typeof BadRequestCode$zodSchema>;
18
+
19
+ export type BadRequest = {
20
+ status_code: number;
21
+ type: BadRequestType;
22
+ code: BadRequestCode;
23
+ message: string;
24
+ };
25
+
26
+ export const BadRequest$zodSchema: z.ZodType<
27
+ BadRequest,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ code: BadRequestCode$zodSchema,
32
+ message: z.string(),
33
+ status_code: z.number(),
34
+ type: BadRequestType$zodSchema,
35
+ });
@@ -5,21 +5,23 @@
5
5
  import * as z from "zod";
6
6
 
7
7
  /**
8
- * The type of the client
8
+ * The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
9
9
  */
10
- export const Type$zodSchema = z.enum([
10
+ export const ClientClientType$zodSchema = z.enum([
11
11
  "natural_person",
12
12
  "individual_enterprise",
13
13
  "legal_person",
14
- ]).describe("The type of the client");
14
+ ]).describe(
15
+ "The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
16
+ );
15
17
 
16
- export type Type = z.infer<typeof Type$zodSchema>;
18
+ export type ClientClientType = z.infer<typeof ClientClientType$zodSchema>;
17
19
 
18
20
  export type Client = {
19
21
  id: string;
20
22
  name: string;
21
23
  slug: string;
22
- type: Type;
24
+ type: ClientClientType;
23
25
  customId: string | null;
24
26
  legalName: string | null;
25
27
  archivedAt: string | null;
@@ -38,6 +40,6 @@ export const Client$zodSchema: z.ZodType<Client, z.ZodTypeDef, unknown> = z
38
40
  legalName: z.string().nullable(),
39
41
  name: z.string(),
40
42
  slug: z.string(),
41
- type: Type$zodSchema,
43
+ type: ClientClientType$zodSchema,
42
44
  updatedAt: z.string(),
43
45
  });
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+
7
+ /**
8
+ * The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.
9
+ */
10
+ export const ClientCreateClientType$zodSchema = z.enum([
11
+ "natural_person",
12
+ "individual_enterprise",
13
+ "legal_person",
14
+ ]).describe(
15
+ "The type of the client. 'natural_person' for individuals, 'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and 'individual_enterprise' for sole proprietorships.",
16
+ );
17
+
18
+ export type ClientCreateClientType = z.infer<
19
+ typeof ClientCreateClientType$zodSchema
20
+ >;
21
+
22
+ /**
23
+ * The address of the client
24
+ */
25
+ export type Address = {
26
+ line1: string;
27
+ line2?: string | undefined;
28
+ city: string;
29
+ postalCode: string;
30
+ countryCode?: string | undefined;
31
+ };
32
+
33
+ export const Address$zodSchema: z.ZodType<Address, z.ZodTypeDef, unknown> = z
34
+ .object({
35
+ city: z.string(),
36
+ countryCode: z.string().default("DE"),
37
+ line1: z.string(),
38
+ line2: z.string().optional(),
39
+ postalCode: z.string(),
40
+ }).describe("The address of the client");
41
+
42
+ export type ClientCreate = {
43
+ name: string;
44
+ type: ClientCreateClientType;
45
+ customId?: string | undefined;
46
+ address?: Address | undefined;
47
+ };
48
+
49
+ export const ClientCreate$zodSchema: z.ZodType<
50
+ ClientCreate,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({
54
+ address: z.lazy(() => Address$zodSchema).optional(),
55
+ customId: z.string().optional(),
56
+ name: z.string(),
57
+ type: ClientCreateClientType$zodSchema,
58
+ });