@composio/client 0.1.0-alpha.7 → 0.1.0-alpha.70

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 (758) hide show
  1. package/CHANGELOG.md +963 -0
  2. package/LICENSE +1 -1
  3. package/README.md +22 -35
  4. package/api-promise.js +2 -15
  5. package/api-promise.js.map +1 -1
  6. package/client.d.mts +85 -43
  7. package/client.d.mts.map +1 -1
  8. package/client.d.ts +85 -43
  9. package/client.d.ts.map +1 -1
  10. package/client.js +162 -108
  11. package/client.js.map +1 -1
  12. package/client.mjs +144 -67
  13. package/client.mjs.map +1 -1
  14. package/core/api-promise.d.mts +0 -1
  15. package/core/api-promise.d.mts.map +1 -1
  16. package/core/api-promise.d.ts +0 -1
  17. package/core/api-promise.d.ts.map +1 -1
  18. package/core/api-promise.js +4 -14
  19. package/core/api-promise.js.map +1 -1
  20. package/core/api-promise.mjs +1 -11
  21. package/core/api-promise.mjs.map +1 -1
  22. package/core/error.d.mts +0 -1
  23. package/core/error.d.mts.map +1 -1
  24. package/core/error.d.ts +0 -1
  25. package/core/error.d.ts.map +1 -1
  26. package/core/error.js.map +1 -1
  27. package/core/error.mjs.map +1 -1
  28. package/core/resource.d.mts +1 -1
  29. package/core/resource.d.mts.map +1 -1
  30. package/core/resource.d.ts +1 -1
  31. package/core/resource.d.ts.map +1 -1
  32. package/core/resource.js.map +1 -1
  33. package/core/resource.mjs.map +1 -1
  34. package/error.js +2 -15
  35. package/error.js.map +1 -1
  36. package/internal/builtin-types.d.mts +0 -2
  37. package/internal/builtin-types.d.mts.map +1 -1
  38. package/internal/builtin-types.d.ts +0 -2
  39. package/internal/builtin-types.d.ts.map +1 -1
  40. package/internal/detect-platform.js +3 -3
  41. package/internal/detect-platform.js.map +1 -1
  42. package/internal/detect-platform.mjs +3 -3
  43. package/internal/detect-platform.mjs.map +1 -1
  44. package/internal/errors.d.mts.map +1 -1
  45. package/internal/errors.d.ts.map +1 -1
  46. package/internal/errors.js +2 -2
  47. package/internal/errors.js.map +1 -1
  48. package/internal/errors.mjs.map +1 -1
  49. package/internal/headers.d.mts +1 -2
  50. package/internal/headers.d.mts.map +1 -1
  51. package/internal/headers.d.ts +1 -2
  52. package/internal/headers.d.ts.map +1 -1
  53. package/internal/headers.js +7 -5
  54. package/internal/headers.js.map +1 -1
  55. package/internal/headers.mjs +7 -5
  56. package/internal/headers.mjs.map +1 -1
  57. package/internal/parse.d.mts +0 -1
  58. package/internal/parse.d.mts.map +1 -1
  59. package/internal/parse.d.ts +0 -1
  60. package/internal/parse.d.ts.map +1 -1
  61. package/internal/parse.js +6 -2
  62. package/internal/parse.js.map +1 -1
  63. package/internal/parse.mjs +5 -0
  64. package/internal/parse.mjs.map +1 -1
  65. package/internal/qs/formats.d.mts +1 -0
  66. package/internal/qs/formats.d.mts.map +1 -1
  67. package/internal/qs/formats.d.ts +1 -0
  68. package/internal/qs/formats.d.ts.map +1 -1
  69. package/internal/qs/formats.js +4 -2
  70. package/internal/qs/formats.js.map +1 -1
  71. package/internal/qs/formats.mjs +2 -1
  72. package/internal/qs/formats.mjs.map +1 -1
  73. package/internal/qs/stringify.d.mts.map +1 -1
  74. package/internal/qs/stringify.d.ts.map +1 -1
  75. package/internal/qs/stringify.js +16 -19
  76. package/internal/qs/stringify.js.map +1 -1
  77. package/internal/qs/stringify.mjs +17 -19
  78. package/internal/qs/stringify.mjs.map +1 -1
  79. package/internal/qs/utils.d.mts +1 -0
  80. package/internal/qs/utils.d.mts.map +1 -1
  81. package/internal/qs/utils.d.ts +1 -0
  82. package/internal/qs/utils.d.ts.map +1 -1
  83. package/internal/qs/utils.js +22 -21
  84. package/internal/qs/utils.js.map +1 -1
  85. package/internal/qs/utils.mjs +12 -12
  86. package/internal/qs/utils.mjs.map +1 -1
  87. package/internal/request-options.d.mts +43 -1
  88. package/internal/request-options.d.mts.map +1 -1
  89. package/internal/request-options.d.ts +43 -1
  90. package/internal/request-options.d.ts.map +1 -1
  91. package/internal/request-options.js.map +1 -1
  92. package/internal/request-options.mjs.map +1 -1
  93. package/internal/shim-types.d.mts +11 -22
  94. package/internal/shim-types.d.mts.map +1 -0
  95. package/internal/shim-types.d.ts +11 -22
  96. package/internal/shim-types.d.ts.map +1 -0
  97. package/internal/shim-types.js +4 -0
  98. package/internal/shim-types.js.map +1 -0
  99. package/{resources/org.mjs → internal/shim-types.mjs} +2 -2
  100. package/internal/shim-types.mjs.map +1 -0
  101. package/internal/shims.d.mts +2 -2
  102. package/internal/shims.d.mts.map +1 -1
  103. package/internal/shims.d.ts +2 -2
  104. package/internal/shims.d.ts.map +1 -1
  105. package/internal/shims.js +5 -6
  106. package/internal/shims.js.map +1 -1
  107. package/internal/shims.mjs.map +1 -1
  108. package/internal/to-file.d.mts +1 -2
  109. package/internal/to-file.d.mts.map +1 -1
  110. package/internal/to-file.d.ts +1 -2
  111. package/internal/to-file.d.ts.map +1 -1
  112. package/internal/to-file.js +5 -5
  113. package/internal/to-file.js.map +1 -1
  114. package/internal/to-file.mjs +4 -3
  115. package/internal/to-file.mjs.map +1 -1
  116. package/internal/tslib.js +81 -0
  117. package/internal/tslib.mjs +17 -0
  118. package/internal/types.d.mts +12 -11
  119. package/internal/types.d.mts.map +1 -1
  120. package/internal/types.d.ts +12 -11
  121. package/internal/types.d.ts.map +1 -1
  122. package/internal/uploads.d.mts +1 -3
  123. package/internal/uploads.d.mts.map +1 -1
  124. package/internal/uploads.d.ts +1 -3
  125. package/internal/uploads.d.ts.map +1 -1
  126. package/internal/uploads.js +17 -7
  127. package/internal/uploads.js.map +1 -1
  128. package/internal/uploads.mjs +13 -4
  129. package/internal/uploads.mjs.map +1 -1
  130. package/internal/utils/base64.d.mts.map +1 -1
  131. package/internal/utils/base64.d.ts.map +1 -1
  132. package/internal/utils/base64.js +12 -7
  133. package/internal/utils/base64.js.map +1 -1
  134. package/internal/utils/base64.mjs +12 -7
  135. package/internal/utils/base64.mjs.map +1 -1
  136. package/internal/utils/bytes.d.mts +4 -0
  137. package/internal/utils/bytes.d.mts.map +1 -0
  138. package/internal/utils/bytes.d.ts +4 -0
  139. package/internal/utils/bytes.d.ts.map +1 -0
  140. package/internal/utils/bytes.js +31 -0
  141. package/internal/utils/bytes.js.map +1 -0
  142. package/internal/utils/bytes.mjs +26 -0
  143. package/internal/utils/bytes.mjs.map +1 -0
  144. package/internal/utils/env.d.mts.map +1 -1
  145. package/internal/utils/env.d.ts.map +1 -1
  146. package/internal/utils/env.js +2 -2
  147. package/internal/utils/env.js.map +1 -1
  148. package/internal/utils/env.mjs +2 -2
  149. package/internal/utils/env.mjs.map +1 -1
  150. package/internal/utils/log.d.mts +0 -1
  151. package/internal/utils/log.d.mts.map +1 -1
  152. package/internal/utils/log.d.ts +0 -1
  153. package/internal/utils/log.d.ts.map +1 -1
  154. package/internal/utils/log.js +3 -3
  155. package/internal/utils/log.js.map +1 -1
  156. package/internal/utils/log.mjs +1 -1
  157. package/internal/utils/log.mjs.map +1 -1
  158. package/internal/utils/path.d.mts.map +1 -1
  159. package/internal/utils/path.d.ts.map +1 -1
  160. package/internal/utils/path.js +28 -7
  161. package/internal/utils/path.js.map +1 -1
  162. package/internal/utils/path.mjs +27 -6
  163. package/internal/utils/path.mjs.map +1 -1
  164. package/internal/utils/query.d.mts +2 -0
  165. package/internal/utils/query.d.mts.map +1 -0
  166. package/internal/utils/query.d.ts +2 -0
  167. package/internal/utils/query.d.ts.map +1 -0
  168. package/internal/utils/query.js +10 -0
  169. package/internal/utils/query.js.map +1 -0
  170. package/internal/utils/query.mjs +6 -0
  171. package/internal/utils/query.mjs.map +1 -0
  172. package/internal/utils/sleep.d.mts.map +1 -1
  173. package/internal/utils/sleep.d.ts.map +1 -1
  174. package/internal/utils/uuid.d.mts +1 -1
  175. package/internal/utils/uuid.d.mts.map +1 -1
  176. package/internal/utils/uuid.d.ts +1 -1
  177. package/internal/utils/uuid.d.ts.map +1 -1
  178. package/internal/utils/uuid.js +1 -2
  179. package/internal/utils/uuid.js.map +1 -1
  180. package/internal/utils/uuid.mjs +1 -2
  181. package/internal/utils/uuid.mjs.map +1 -1
  182. package/internal/utils/values.d.mts +2 -0
  183. package/internal/utils/values.d.mts.map +1 -1
  184. package/internal/utils/values.d.ts +2 -0
  185. package/internal/utils/values.d.ts.map +1 -1
  186. package/internal/utils/values.js +11 -8
  187. package/internal/utils/values.js.map +1 -1
  188. package/internal/utils/values.mjs +5 -3
  189. package/internal/utils/values.mjs.map +1 -1
  190. package/internal/utils.d.mts +1 -0
  191. package/internal/utils.d.ts +1 -0
  192. package/internal/utils.js +8 -20
  193. package/internal/utils.js.map +1 -1
  194. package/internal/utils.mjs +1 -0
  195. package/package.json +14 -11
  196. package/resource.js +2 -15
  197. package/resource.js.map +1 -1
  198. package/resources/auth-configs.d.mts +511 -54
  199. package/resources/auth-configs.d.mts.map +1 -1
  200. package/resources/auth-configs.d.ts +511 -54
  201. package/resources/auth-configs.d.ts.map +1 -1
  202. package/resources/auth-configs.js +79 -6
  203. package/resources/auth-configs.js.map +1 -1
  204. package/resources/auth-configs.mjs +79 -6
  205. package/resources/auth-configs.mjs.map +1 -1
  206. package/resources/cli/cli.d.mts +120 -0
  207. package/resources/cli/cli.d.mts.map +1 -0
  208. package/resources/cli/cli.d.ts +120 -0
  209. package/resources/cli/cli.d.ts.map +1 -0
  210. package/resources/cli/cli.js +36 -0
  211. package/resources/cli/cli.js.map +1 -0
  212. package/resources/cli/cli.mjs +31 -0
  213. package/resources/cli/cli.mjs.map +1 -0
  214. package/resources/cli/index.d.mts +3 -0
  215. package/resources/cli/index.d.mts.map +1 -0
  216. package/resources/cli/index.d.ts +3 -0
  217. package/resources/cli/index.d.ts.map +1 -0
  218. package/resources/cli/index.js +9 -0
  219. package/resources/cli/index.js.map +1 -0
  220. package/resources/cli/index.mjs +4 -0
  221. package/resources/cli/index.mjs.map +1 -0
  222. package/resources/cli/realtime.d.mts +56 -0
  223. package/resources/cli/realtime.d.mts.map +1 -0
  224. package/resources/cli/realtime.d.ts +56 -0
  225. package/resources/cli/realtime.d.ts.map +1 -0
  226. package/resources/cli/realtime.js +25 -0
  227. package/resources/cli/realtime.js.map +1 -0
  228. package/resources/cli/realtime.mjs +21 -0
  229. package/resources/cli/realtime.mjs.map +1 -0
  230. package/resources/cli.d.mts +1 -123
  231. package/resources/cli.d.mts.map +1 -1
  232. package/resources/cli.d.ts +1 -123
  233. package/resources/cli.d.ts.map +1 -1
  234. package/resources/cli.js +2 -14
  235. package/resources/cli.js.map +1 -1
  236. package/resources/cli.mjs +1 -12
  237. package/resources/cli.mjs.map +1 -1
  238. package/resources/connected-accounts.d.mts +9729 -223
  239. package/resources/connected-accounts.d.mts.map +1 -1
  240. package/resources/connected-accounts.d.ts +9729 -223
  241. package/resources/connected-accounts.d.ts.map +1 -1
  242. package/resources/connected-accounts.js +124 -7
  243. package/resources/connected-accounts.js.map +1 -1
  244. package/resources/connected-accounts.mjs +124 -7
  245. package/resources/connected-accounts.mjs.map +1 -1
  246. package/resources/files.d.mts +152 -0
  247. package/resources/files.d.mts.map +1 -0
  248. package/resources/files.d.ts +152 -0
  249. package/resources/files.d.ts.map +1 -0
  250. package/resources/files.js +42 -0
  251. package/resources/files.js.map +1 -0
  252. package/resources/files.mjs +38 -0
  253. package/resources/files.mjs.map +1 -0
  254. package/resources/index.d.mts +13 -12
  255. package/resources/index.d.mts.map +1 -1
  256. package/resources/index.d.ts +13 -12
  257. package/resources/index.d.ts.map +1 -1
  258. package/resources/index.js +14 -12
  259. package/resources/index.js.map +1 -1
  260. package/resources/index.mjs +7 -6
  261. package/resources/index.mjs.map +1 -1
  262. package/resources/link.d.mts +2226 -0
  263. package/resources/link.d.mts.map +1 -0
  264. package/resources/link.d.ts +2226 -0
  265. package/resources/link.d.ts.map +1 -0
  266. package/resources/link.js +19 -0
  267. package/resources/link.js.map +1 -0
  268. package/resources/link.mjs +15 -0
  269. package/resources/link.mjs.map +1 -0
  270. package/resources/logs/index.d.mts +4 -0
  271. package/resources/logs/index.d.mts.map +1 -0
  272. package/resources/logs/index.d.ts +4 -0
  273. package/resources/logs/index.d.ts.map +1 -0
  274. package/resources/logs/index.js +11 -0
  275. package/resources/logs/index.js.map +1 -0
  276. package/resources/logs/index.mjs +5 -0
  277. package/resources/logs/index.mjs.map +1 -0
  278. package/resources/logs/logs.d.mts +14 -0
  279. package/resources/logs/logs.d.mts.map +1 -0
  280. package/resources/logs/logs.d.ts +14 -0
  281. package/resources/logs/logs.d.ts.map +1 -0
  282. package/resources/logs/logs.js +21 -0
  283. package/resources/logs/logs.js.map +1 -0
  284. package/resources/logs/logs.mjs +16 -0
  285. package/resources/logs/logs.mjs.map +1 -0
  286. package/resources/logs/tools.d.mts +173 -0
  287. package/resources/logs/tools.d.mts.map +1 -0
  288. package/resources/logs/tools.d.ts +173 -0
  289. package/resources/logs/tools.d.ts.map +1 -0
  290. package/resources/logs/tools.js +35 -0
  291. package/resources/logs/tools.js.map +1 -0
  292. package/resources/logs/tools.mjs +31 -0
  293. package/resources/logs/tools.mjs.map +1 -0
  294. package/resources/logs/triggers.d.mts +161 -0
  295. package/resources/logs/triggers.d.mts.map +1 -0
  296. package/resources/logs/triggers.d.ts +161 -0
  297. package/resources/logs/triggers.d.ts.map +1 -0
  298. package/resources/logs/triggers.js +36 -0
  299. package/resources/logs/triggers.js.map +1 -0
  300. package/resources/logs/triggers.mjs +32 -0
  301. package/resources/logs/triggers.mjs.map +1 -0
  302. package/resources/logs.d.mts +2 -0
  303. package/resources/logs.d.mts.map +1 -0
  304. package/resources/logs.d.ts +2 -0
  305. package/resources/logs.d.ts.map +1 -0
  306. package/resources/logs.js +6 -0
  307. package/resources/logs.js.map +1 -0
  308. package/resources/{auth.mjs → logs.mjs} +2 -2
  309. package/resources/logs.mjs.map +1 -0
  310. package/resources/mcp/custom.d.mts +105 -0
  311. package/resources/mcp/custom.d.mts.map +1 -0
  312. package/resources/mcp/custom.d.ts +105 -0
  313. package/resources/mcp/custom.d.ts.map +1 -0
  314. package/resources/mcp/custom.js +29 -0
  315. package/resources/mcp/custom.js.map +1 -0
  316. package/resources/mcp/custom.mjs +25 -0
  317. package/resources/mcp/custom.mjs.map +1 -0
  318. package/resources/mcp/generate.d.mts +65 -0
  319. package/resources/mcp/generate.d.mts.map +1 -0
  320. package/resources/mcp/generate.d.ts +65 -0
  321. package/resources/mcp/generate.d.ts.map +1 -0
  322. package/resources/mcp/generate.js +32 -0
  323. package/resources/mcp/generate.js.map +1 -0
  324. package/resources/mcp/generate.mjs +28 -0
  325. package/resources/mcp/generate.mjs.map +1 -0
  326. package/resources/mcp/index.d.mts +3 -2
  327. package/resources/mcp/index.d.mts.map +1 -1
  328. package/resources/mcp/index.d.ts +3 -2
  329. package/resources/mcp/index.d.ts.map +1 -1
  330. package/resources/mcp/index.js +5 -3
  331. package/resources/mcp/index.js.map +1 -1
  332. package/resources/mcp/index.mjs +2 -1
  333. package/resources/mcp/index.mjs.map +1 -1
  334. package/resources/mcp/mcp.d.mts +450 -175
  335. package/resources/mcp/mcp.d.mts.map +1 -1
  336. package/resources/mcp/mcp.d.ts +450 -175
  337. package/resources/mcp/mcp.d.ts.map +1 -1
  338. package/resources/mcp/mcp.js +95 -42
  339. package/resources/mcp/mcp.js.map +1 -1
  340. package/resources/mcp/mcp.mjs +94 -19
  341. package/resources/mcp/mcp.mjs.map +1 -1
  342. package/resources/mcp.js +2 -15
  343. package/resources/mcp.js.map +1 -1
  344. package/resources/migration.d.mts +35 -0
  345. package/resources/migration.d.mts.map +1 -0
  346. package/resources/migration.d.ts +35 -0
  347. package/resources/migration.d.ts.map +1 -0
  348. package/resources/migration.js +20 -0
  349. package/resources/migration.js.map +1 -0
  350. package/resources/migration.mjs +16 -0
  351. package/resources/migration.mjs.map +1 -0
  352. package/resources/project/config.d.mts +71 -0
  353. package/resources/project/config.d.mts.map +1 -0
  354. package/resources/project/config.d.ts +71 -0
  355. package/resources/project/config.d.ts.map +1 -0
  356. package/resources/project/config.js +33 -0
  357. package/resources/project/config.js.map +1 -0
  358. package/resources/project/config.mjs +29 -0
  359. package/resources/project/config.mjs.map +1 -0
  360. package/resources/project/index.d.mts +3 -0
  361. package/resources/project/index.d.mts.map +1 -0
  362. package/resources/project/index.d.ts +3 -0
  363. package/resources/project/index.d.ts.map +1 -0
  364. package/resources/project/index.js +9 -0
  365. package/resources/project/index.js.map +1 -0
  366. package/resources/project/index.mjs +4 -0
  367. package/resources/project/index.mjs.map +1 -0
  368. package/resources/project/project.d.mts +10 -0
  369. package/resources/project/project.d.mts.map +1 -0
  370. package/resources/project/project.d.ts +10 -0
  371. package/resources/project/project.d.ts.map +1 -0
  372. package/resources/project/project.js +17 -0
  373. package/resources/project/project.js.map +1 -0
  374. package/resources/project/project.mjs +12 -0
  375. package/resources/project/project.mjs.map +1 -0
  376. package/resources/{org/project.d.mts.map → project.d.mts.map} +1 -1
  377. package/resources/{org/project.d.ts.map → project.d.ts.map} +1 -1
  378. package/resources/project.js +6 -0
  379. package/resources/project.js.map +1 -0
  380. package/resources/project.mjs.map +1 -0
  381. package/resources/tool-router/index.d.mts +3 -0
  382. package/resources/tool-router/index.d.mts.map +1 -0
  383. package/resources/tool-router/index.d.ts +3 -0
  384. package/resources/tool-router/index.d.ts.map +1 -0
  385. package/resources/tool-router/index.js +9 -0
  386. package/resources/tool-router/index.js.map +1 -0
  387. package/resources/tool-router/index.mjs +4 -0
  388. package/resources/tool-router/index.mjs.map +1 -0
  389. package/resources/tool-router/session/files.d.mts +205 -0
  390. package/resources/tool-router/session/files.d.mts.map +1 -0
  391. package/resources/tool-router/session/files.d.ts +205 -0
  392. package/resources/tool-router/session/files.d.ts.map +1 -0
  393. package/resources/tool-router/session/files.js +98 -0
  394. package/resources/tool-router/session/files.js.map +1 -0
  395. package/resources/tool-router/session/files.mjs +94 -0
  396. package/resources/tool-router/session/files.mjs.map +1 -0
  397. package/resources/tool-router/session/index.d.mts +3 -0
  398. package/resources/tool-router/session/index.d.mts.map +1 -0
  399. package/resources/tool-router/session/index.d.ts +3 -0
  400. package/resources/tool-router/session/index.d.ts.map +1 -0
  401. package/resources/{auth → tool-router/session}/index.js +3 -3
  402. package/resources/tool-router/session/index.js.map +1 -0
  403. package/resources/tool-router/session/index.mjs +4 -0
  404. package/resources/tool-router/session/index.mjs.map +1 -0
  405. package/resources/tool-router/session/session.d.mts +3978 -0
  406. package/resources/tool-router/session/session.d.mts.map +1 -0
  407. package/resources/tool-router/session/session.d.ts +3978 -0
  408. package/resources/tool-router/session/session.d.ts.map +1 -0
  409. package/resources/tool-router/session/session.js +224 -0
  410. package/resources/tool-router/session/session.js.map +1 -0
  411. package/resources/tool-router/session/session.mjs +219 -0
  412. package/resources/tool-router/session/session.mjs.map +1 -0
  413. package/resources/tool-router/session.d.mts +2 -0
  414. package/resources/tool-router/session.d.mts.map +1 -0
  415. package/resources/tool-router/session.d.ts +2 -0
  416. package/resources/tool-router/session.d.ts.map +1 -0
  417. package/resources/tool-router/session.js +6 -0
  418. package/resources/tool-router/session.js.map +1 -0
  419. package/resources/tool-router/session.mjs +3 -0
  420. package/resources/tool-router/session.mjs.map +1 -0
  421. package/resources/tool-router/tool-router.d.mts +94 -0
  422. package/resources/tool-router/tool-router.d.mts.map +1 -0
  423. package/resources/tool-router/tool-router.d.ts +94 -0
  424. package/resources/tool-router/tool-router.d.ts.map +1 -0
  425. package/resources/tool-router/tool-router.js +49 -0
  426. package/resources/tool-router/tool-router.js.map +1 -0
  427. package/resources/tool-router/tool-router.mjs +44 -0
  428. package/resources/tool-router/tool-router.mjs.map +1 -0
  429. package/resources/tool-router.d.mts +2 -0
  430. package/resources/tool-router.d.mts.map +1 -0
  431. package/resources/tool-router.d.ts +2 -0
  432. package/resources/tool-router.d.ts.map +1 -0
  433. package/resources/tool-router.js +6 -0
  434. package/resources/tool-router.js.map +1 -0
  435. package/resources/tool-router.mjs +3 -0
  436. package/resources/tool-router.mjs.map +1 -0
  437. package/resources/toolkits.d.mts +314 -6
  438. package/resources/toolkits.d.mts.map +1 -1
  439. package/resources/toolkits.d.ts +314 -6
  440. package/resources/toolkits.d.ts.map +1 -1
  441. package/resources/toolkits.js +25 -4
  442. package/resources/toolkits.js.map +1 -1
  443. package/resources/toolkits.mjs +25 -4
  444. package/resources/toolkits.mjs.map +1 -1
  445. package/resources/tools.d.mts +1401 -41
  446. package/resources/tools.d.mts.map +1 -1
  447. package/resources/tools.d.ts +1401 -41
  448. package/resources/tools.d.ts.map +1 -1
  449. package/resources/tools.js +88 -9
  450. package/resources/tools.js.map +1 -1
  451. package/resources/tools.mjs +88 -9
  452. package/resources/tools.mjs.map +1 -1
  453. package/resources/trigger-instances/index.d.mts +2 -2
  454. package/resources/trigger-instances/index.d.mts.map +1 -1
  455. package/resources/trigger-instances/index.d.ts +2 -2
  456. package/resources/trigger-instances/index.d.ts.map +1 -1
  457. package/resources/trigger-instances/index.js +3 -3
  458. package/resources/trigger-instances/index.js.map +1 -1
  459. package/resources/trigger-instances/index.mjs +1 -1
  460. package/resources/trigger-instances/index.mjs.map +1 -1
  461. package/resources/trigger-instances/manage.d.mts +55 -0
  462. package/resources/trigger-instances/manage.d.mts.map +1 -0
  463. package/resources/trigger-instances/manage.d.ts +55 -0
  464. package/resources/trigger-instances/manage.d.ts.map +1 -0
  465. package/resources/trigger-instances/manage.js +45 -0
  466. package/resources/trigger-instances/manage.js.map +1 -0
  467. package/resources/trigger-instances/manage.mjs +41 -0
  468. package/resources/trigger-instances/manage.mjs.map +1 -0
  469. package/resources/trigger-instances/trigger-instances.d.mts +190 -43
  470. package/resources/trigger-instances/trigger-instances.d.mts.map +1 -1
  471. package/resources/trigger-instances/trigger-instances.d.ts +190 -43
  472. package/resources/trigger-instances/trigger-instances.d.ts.map +1 -1
  473. package/resources/trigger-instances/trigger-instances.js +36 -37
  474. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  475. package/resources/trigger-instances/trigger-instances.mjs +35 -14
  476. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  477. package/resources/trigger-instances.js +2 -15
  478. package/resources/trigger-instances.js.map +1 -1
  479. package/resources/triggers-types.d.mts +148 -12
  480. package/resources/triggers-types.d.mts.map +1 -1
  481. package/resources/triggers-types.d.ts +148 -12
  482. package/resources/triggers-types.d.ts.map +1 -1
  483. package/resources/triggers-types.js +19 -4
  484. package/resources/triggers-types.js.map +1 -1
  485. package/resources/triggers-types.mjs +19 -4
  486. package/resources/triggers-types.mjs.map +1 -1
  487. package/resources.js +2 -15
  488. package/resources.js.map +1 -1
  489. package/src/client.ts +239 -131
  490. package/src/core/resource.ts +1 -1
  491. package/src/internal/detect-platform.ts +3 -3
  492. package/src/internal/headers.ts +9 -8
  493. package/src/internal/parse.ts +6 -0
  494. package/src/internal/qs/formats.ts +2 -1
  495. package/src/internal/qs/stringify.ts +17 -20
  496. package/src/internal/qs/utils.ts +14 -14
  497. package/src/internal/request-options.ts +54 -0
  498. package/src/internal/shim-types.ts +26 -0
  499. package/src/internal/shims.ts +2 -2
  500. package/src/internal/to-file.ts +5 -3
  501. package/src/internal/types.ts +13 -12
  502. package/src/internal/uploads.ts +17 -5
  503. package/src/internal/utils/base64.ts +13 -10
  504. package/src/internal/utils/bytes.ts +32 -0
  505. package/src/internal/utils/env.ts +2 -2
  506. package/src/internal/utils/log.ts +1 -1
  507. package/src/internal/utils/path.ts +33 -8
  508. package/src/internal/utils/query.ts +7 -0
  509. package/src/internal/utils/uuid.ts +1 -3
  510. package/src/internal/utils/values.ts +6 -3
  511. package/src/internal/utils.ts +1 -0
  512. package/src/resources/auth-configs.ts +587 -73
  513. package/src/resources/cli/cli.ts +163 -0
  514. package/src/resources/cli/index.ts +15 -0
  515. package/src/resources/cli/realtime.ts +75 -0
  516. package/src/resources/cli.ts +1 -164
  517. package/src/resources/connected-accounts.ts +18343 -460
  518. package/src/resources/files.ts +197 -0
  519. package/src/resources/index.ts +30 -28
  520. package/src/resources/link.ts +4215 -0
  521. package/src/resources/logs/index.ts +10 -0
  522. package/src/resources/logs/logs.ts +31 -0
  523. package/src/resources/logs/tools.ts +239 -0
  524. package/src/resources/logs/triggers.ts +241 -0
  525. package/src/resources/{auth.ts → logs.ts} +1 -1
  526. package/src/resources/mcp/custom.ts +125 -0
  527. package/src/resources/mcp/generate.ts +77 -0
  528. package/src/resources/mcp/index.ts +3 -3
  529. package/src/resources/mcp/mcp.ts +490 -203
  530. package/src/resources/migration.ts +49 -0
  531. package/src/resources/project/config.ts +110 -0
  532. package/src/resources/project/index.ts +9 -0
  533. package/src/resources/project/project.ts +20 -0
  534. package/src/resources/tool-router/index.ts +33 -0
  535. package/src/resources/tool-router/session/files.ts +284 -0
  536. package/src/resources/tool-router/session/index.ts +39 -0
  537. package/src/resources/tool-router/session/session.ts +4983 -0
  538. package/src/resources/{org.ts → tool-router/session.ts} +1 -1
  539. package/src/resources/tool-router/tool-router.ts +168 -0
  540. package/src/resources/tool-router.ts +3 -0
  541. package/src/resources/toolkits.ts +361 -10
  542. package/src/resources/tools.ts +2172 -63
  543. package/src/resources/trigger-instances/index.ts +5 -9
  544. package/src/resources/trigger-instances/manage.ts +75 -0
  545. package/src/resources/trigger-instances/trigger-instances.ts +206 -69
  546. package/src/resources/triggers-types.ts +154 -16
  547. package/src/version.ts +1 -1
  548. package/uploads.js +2 -15
  549. package/uploads.js.map +1 -1
  550. package/version.d.mts +1 -1
  551. package/version.d.mts.map +1 -1
  552. package/version.d.ts +1 -1
  553. package/version.d.ts.map +1 -1
  554. package/version.js +1 -1
  555. package/version.js.map +1 -1
  556. package/version.mjs +1 -1
  557. package/version.mjs.map +1 -1
  558. package/internal/shims/crypto.d.mts +0 -13
  559. package/internal/shims/crypto.d.mts.map +0 -1
  560. package/internal/shims/crypto.d.ts +0 -13
  561. package/internal/shims/crypto.d.ts.map +0 -1
  562. package/internal/shims/crypto.js +0 -13
  563. package/internal/shims/crypto.js.map +0 -1
  564. package/internal/shims/crypto.mjs +0 -9
  565. package/internal/shims/crypto.mjs.map +0 -1
  566. package/internal/shims/file.d.mts +0 -23
  567. package/internal/shims/file.d.mts.map +0 -1
  568. package/internal/shims/file.d.ts +0 -23
  569. package/internal/shims/file.d.ts.map +0 -1
  570. package/internal/shims/file.js +0 -16
  571. package/internal/shims/file.js.map +0 -1
  572. package/internal/shims/file.mjs +0 -12
  573. package/internal/shims/file.mjs.map +0 -1
  574. package/internal/shims/getBuiltinModule.d.mts +0 -11
  575. package/internal/shims/getBuiltinModule.d.mts.map +0 -1
  576. package/internal/shims/getBuiltinModule.d.ts +0 -11
  577. package/internal/shims/getBuiltinModule.d.ts.map +0 -1
  578. package/internal/shims/getBuiltinModule.js +0 -71
  579. package/internal/shims/getBuiltinModule.js.map +0 -1
  580. package/internal/shims/getBuiltinModule.mjs +0 -67
  581. package/internal/shims/getBuiltinModule.mjs.map +0 -1
  582. package/internal/shims/nullGetBuiltinModule.d.mts +0 -2
  583. package/internal/shims/nullGetBuiltinModule.d.mts.map +0 -1
  584. package/internal/shims/nullGetBuiltinModule.d.ts +0 -2
  585. package/internal/shims/nullGetBuiltinModule.d.ts.map +0 -1
  586. package/internal/shims/nullGetBuiltinModule.js +0 -5
  587. package/internal/shims/nullGetBuiltinModule.js.map +0 -1
  588. package/internal/shims/nullGetBuiltinModule.mjs +0 -2
  589. package/internal/shims/nullGetBuiltinModule.mjs.map +0 -1
  590. package/resources/action-execution.d.mts +0 -155
  591. package/resources/action-execution.d.mts.map +0 -1
  592. package/resources/action-execution.d.ts +0 -155
  593. package/resources/action-execution.d.ts.map +0 -1
  594. package/resources/action-execution.js +0 -19
  595. package/resources/action-execution.js.map +0 -1
  596. package/resources/action-execution.mjs +0 -15
  597. package/resources/action-execution.mjs.map +0 -1
  598. package/resources/auth/auth.d.mts +0 -10
  599. package/resources/auth/auth.d.mts.map +0 -1
  600. package/resources/auth/auth.d.ts +0 -10
  601. package/resources/auth/auth.d.ts.map +0 -1
  602. package/resources/auth/auth.js +0 -39
  603. package/resources/auth/auth.js.map +0 -1
  604. package/resources/auth/auth.mjs +0 -12
  605. package/resources/auth/auth.mjs.map +0 -1
  606. package/resources/auth/index.d.mts +0 -3
  607. package/resources/auth/index.d.mts.map +0 -1
  608. package/resources/auth/index.d.ts +0 -3
  609. package/resources/auth/index.d.ts.map +0 -1
  610. package/resources/auth/index.js.map +0 -1
  611. package/resources/auth/index.mjs +0 -4
  612. package/resources/auth/index.mjs.map +0 -1
  613. package/resources/auth/session.d.mts +0 -75
  614. package/resources/auth/session.d.mts.map +0 -1
  615. package/resources/auth/session.d.ts +0 -75
  616. package/resources/auth/session.d.ts.map +0 -1
  617. package/resources/auth/session.js +0 -12
  618. package/resources/auth/session.js.map +0 -1
  619. package/resources/auth/session.mjs +0 -8
  620. package/resources/auth/session.mjs.map +0 -1
  621. package/resources/auth.d.mts +0 -2
  622. package/resources/auth.d.mts.map +0 -1
  623. package/resources/auth.d.ts +0 -2
  624. package/resources/auth.d.ts.map +0 -1
  625. package/resources/auth.js +0 -19
  626. package/resources/auth.js.map +0 -1
  627. package/resources/auth.mjs.map +0 -1
  628. package/resources/mcp/command.d.mts +0 -34
  629. package/resources/mcp/command.d.mts.map +0 -1
  630. package/resources/mcp/command.d.ts +0 -34
  631. package/resources/mcp/command.d.ts.map +0 -1
  632. package/resources/mcp/command.js +0 -12
  633. package/resources/mcp/command.js.map +0 -1
  634. package/resources/mcp/command.mjs +0 -8
  635. package/resources/mcp/command.mjs.map +0 -1
  636. package/resources/org/api-key.d.mts +0 -17
  637. package/resources/org/api-key.d.mts.map +0 -1
  638. package/resources/org/api-key.d.ts +0 -17
  639. package/resources/org/api-key.d.ts.map +0 -1
  640. package/resources/org/api-key.js +0 -15
  641. package/resources/org/api-key.js.map +0 -1
  642. package/resources/org/api-key.mjs +0 -11
  643. package/resources/org/api-key.mjs.map +0 -1
  644. package/resources/org/index.d.mts +0 -4
  645. package/resources/org/index.d.mts.map +0 -1
  646. package/resources/org/index.d.ts +0 -4
  647. package/resources/org/index.d.ts.map +0 -1
  648. package/resources/org/index.js +0 -11
  649. package/resources/org/index.js.map +0 -1
  650. package/resources/org/index.mjs +0 -5
  651. package/resources/org/index.mjs.map +0 -1
  652. package/resources/org/org.d.mts +0 -14
  653. package/resources/org/org.d.mts.map +0 -1
  654. package/resources/org/org.d.ts +0 -14
  655. package/resources/org/org.d.ts.map +0 -1
  656. package/resources/org/org.js +0 -43
  657. package/resources/org/org.js.map +0 -1
  658. package/resources/org/org.mjs +0 -16
  659. package/resources/org/org.mjs.map +0 -1
  660. package/resources/org/project/api-keys.d.mts +0 -109
  661. package/resources/org/project/api-keys.d.mts.map +0 -1
  662. package/resources/org/project/api-keys.d.ts +0 -109
  663. package/resources/org/project/api-keys.d.ts.map +0 -1
  664. package/resources/org/project/api-keys.js +0 -23
  665. package/resources/org/project/api-keys.js.map +0 -1
  666. package/resources/org/project/api-keys.mjs +0 -19
  667. package/resources/org/project/api-keys.mjs.map +0 -1
  668. package/resources/org/project/index.d.mts +0 -5
  669. package/resources/org/project/index.d.mts.map +0 -1
  670. package/resources/org/project/index.d.ts +0 -5
  671. package/resources/org/project/index.d.ts.map +0 -1
  672. package/resources/org/project/index.js +0 -13
  673. package/resources/org/project/index.js.map +0 -1
  674. package/resources/org/project/index.mjs +0 -6
  675. package/resources/org/project/index.mjs.map +0 -1
  676. package/resources/org/project/project.d.mts +0 -90
  677. package/resources/org/project/project.d.mts.map +0 -1
  678. package/resources/org/project/project.d.ts +0 -90
  679. package/resources/org/project/project.d.ts.map +0 -1
  680. package/resources/org/project/project.js +0 -60
  681. package/resources/org/project/project.js.map +0 -1
  682. package/resources/org/project/project.mjs +0 -33
  683. package/resources/org/project/project.mjs.map +0 -1
  684. package/resources/org/project/trigger.d.mts +0 -51
  685. package/resources/org/project/trigger.d.mts.map +0 -1
  686. package/resources/org/project/trigger.d.ts +0 -51
  687. package/resources/org/project/trigger.d.ts.map +0 -1
  688. package/resources/org/project/trigger.js +0 -16
  689. package/resources/org/project/trigger.js.map +0 -1
  690. package/resources/org/project/trigger.mjs +0 -12
  691. package/resources/org/project/trigger.mjs.map +0 -1
  692. package/resources/org/project/webhook.d.mts +0 -92
  693. package/resources/org/project/webhook.d.mts.map +0 -1
  694. package/resources/org/project/webhook.d.ts +0 -92
  695. package/resources/org/project/webhook.d.ts.map +0 -1
  696. package/resources/org/project/webhook.js +0 -24
  697. package/resources/org/project/webhook.js.map +0 -1
  698. package/resources/org/project/webhook.mjs +0 -20
  699. package/resources/org/project/webhook.mjs.map +0 -1
  700. package/resources/org/project.js +0 -19
  701. package/resources/org/project.js.map +0 -1
  702. package/resources/org/project.mjs.map +0 -1
  703. package/resources/org.d.mts +0 -2
  704. package/resources/org.d.mts.map +0 -1
  705. package/resources/org.d.ts +0 -2
  706. package/resources/org.d.ts.map +0 -1
  707. package/resources/org.js +0 -19
  708. package/resources/org.js.map +0 -1
  709. package/resources/org.mjs.map +0 -1
  710. package/resources/team-members.d.mts +0 -57
  711. package/resources/team-members.d.mts.map +0 -1
  712. package/resources/team-members.d.ts +0 -57
  713. package/resources/team-members.d.ts.map +0 -1
  714. package/resources/team-members.js +0 -22
  715. package/resources/team-members.js.map +0 -1
  716. package/resources/team-members.mjs +0 -18
  717. package/resources/team-members.mjs.map +0 -1
  718. package/resources/trigger-instances/handle.d.mts +0 -25
  719. package/resources/trigger-instances/handle.d.mts.map +0 -1
  720. package/resources/trigger-instances/handle.d.ts +0 -25
  721. package/resources/trigger-instances/handle.d.ts.map +0 -1
  722. package/resources/trigger-instances/handle.js +0 -18
  723. package/resources/trigger-instances/handle.js.map +0 -1
  724. package/resources/trigger-instances/handle.mjs +0 -14
  725. package/resources/trigger-instances/handle.mjs.map +0 -1
  726. package/resources/trigger.d.mts +0 -73
  727. package/resources/trigger.d.mts.map +0 -1
  728. package/resources/trigger.d.ts +0 -73
  729. package/resources/trigger.d.ts.map +0 -1
  730. package/resources/trigger.js +0 -12
  731. package/resources/trigger.js.map +0 -1
  732. package/resources/trigger.mjs +0 -8
  733. package/resources/trigger.mjs.map +0 -1
  734. package/src/internal/shim-types.d.ts +0 -28
  735. package/src/internal/shims/crypto.ts +0 -18
  736. package/src/internal/shims/file.ts +0 -32
  737. package/src/internal/shims/getBuiltinModule.ts +0 -66
  738. package/src/internal/shims/nullGetBuiltinModule.ts +0 -1
  739. package/src/resources/action-execution.ts +0 -244
  740. package/src/resources/auth/auth.ts +0 -15
  741. package/src/resources/auth/index.ts +0 -4
  742. package/src/resources/auth/session.ts +0 -127
  743. package/src/resources/mcp/command.ts +0 -47
  744. package/src/resources/org/api-key.ts +0 -30
  745. package/src/resources/org/index.ts +0 -12
  746. package/src/resources/org/org.ts +0 -39
  747. package/src/resources/org/project/api-keys.ts +0 -156
  748. package/src/resources/org/project/index.ts +0 -35
  749. package/src/resources/org/project/project.ts +0 -206
  750. package/src/resources/org/project/trigger.ts +0 -95
  751. package/src/resources/org/project/webhook.ts +0 -131
  752. package/src/resources/team-members.ts +0 -111
  753. package/src/resources/trigger-instances/handle.ts +0 -45
  754. package/src/resources/trigger.ts +0 -108
  755. /package/resources/{org/project.d.mts → project.d.mts} +0 -0
  756. /package/resources/{org/project.d.ts → project.d.ts} +0 -0
  757. /package/resources/{org/project.mjs → project.mjs} +0 -0
  758. /package/src/resources/{org/project.ts → project.ts} +0 -0
@@ -0,0 +1,4983 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as FilesAPI from './files';
5
+ import {
6
+ FileCreateDownloadURLParams,
7
+ FileCreateDownloadURLResponse,
8
+ FileCreateUploadURLParams,
9
+ FileCreateUploadURLResponse,
10
+ FileDeleteParams,
11
+ FileDeleteResponse,
12
+ FileListParams,
13
+ FileListResponse,
14
+ Files,
15
+ } from './files';
16
+ import { APIPromise } from '../../../core/api-promise';
17
+ import { RequestOptions } from '../../../internal/request-options';
18
+ import { path } from '../../../internal/utils/path';
19
+
20
+ /**
21
+ * (Labs) Tool router endpoints
22
+ */
23
+ export class Session extends APIResource {
24
+ files: FilesAPI.Files = new FilesAPI.Files(this._client);
25
+
26
+ /**
27
+ * Creates a new session for the tool router feature. This endpoint initializes a
28
+ * new session with specified toolkits and their authentication configurations. The
29
+ * session provides an isolated environment for testing and managing tool routing
30
+ * logic with scoped MCP server access.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const session = await client.toolRouter.session.create({
35
+ * user_id: 'user_123456789',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: SessionCreateParams, options?: RequestOptions): APIPromise<SessionCreateResponse> {
40
+ return this._client.post('/api/v3.1/tool_router/session', { body, ...options });
41
+ }
42
+
43
+ /**
44
+ * Retrieves an existing tool router session by its ID. Returns the session
45
+ * configuration, MCP server URL, and available tools.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const session = await client.toolRouter.session.retrieve(
50
+ * 'trs_1a2b3c4d5e6f',
51
+ * );
52
+ * ```
53
+ */
54
+ retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse> {
55
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}`, options);
56
+ }
57
+
58
+ /**
59
+ * Fetch an existing tool router session by ID.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const response = await client.toolRouter.session.attach(
64
+ * 'trs_1a2b3c4d5e6f',
65
+ * );
66
+ * ```
67
+ */
68
+ attach(
69
+ sessionID: string,
70
+ body: SessionAttachParams | null | undefined = {},
71
+ options?: RequestOptions,
72
+ ): APIPromise<SessionAttachResponse> {
73
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/attach`, { body, ...options });
74
+ }
75
+
76
+ /**
77
+ * Returns the session config history ordered by version DESC (newest first). The
78
+ * live (current) config appears once, on the first page only, with
79
+ * `is_current: true`; archived versions have `is_current: false`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const response =
84
+ * await client.toolRouter.session.configHistory(
85
+ * 'trs_1a2b3c4d5e6f',
86
+ * );
87
+ * ```
88
+ */
89
+ configHistory(
90
+ sessionID: string,
91
+ query: SessionConfigHistoryParams | null | undefined = {},
92
+ options?: RequestOptions,
93
+ ): APIPromise<SessionConfigHistoryResponse> {
94
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/config_history`, {
95
+ query,
96
+ ...options,
97
+ });
98
+ }
99
+
100
+ /**
101
+ * Execute a tool (meta or app) within an existing tool router session.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * const response = await client.toolRouter.session.execute(
106
+ * 'trs_LX9uJKBinWWr',
107
+ * { tool_slug: 'GITHUB_CREATE_AN_ISSUE' },
108
+ * );
109
+ * ```
110
+ */
111
+ execute(
112
+ sessionID: string,
113
+ body: SessionExecuteParams,
114
+ options?: RequestOptions,
115
+ ): APIPromise<SessionExecuteResponse> {
116
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute`, { body, ...options });
117
+ }
118
+
119
+ /**
120
+ * Execute a Composio meta tool (COMPOSIO\_\*) within an existing tool router
121
+ * session.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * const response =
126
+ * await client.toolRouter.session.executeMeta(
127
+ * 'trs_LX9uJKBinWWr',
128
+ * { slug: 'COMPOSIO_MANAGE_CONNECTIONS' },
129
+ * );
130
+ * ```
131
+ */
132
+ executeMeta(
133
+ sessionID: string,
134
+ body: SessionExecuteMetaParams,
135
+ options?: RequestOptions,
136
+ ): APIPromise<SessionExecuteMetaResponse> {
137
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/execute_meta`, {
138
+ body,
139
+ ...options,
140
+ });
141
+ }
142
+
143
+ /**
144
+ * Initiates an authentication link session for a specific toolkit within a tool
145
+ * router session. Returns a link token and redirect URL that users can use to
146
+ * complete the OAuth flow.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * const response = await client.toolRouter.session.link(
151
+ * 'trs_LX9uJKBinWWr',
152
+ * { toolkit: 'github' },
153
+ * );
154
+ * ```
155
+ */
156
+ link(
157
+ sessionID: string,
158
+ body: SessionLinkParams,
159
+ options?: RequestOptions,
160
+ ): APIPromise<SessionLinkResponse> {
161
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/link`, { body, ...options });
162
+ }
163
+
164
+ /**
165
+ * Partially updates the configuration of an existing tool router session. Only the
166
+ * fields provided in the request body will be updated. Uses optimistic concurrency
167
+ * control to prevent lost updates. The previous config is stored in config
168
+ * history.
169
+ *
170
+ * @example
171
+ * ```ts
172
+ * const response = await client.toolRouter.session.patch(
173
+ * 'trs_1a2b3c4d5e6f',
174
+ * );
175
+ * ```
176
+ */
177
+ patch(
178
+ sessionID: string,
179
+ body: SessionPatchParams | null | undefined = {},
180
+ options?: RequestOptions,
181
+ ): APIPromise<SessionPatchResponse> {
182
+ return this._client.patch(path`/api/v3.1/tool_router/session/${sessionID}`, { body, ...options });
183
+ }
184
+
185
+ /**
186
+ * Execute any native API call on a toolkit with authentication automatically
187
+ * injected from Composio. This endpoint proxies HTTP requests to third-party APIs
188
+ * using connected account credentials resolved from the session context. Provide
189
+ * the toolkit slug, API endpoint, and HTTP method — Composio handles
190
+ * authentication injection, abstracting away credential management. Supports all
191
+ * HTTP methods, custom headers/query parameters, and binary request/response
192
+ * bodies.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * const response =
197
+ * await client.toolRouter.session.proxyExecute(
198
+ * 'trs_LX9uJKBinWWr',
199
+ * {
200
+ * endpoint: '/api/v1/resources',
201
+ * method: 'GET',
202
+ * toolkit_slug: 'gmail',
203
+ * },
204
+ * );
205
+ * ```
206
+ */
207
+ proxyExecute(
208
+ sessionID: string,
209
+ body: SessionProxyExecuteParams,
210
+ options?: RequestOptions,
211
+ ): APIPromise<SessionProxyExecuteResponse> {
212
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/proxy_execute`, {
213
+ body,
214
+ ...options,
215
+ });
216
+ }
217
+
218
+ /**
219
+ * Search for tools matching a use case query within an existing tool router
220
+ * session.
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const response = await client.toolRouter.session.search(
225
+ * 'trs_LX9uJKBinWWr',
226
+ * {
227
+ * queries: [
228
+ * { use_case: 'Send a slack message to a channel' },
229
+ * ],
230
+ * },
231
+ * );
232
+ * ```
233
+ */
234
+ search(
235
+ sessionID: string,
236
+ body: SessionSearchParams,
237
+ options?: RequestOptions,
238
+ ): APIPromise<SessionSearchResponse> {
239
+ return this._client.post(path`/api/v3.1/tool_router/session/${sessionID}/search`, { body, ...options });
240
+ }
241
+
242
+ /**
243
+ * Retrieves a cursor-paginated list of toolkits available in the tool router
244
+ * session. Includes toolkit metadata, composio-managed auth schemes, and connected
245
+ * accounts if available. Optionally filter by specific toolkit slugs.
246
+ *
247
+ * @example
248
+ * ```ts
249
+ * const response = await client.toolRouter.session.toolkits(
250
+ * 'trs_1a2b3c4d5e6f',
251
+ * );
252
+ * ```
253
+ */
254
+ toolkits(
255
+ sessionID: string,
256
+ query: SessionToolkitsParams | null | undefined = {},
257
+ options?: RequestOptions,
258
+ ): APIPromise<SessionToolkitsResponse> {
259
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/toolkits`, { query, ...options });
260
+ }
261
+
262
+ /**
263
+ * Returns tools available in a tool router session with complete schemas. Results
264
+ * are paginated; use `next_cursor` to fetch the next page.
265
+ *
266
+ * @example
267
+ * ```ts
268
+ * const response = await client.toolRouter.session.tools(
269
+ * 'session_id',
270
+ * );
271
+ * ```
272
+ */
273
+ tools(
274
+ sessionID: string,
275
+ query: SessionToolsParams | null | undefined = {},
276
+ options?: RequestOptions,
277
+ ): APIPromise<SessionToolsResponse> {
278
+ return this._client.get(path`/api/v3.1/tool_router/session/${sessionID}/tools`, { query, ...options });
279
+ }
280
+ }
281
+
282
+ export interface SessionCreateResponse {
283
+ /**
284
+ * The configuration used to create this session
285
+ */
286
+ config: SessionCreateResponse.Config;
287
+
288
+ /**
289
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
290
+ * concurrency control.
291
+ */
292
+ config_version: number;
293
+
294
+ mcp: SessionCreateResponse.Mcp;
295
+
296
+ /**
297
+ * The identifier of the session
298
+ */
299
+ session_id: string;
300
+
301
+ /**
302
+ * List of available tools in this session
303
+ */
304
+ tool_router_tools: Array<string>;
305
+
306
+ /**
307
+ * Experimental features including the generated system prompt. Only returned on
308
+ * session creation, not on GET.
309
+ */
310
+ experimental?: SessionCreateResponse.Experimental;
311
+
312
+ /**
313
+ * Advisory list — the session exists and is usable, but the listed issues may
314
+ * warrant attention.
315
+ */
316
+ warnings?: Array<SessionCreateResponse.Warning>;
317
+ }
318
+
319
+ export namespace SessionCreateResponse {
320
+ /**
321
+ * The configuration used to create this session
322
+ */
323
+ export interface Config {
324
+ /**
325
+ * Execute helper configuration
326
+ */
327
+ execute: Config.Execute;
328
+
329
+ /**
330
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
331
+ * is returned as "all".
332
+ */
333
+ preload: Config.Preload;
334
+
335
+ /**
336
+ * Search helper configuration
337
+ */
338
+ search: Config.Search;
339
+
340
+ /**
341
+ * User identifier for this session
342
+ */
343
+ user_id: string;
344
+
345
+ /**
346
+ * Auth config overrides per toolkit
347
+ */
348
+ auth_configs?: { [key: string]: string };
349
+
350
+ /**
351
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
352
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
353
+ */
354
+ connected_accounts?: { [key: string]: Array<string> };
355
+
356
+ /**
357
+ * Manage connections configuration
358
+ */
359
+ manage_connections?: Config.ManageConnections;
360
+
361
+ /**
362
+ * Multi-account configuration for this session.
363
+ */
364
+ multi_account?: Config.MultiAccount;
365
+
366
+ /**
367
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
368
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
369
+ * tool must NOT have any of. Both conditions must be satisfied.
370
+ */
371
+ tags?: Config.Tags;
372
+
373
+ /**
374
+ * Toolkit configuration - either enabled list or disabled list
375
+ */
376
+ toolkits?: Config.Enabled | Config.Disabled;
377
+
378
+ /**
379
+ * Tool-level configuration per toolkit
380
+ */
381
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
382
+
383
+ /**
384
+ * Workbench configuration
385
+ */
386
+ workbench?: Config.Workbench;
387
+ }
388
+
389
+ export namespace Config {
390
+ /**
391
+ * Execute helper configuration
392
+ */
393
+ export interface Execute {
394
+ enable_multi_execute?: boolean;
395
+ }
396
+
397
+ /**
398
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
399
+ * is returned as "all".
400
+ */
401
+ export interface Preload {
402
+ /**
403
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
404
+ * app tools allowed by its filters.
405
+ */
406
+ tools: Array<string> | 'all';
407
+ }
408
+
409
+ /**
410
+ * Search helper configuration
411
+ */
412
+ export interface Search {
413
+ enable?: boolean;
414
+ }
415
+
416
+ /**
417
+ * Manage connections configuration
418
+ */
419
+ export interface ManageConnections {
420
+ /**
421
+ * Custom callback URL for connected account auth flows
422
+ */
423
+ callback_url?: string;
424
+
425
+ /**
426
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
427
+ */
428
+ enable_connection_removal?: boolean;
429
+
430
+ /**
431
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
432
+ * Default false. May not work reliably with GPT models.
433
+ */
434
+ enable_wait_for_connections?: boolean;
435
+
436
+ /**
437
+ * Whether to enable the connection manager for automatic connection handling
438
+ */
439
+ enabled?: boolean;
440
+ }
441
+
442
+ /**
443
+ * Multi-account configuration for this session.
444
+ */
445
+ export interface MultiAccount {
446
+ /**
447
+ * When true, enables multi-account mode for this session. When not set, falls back
448
+ * to org/project-level configuration.
449
+ */
450
+ enable?: boolean;
451
+
452
+ /**
453
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
454
+ * multi-account is enabled.
455
+ */
456
+ max_accounts_per_toolkit?: number;
457
+
458
+ /**
459
+ * When true, require explicit account selection when multiple accounts are
460
+ * connected. When false (default), use the first/default account.
461
+ */
462
+ require_explicit_selection?: boolean;
463
+ }
464
+
465
+ /**
466
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
467
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
468
+ * tool must NOT have any of. Both conditions must be satisfied.
469
+ */
470
+ export interface Tags {
471
+ /**
472
+ * Tags that the tool must NOT have any of
473
+ */
474
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
475
+
476
+ /**
477
+ * Tags that the tool must have at least one of
478
+ */
479
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
480
+ }
481
+
482
+ export interface Enabled {
483
+ enabled: Array<string>;
484
+ }
485
+
486
+ export interface Disabled {
487
+ disabled: Array<string>;
488
+ }
489
+
490
+ export interface Enabled {
491
+ enabled: Array<string>;
492
+ }
493
+
494
+ export interface Disabled {
495
+ disabled: Array<string>;
496
+ }
497
+
498
+ export interface Tags {
499
+ tags: Tags.Tags;
500
+ }
501
+
502
+ export namespace Tags {
503
+ export interface Tags {
504
+ /**
505
+ * Tags that the tool must NOT have any of
506
+ */
507
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
508
+
509
+ /**
510
+ * Tags that the tool must have at least one of
511
+ */
512
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
513
+ }
514
+ }
515
+
516
+ /**
517
+ * Workbench configuration
518
+ */
519
+ export interface Workbench {
520
+ /**
521
+ * Character threshold after which tool execution response are saved to a file in
522
+ * workbench. Default is 20k.
523
+ */
524
+ auto_offload_threshold?: number;
525
+
526
+ /**
527
+ * Whether the workbench (code execution sandbox) is enabled. When false,
528
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
529
+ */
530
+ enable?: boolean;
531
+
532
+ /**
533
+ * Whether proxy execution is enabled in the workbench
534
+ */
535
+ proxy_execution_enabled?: boolean;
536
+
537
+ /**
538
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
539
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
540
+ */
541
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
542
+ }
543
+ }
544
+
545
+ export interface Mcp {
546
+ /**
547
+ * The type of the MCP server. Can be http
548
+ */
549
+ type: 'http';
550
+
551
+ /**
552
+ * The URL of the MCP server
553
+ */
554
+ url: string;
555
+ }
556
+
557
+ /**
558
+ * Experimental features including the generated system prompt. Only returned on
559
+ * session creation, not on GET.
560
+ */
561
+ export interface Experimental {
562
+ /**
563
+ * The assistive system prompt for the tool router session
564
+ */
565
+ assistive_prompt?: string;
566
+
567
+ /**
568
+ * User-defined custom toolkits with grouped tools (no-auth)
569
+ */
570
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
571
+
572
+ /**
573
+ * Custom tools — standalone or extending Composio toolkits
574
+ */
575
+ custom_tools?: Array<Experimental.CustomTool>;
576
+ }
577
+
578
+ export namespace Experimental {
579
+ export interface CustomToolkit {
580
+ description: string;
581
+
582
+ name: string;
583
+
584
+ slug: string;
585
+
586
+ tools: Array<CustomToolkit.Tool>;
587
+ }
588
+
589
+ export namespace CustomToolkit {
590
+ export interface Tool {
591
+ description: string;
592
+
593
+ input_schema: { [key: string]: unknown };
594
+
595
+ name: string;
596
+
597
+ /**
598
+ * Original tool slug as provided by the user
599
+ */
600
+ original_slug: string;
601
+
602
+ /**
603
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
604
+ */
605
+ slug: string;
606
+
607
+ output_schema?: { [key: string]: unknown };
608
+ }
609
+ }
610
+
611
+ export interface CustomTool {
612
+ description: string;
613
+
614
+ input_schema: { [key: string]: unknown };
615
+
616
+ name: string;
617
+
618
+ /**
619
+ * Original tool slug as provided by the user
620
+ */
621
+ original_slug: string;
622
+
623
+ /**
624
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
625
+ */
626
+ slug: string;
627
+
628
+ extends_toolkit?: string;
629
+
630
+ output_schema?: { [key: string]: unknown };
631
+ }
632
+ }
633
+
634
+ export interface Warning {
635
+ /**
636
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
637
+ */
638
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
639
+
640
+ /**
641
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
642
+ * end users.
643
+ */
644
+ message: string;
645
+ }
646
+ }
647
+
648
+ export interface SessionRetrieveResponse {
649
+ /**
650
+ * The configuration used to create this session
651
+ */
652
+ config: SessionRetrieveResponse.Config;
653
+
654
+ /**
655
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
656
+ * concurrency control.
657
+ */
658
+ config_version: number;
659
+
660
+ mcp: SessionRetrieveResponse.Mcp;
661
+
662
+ /**
663
+ * The identifier of the session
664
+ */
665
+ session_id: string;
666
+
667
+ /**
668
+ * List of available tools in this session
669
+ */
670
+ tool_router_tools: Array<string>;
671
+
672
+ /**
673
+ * Experimental features
674
+ */
675
+ experimental?: SessionRetrieveResponse.Experimental;
676
+
677
+ /**
678
+ * Advisory list — the session exists and is usable, but the listed issues may
679
+ * warrant attention.
680
+ */
681
+ warnings?: Array<SessionRetrieveResponse.Warning>;
682
+ }
683
+
684
+ export namespace SessionRetrieveResponse {
685
+ /**
686
+ * The configuration used to create this session
687
+ */
688
+ export interface Config {
689
+ /**
690
+ * Execute helper configuration
691
+ */
692
+ execute: Config.Execute;
693
+
694
+ /**
695
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
696
+ * is returned as "all".
697
+ */
698
+ preload: Config.Preload;
699
+
700
+ /**
701
+ * Search helper configuration
702
+ */
703
+ search: Config.Search;
704
+
705
+ /**
706
+ * User identifier for this session
707
+ */
708
+ user_id: string;
709
+
710
+ /**
711
+ * Auth config overrides per toolkit
712
+ */
713
+ auth_configs?: { [key: string]: string };
714
+
715
+ /**
716
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
717
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
718
+ */
719
+ connected_accounts?: { [key: string]: Array<string> };
720
+
721
+ /**
722
+ * Manage connections configuration
723
+ */
724
+ manage_connections?: Config.ManageConnections;
725
+
726
+ /**
727
+ * Multi-account configuration for this session.
728
+ */
729
+ multi_account?: Config.MultiAccount;
730
+
731
+ /**
732
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
733
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
734
+ * tool must NOT have any of. Both conditions must be satisfied.
735
+ */
736
+ tags?: Config.Tags;
737
+
738
+ /**
739
+ * Toolkit configuration - either enabled list or disabled list
740
+ */
741
+ toolkits?: Config.Enabled | Config.Disabled;
742
+
743
+ /**
744
+ * Tool-level configuration per toolkit
745
+ */
746
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
747
+
748
+ /**
749
+ * Workbench configuration
750
+ */
751
+ workbench?: Config.Workbench;
752
+ }
753
+
754
+ export namespace Config {
755
+ /**
756
+ * Execute helper configuration
757
+ */
758
+ export interface Execute {
759
+ enable_multi_execute?: boolean;
760
+ }
761
+
762
+ /**
763
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
764
+ * is returned as "all".
765
+ */
766
+ export interface Preload {
767
+ /**
768
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
769
+ * app tools allowed by its filters.
770
+ */
771
+ tools: Array<string> | 'all';
772
+ }
773
+
774
+ /**
775
+ * Search helper configuration
776
+ */
777
+ export interface Search {
778
+ enable?: boolean;
779
+ }
780
+
781
+ /**
782
+ * Manage connections configuration
783
+ */
784
+ export interface ManageConnections {
785
+ /**
786
+ * Custom callback URL for connected account auth flows
787
+ */
788
+ callback_url?: string;
789
+
790
+ /**
791
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
792
+ */
793
+ enable_connection_removal?: boolean;
794
+
795
+ /**
796
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
797
+ * Default false. May not work reliably with GPT models.
798
+ */
799
+ enable_wait_for_connections?: boolean;
800
+
801
+ /**
802
+ * Whether to enable the connection manager for automatic connection handling
803
+ */
804
+ enabled?: boolean;
805
+ }
806
+
807
+ /**
808
+ * Multi-account configuration for this session.
809
+ */
810
+ export interface MultiAccount {
811
+ /**
812
+ * When true, enables multi-account mode for this session. When not set, falls back
813
+ * to org/project-level configuration.
814
+ */
815
+ enable?: boolean;
816
+
817
+ /**
818
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
819
+ * multi-account is enabled.
820
+ */
821
+ max_accounts_per_toolkit?: number;
822
+
823
+ /**
824
+ * When true, require explicit account selection when multiple accounts are
825
+ * connected. When false (default), use the first/default account.
826
+ */
827
+ require_explicit_selection?: boolean;
828
+ }
829
+
830
+ /**
831
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
832
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
833
+ * tool must NOT have any of. Both conditions must be satisfied.
834
+ */
835
+ export interface Tags {
836
+ /**
837
+ * Tags that the tool must NOT have any of
838
+ */
839
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
840
+
841
+ /**
842
+ * Tags that the tool must have at least one of
843
+ */
844
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
845
+ }
846
+
847
+ export interface Enabled {
848
+ enabled: Array<string>;
849
+ }
850
+
851
+ export interface Disabled {
852
+ disabled: Array<string>;
853
+ }
854
+
855
+ export interface Enabled {
856
+ enabled: Array<string>;
857
+ }
858
+
859
+ export interface Disabled {
860
+ disabled: Array<string>;
861
+ }
862
+
863
+ export interface Tags {
864
+ tags: Tags.Tags;
865
+ }
866
+
867
+ export namespace Tags {
868
+ export interface Tags {
869
+ /**
870
+ * Tags that the tool must NOT have any of
871
+ */
872
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
873
+
874
+ /**
875
+ * Tags that the tool must have at least one of
876
+ */
877
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
878
+ }
879
+ }
880
+
881
+ /**
882
+ * Workbench configuration
883
+ */
884
+ export interface Workbench {
885
+ /**
886
+ * Character threshold after which tool execution response are saved to a file in
887
+ * workbench. Default is 20k.
888
+ */
889
+ auto_offload_threshold?: number;
890
+
891
+ /**
892
+ * Whether the workbench (code execution sandbox) is enabled. When false,
893
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
894
+ */
895
+ enable?: boolean;
896
+
897
+ /**
898
+ * Whether proxy execution is enabled in the workbench
899
+ */
900
+ proxy_execution_enabled?: boolean;
901
+
902
+ /**
903
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
904
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
905
+ */
906
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
907
+ }
908
+ }
909
+
910
+ export interface Mcp {
911
+ /**
912
+ * The type of the MCP server. Can be http
913
+ */
914
+ type: 'http';
915
+
916
+ /**
917
+ * The URL of the MCP server
918
+ */
919
+ url: string;
920
+ }
921
+
922
+ /**
923
+ * Experimental features
924
+ */
925
+ export interface Experimental {
926
+ /**
927
+ * The assistive system prompt for the tool router session
928
+ */
929
+ assistive_prompt?: string;
930
+
931
+ /**
932
+ * User-defined custom toolkits with grouped tools (no-auth)
933
+ */
934
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
935
+
936
+ /**
937
+ * Custom tools — standalone or extending Composio toolkits
938
+ */
939
+ custom_tools?: Array<Experimental.CustomTool>;
940
+ }
941
+
942
+ export namespace Experimental {
943
+ export interface CustomToolkit {
944
+ description: string;
945
+
946
+ name: string;
947
+
948
+ slug: string;
949
+
950
+ tools: Array<CustomToolkit.Tool>;
951
+ }
952
+
953
+ export namespace CustomToolkit {
954
+ export interface Tool {
955
+ description: string;
956
+
957
+ input_schema: { [key: string]: unknown };
958
+
959
+ name: string;
960
+
961
+ /**
962
+ * Original tool slug as provided by the user
963
+ */
964
+ original_slug: string;
965
+
966
+ /**
967
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
968
+ */
969
+ slug: string;
970
+
971
+ output_schema?: { [key: string]: unknown };
972
+ }
973
+ }
974
+
975
+ export interface CustomTool {
976
+ description: string;
977
+
978
+ input_schema: { [key: string]: unknown };
979
+
980
+ name: string;
981
+
982
+ /**
983
+ * Original tool slug as provided by the user
984
+ */
985
+ original_slug: string;
986
+
987
+ /**
988
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
989
+ */
990
+ slug: string;
991
+
992
+ extends_toolkit?: string;
993
+
994
+ output_schema?: { [key: string]: unknown };
995
+ }
996
+ }
997
+
998
+ export interface Warning {
999
+ /**
1000
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1001
+ */
1002
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1003
+
1004
+ /**
1005
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1006
+ * end users.
1007
+ */
1008
+ message: string;
1009
+ }
1010
+ }
1011
+
1012
+ export interface SessionAttachResponse {
1013
+ /**
1014
+ * The configuration used to create this session
1015
+ */
1016
+ config: SessionAttachResponse.Config;
1017
+
1018
+ /**
1019
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
1020
+ * concurrency control.
1021
+ */
1022
+ config_version: number;
1023
+
1024
+ mcp: SessionAttachResponse.Mcp;
1025
+
1026
+ /**
1027
+ * The identifier of the session
1028
+ */
1029
+ session_id: string;
1030
+
1031
+ /**
1032
+ * List of available tools in this session
1033
+ */
1034
+ tool_router_tools: Array<string>;
1035
+
1036
+ /**
1037
+ * Experimental features
1038
+ */
1039
+ experimental?: SessionAttachResponse.Experimental;
1040
+
1041
+ /**
1042
+ * Advisory list — the session exists and is usable, but the listed issues may
1043
+ * warrant attention.
1044
+ */
1045
+ warnings?: Array<SessionAttachResponse.Warning>;
1046
+ }
1047
+
1048
+ export namespace SessionAttachResponse {
1049
+ /**
1050
+ * The configuration used to create this session
1051
+ */
1052
+ export interface Config {
1053
+ /**
1054
+ * Execute helper configuration
1055
+ */
1056
+ execute: Config.Execute;
1057
+
1058
+ /**
1059
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1060
+ * is returned as "all".
1061
+ */
1062
+ preload: Config.Preload;
1063
+
1064
+ /**
1065
+ * Search helper configuration
1066
+ */
1067
+ search: Config.Search;
1068
+
1069
+ /**
1070
+ * User identifier for this session
1071
+ */
1072
+ user_id: string;
1073
+
1074
+ /**
1075
+ * Auth config overrides per toolkit
1076
+ */
1077
+ auth_configs?: { [key: string]: string };
1078
+
1079
+ /**
1080
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1081
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1082
+ */
1083
+ connected_accounts?: { [key: string]: Array<string> };
1084
+
1085
+ /**
1086
+ * Manage connections configuration
1087
+ */
1088
+ manage_connections?: Config.ManageConnections;
1089
+
1090
+ /**
1091
+ * Multi-account configuration for this session.
1092
+ */
1093
+ multi_account?: Config.MultiAccount;
1094
+
1095
+ /**
1096
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1097
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1098
+ * tool must NOT have any of. Both conditions must be satisfied.
1099
+ */
1100
+ tags?: Config.Tags;
1101
+
1102
+ /**
1103
+ * Toolkit configuration - either enabled list or disabled list
1104
+ */
1105
+ toolkits?: Config.Enabled | Config.Disabled;
1106
+
1107
+ /**
1108
+ * Tool-level configuration per toolkit
1109
+ */
1110
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1111
+
1112
+ /**
1113
+ * Workbench configuration
1114
+ */
1115
+ workbench?: Config.Workbench;
1116
+ }
1117
+
1118
+ export namespace Config {
1119
+ /**
1120
+ * Execute helper configuration
1121
+ */
1122
+ export interface Execute {
1123
+ enable_multi_execute?: boolean;
1124
+ }
1125
+
1126
+ /**
1127
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1128
+ * is returned as "all".
1129
+ */
1130
+ export interface Preload {
1131
+ /**
1132
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1133
+ * app tools allowed by its filters.
1134
+ */
1135
+ tools: Array<string> | 'all';
1136
+ }
1137
+
1138
+ /**
1139
+ * Search helper configuration
1140
+ */
1141
+ export interface Search {
1142
+ enable?: boolean;
1143
+ }
1144
+
1145
+ /**
1146
+ * Manage connections configuration
1147
+ */
1148
+ export interface ManageConnections {
1149
+ /**
1150
+ * Custom callback URL for connected account auth flows
1151
+ */
1152
+ callback_url?: string;
1153
+
1154
+ /**
1155
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1156
+ */
1157
+ enable_connection_removal?: boolean;
1158
+
1159
+ /**
1160
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1161
+ * Default false. May not work reliably with GPT models.
1162
+ */
1163
+ enable_wait_for_connections?: boolean;
1164
+
1165
+ /**
1166
+ * Whether to enable the connection manager for automatic connection handling
1167
+ */
1168
+ enabled?: boolean;
1169
+ }
1170
+
1171
+ /**
1172
+ * Multi-account configuration for this session.
1173
+ */
1174
+ export interface MultiAccount {
1175
+ /**
1176
+ * When true, enables multi-account mode for this session. When not set, falls back
1177
+ * to org/project-level configuration.
1178
+ */
1179
+ enable?: boolean;
1180
+
1181
+ /**
1182
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1183
+ * multi-account is enabled.
1184
+ */
1185
+ max_accounts_per_toolkit?: number;
1186
+
1187
+ /**
1188
+ * When true, require explicit account selection when multiple accounts are
1189
+ * connected. When false (default), use the first/default account.
1190
+ */
1191
+ require_explicit_selection?: boolean;
1192
+ }
1193
+
1194
+ /**
1195
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1196
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1197
+ * tool must NOT have any of. Both conditions must be satisfied.
1198
+ */
1199
+ export interface Tags {
1200
+ /**
1201
+ * Tags that the tool must NOT have any of
1202
+ */
1203
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1204
+
1205
+ /**
1206
+ * Tags that the tool must have at least one of
1207
+ */
1208
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1209
+ }
1210
+
1211
+ export interface Enabled {
1212
+ enabled: Array<string>;
1213
+ }
1214
+
1215
+ export interface Disabled {
1216
+ disabled: Array<string>;
1217
+ }
1218
+
1219
+ export interface Enabled {
1220
+ enabled: Array<string>;
1221
+ }
1222
+
1223
+ export interface Disabled {
1224
+ disabled: Array<string>;
1225
+ }
1226
+
1227
+ export interface Tags {
1228
+ tags: Tags.Tags;
1229
+ }
1230
+
1231
+ export namespace Tags {
1232
+ export interface Tags {
1233
+ /**
1234
+ * Tags that the tool must NOT have any of
1235
+ */
1236
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1237
+
1238
+ /**
1239
+ * Tags that the tool must have at least one of
1240
+ */
1241
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1242
+ }
1243
+ }
1244
+
1245
+ /**
1246
+ * Workbench configuration
1247
+ */
1248
+ export interface Workbench {
1249
+ /**
1250
+ * Character threshold after which tool execution response are saved to a file in
1251
+ * workbench. Default is 20k.
1252
+ */
1253
+ auto_offload_threshold?: number;
1254
+
1255
+ /**
1256
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1257
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1258
+ */
1259
+ enable?: boolean;
1260
+
1261
+ /**
1262
+ * Whether proxy execution is enabled in the workbench
1263
+ */
1264
+ proxy_execution_enabled?: boolean;
1265
+
1266
+ /**
1267
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1268
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1269
+ */
1270
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1271
+ }
1272
+ }
1273
+
1274
+ export interface Mcp {
1275
+ /**
1276
+ * The type of the MCP server. Can be http
1277
+ */
1278
+ type: 'http';
1279
+
1280
+ /**
1281
+ * The URL of the MCP server
1282
+ */
1283
+ url: string;
1284
+ }
1285
+
1286
+ /**
1287
+ * Experimental features
1288
+ */
1289
+ export interface Experimental {
1290
+ /**
1291
+ * The assistive system prompt for the tool router session
1292
+ */
1293
+ assistive_prompt?: string;
1294
+
1295
+ /**
1296
+ * User-defined custom toolkits with grouped tools (no-auth)
1297
+ */
1298
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1299
+
1300
+ /**
1301
+ * Custom tools — standalone or extending Composio toolkits
1302
+ */
1303
+ custom_tools?: Array<Experimental.CustomTool>;
1304
+ }
1305
+
1306
+ export namespace Experimental {
1307
+ export interface CustomToolkit {
1308
+ description: string;
1309
+
1310
+ name: string;
1311
+
1312
+ slug: string;
1313
+
1314
+ tools: Array<CustomToolkit.Tool>;
1315
+ }
1316
+
1317
+ export namespace CustomToolkit {
1318
+ export interface Tool {
1319
+ description: string;
1320
+
1321
+ input_schema: { [key: string]: unknown };
1322
+
1323
+ name: string;
1324
+
1325
+ /**
1326
+ * Original tool slug as provided by the user
1327
+ */
1328
+ original_slug: string;
1329
+
1330
+ /**
1331
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
1332
+ */
1333
+ slug: string;
1334
+
1335
+ output_schema?: { [key: string]: unknown };
1336
+ }
1337
+ }
1338
+
1339
+ export interface CustomTool {
1340
+ description: string;
1341
+
1342
+ input_schema: { [key: string]: unknown };
1343
+
1344
+ name: string;
1345
+
1346
+ /**
1347
+ * Original tool slug as provided by the user
1348
+ */
1349
+ original_slug: string;
1350
+
1351
+ /**
1352
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
1353
+ */
1354
+ slug: string;
1355
+
1356
+ extends_toolkit?: string;
1357
+
1358
+ output_schema?: { [key: string]: unknown };
1359
+ }
1360
+ }
1361
+
1362
+ export interface Warning {
1363
+ /**
1364
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1365
+ */
1366
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1367
+
1368
+ /**
1369
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1370
+ * end users.
1371
+ */
1372
+ message: string;
1373
+ }
1374
+ }
1375
+
1376
+ export interface SessionConfigHistoryResponse {
1377
+ current_page: number;
1378
+
1379
+ items: Array<SessionConfigHistoryResponse.Item>;
1380
+
1381
+ total_items: number;
1382
+
1383
+ total_pages: number;
1384
+
1385
+ next_cursor?: string | null;
1386
+ }
1387
+
1388
+ export namespace SessionConfigHistoryResponse {
1389
+ export interface Item {
1390
+ /**
1391
+ * The session configuration at this version
1392
+ */
1393
+ config: Item.Config;
1394
+
1395
+ /**
1396
+ * ISO timestamp. For history rows, when the entry was archived (i.e. the moment
1397
+ * the version was superseded by a PATCH).
1398
+ */
1399
+ created_at: string;
1400
+
1401
+ /**
1402
+ * True only for the live (current) session config, present on the first page.
1403
+ * False for archived history rows.
1404
+ */
1405
+ is_current: boolean;
1406
+
1407
+ /**
1408
+ * The config version this entry represents
1409
+ */
1410
+ version: number;
1411
+ }
1412
+
1413
+ export namespace Item {
1414
+ /**
1415
+ * The session configuration at this version
1416
+ */
1417
+ export interface Config {
1418
+ /**
1419
+ * Execute helper configuration
1420
+ */
1421
+ execute: Config.Execute;
1422
+
1423
+ /**
1424
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1425
+ * is returned as "all".
1426
+ */
1427
+ preload: Config.Preload;
1428
+
1429
+ /**
1430
+ * Search helper configuration
1431
+ */
1432
+ search: Config.Search;
1433
+
1434
+ /**
1435
+ * User identifier for this session
1436
+ */
1437
+ user_id: string;
1438
+
1439
+ /**
1440
+ * Auth config overrides per toolkit
1441
+ */
1442
+ auth_configs?: { [key: string]: string };
1443
+
1444
+ /**
1445
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1446
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1447
+ */
1448
+ connected_accounts?: { [key: string]: Array<string> };
1449
+
1450
+ /**
1451
+ * Manage connections configuration
1452
+ */
1453
+ manage_connections?: Config.ManageConnections;
1454
+
1455
+ /**
1456
+ * Multi-account configuration for this session.
1457
+ */
1458
+ multi_account?: Config.MultiAccount;
1459
+
1460
+ /**
1461
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1462
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1463
+ * tool must NOT have any of. Both conditions must be satisfied.
1464
+ */
1465
+ tags?: Config.Tags;
1466
+
1467
+ /**
1468
+ * Toolkit configuration - either enabled list or disabled list
1469
+ */
1470
+ toolkits?: Config.Enabled | Config.Disabled;
1471
+
1472
+ /**
1473
+ * Tool-level configuration per toolkit
1474
+ */
1475
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1476
+
1477
+ /**
1478
+ * Workbench configuration
1479
+ */
1480
+ workbench?: Config.Workbench;
1481
+ }
1482
+
1483
+ export namespace Config {
1484
+ /**
1485
+ * Execute helper configuration
1486
+ */
1487
+ export interface Execute {
1488
+ enable_multi_execute?: boolean;
1489
+ }
1490
+
1491
+ /**
1492
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1493
+ * is returned as "all".
1494
+ */
1495
+ export interface Preload {
1496
+ /**
1497
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1498
+ * app tools allowed by its filters.
1499
+ */
1500
+ tools: Array<string> | 'all';
1501
+ }
1502
+
1503
+ /**
1504
+ * Search helper configuration
1505
+ */
1506
+ export interface Search {
1507
+ enable?: boolean;
1508
+ }
1509
+
1510
+ /**
1511
+ * Manage connections configuration
1512
+ */
1513
+ export interface ManageConnections {
1514
+ /**
1515
+ * Custom callback URL for connected account auth flows
1516
+ */
1517
+ callback_url?: string;
1518
+
1519
+ /**
1520
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1521
+ */
1522
+ enable_connection_removal?: boolean;
1523
+
1524
+ /**
1525
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1526
+ * Default false. May not work reliably with GPT models.
1527
+ */
1528
+ enable_wait_for_connections?: boolean;
1529
+
1530
+ /**
1531
+ * Whether to enable the connection manager for automatic connection handling
1532
+ */
1533
+ enabled?: boolean;
1534
+ }
1535
+
1536
+ /**
1537
+ * Multi-account configuration for this session.
1538
+ */
1539
+ export interface MultiAccount {
1540
+ /**
1541
+ * When true, enables multi-account mode for this session. When not set, falls back
1542
+ * to org/project-level configuration.
1543
+ */
1544
+ enable?: boolean;
1545
+
1546
+ /**
1547
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1548
+ * multi-account is enabled.
1549
+ */
1550
+ max_accounts_per_toolkit?: number;
1551
+
1552
+ /**
1553
+ * When true, require explicit account selection when multiple accounts are
1554
+ * connected. When false (default), use the first/default account.
1555
+ */
1556
+ require_explicit_selection?: boolean;
1557
+ }
1558
+
1559
+ /**
1560
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1561
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1562
+ * tool must NOT have any of. Both conditions must be satisfied.
1563
+ */
1564
+ export interface Tags {
1565
+ /**
1566
+ * Tags that the tool must NOT have any of
1567
+ */
1568
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1569
+
1570
+ /**
1571
+ * Tags that the tool must have at least one of
1572
+ */
1573
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1574
+ }
1575
+
1576
+ export interface Enabled {
1577
+ enabled: Array<string>;
1578
+ }
1579
+
1580
+ export interface Disabled {
1581
+ disabled: Array<string>;
1582
+ }
1583
+
1584
+ export interface Enabled {
1585
+ enabled: Array<string>;
1586
+ }
1587
+
1588
+ export interface Disabled {
1589
+ disabled: Array<string>;
1590
+ }
1591
+
1592
+ export interface Tags {
1593
+ tags: Tags.Tags;
1594
+ }
1595
+
1596
+ export namespace Tags {
1597
+ export interface Tags {
1598
+ /**
1599
+ * Tags that the tool must NOT have any of
1600
+ */
1601
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1602
+
1603
+ /**
1604
+ * Tags that the tool must have at least one of
1605
+ */
1606
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1607
+ }
1608
+ }
1609
+
1610
+ /**
1611
+ * Workbench configuration
1612
+ */
1613
+ export interface Workbench {
1614
+ /**
1615
+ * Character threshold after which tool execution response are saved to a file in
1616
+ * workbench. Default is 20k.
1617
+ */
1618
+ auto_offload_threshold?: number;
1619
+
1620
+ /**
1621
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1622
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1623
+ */
1624
+ enable?: boolean;
1625
+
1626
+ /**
1627
+ * Whether proxy execution is enabled in the workbench
1628
+ */
1629
+ proxy_execution_enabled?: boolean;
1630
+
1631
+ /**
1632
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1633
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1634
+ */
1635
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1636
+ }
1637
+ }
1638
+ }
1639
+ }
1640
+
1641
+ export interface SessionExecuteResponse {
1642
+ /**
1643
+ * The data returned by the tool execution
1644
+ */
1645
+ data: { [key: string]: unknown };
1646
+
1647
+ /**
1648
+ * Error message if the execution failed, null otherwise
1649
+ */
1650
+ error: string | null;
1651
+
1652
+ /**
1653
+ * Unique identifier for the execution log
1654
+ */
1655
+ log_id: string;
1656
+ }
1657
+
1658
+ export interface SessionExecuteMetaResponse {
1659
+ /**
1660
+ * The data returned by the tool execution
1661
+ */
1662
+ data: { [key: string]: unknown };
1663
+
1664
+ /**
1665
+ * Error message if the execution failed, null otherwise
1666
+ */
1667
+ error: string | null;
1668
+
1669
+ /**
1670
+ * Unique identifier for the execution log
1671
+ */
1672
+ log_id: string;
1673
+ }
1674
+
1675
+ export interface SessionLinkResponse {
1676
+ /**
1677
+ * The unique identifier for the connected account
1678
+ */
1679
+ connected_account_id: string;
1680
+
1681
+ /**
1682
+ * Token used to complete the authentication flow
1683
+ */
1684
+ link_token: string;
1685
+
1686
+ /**
1687
+ * The URL where users should be redirected to complete OAuth
1688
+ */
1689
+ redirect_url: string;
1690
+ }
1691
+
1692
+ export interface SessionPatchResponse {
1693
+ /**
1694
+ * The configuration used to create this session
1695
+ */
1696
+ config: SessionPatchResponse.Config;
1697
+
1698
+ /**
1699
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
1700
+ * concurrency control.
1701
+ */
1702
+ config_version: number;
1703
+
1704
+ mcp: SessionPatchResponse.Mcp;
1705
+
1706
+ /**
1707
+ * The identifier of the session
1708
+ */
1709
+ session_id: string;
1710
+
1711
+ /**
1712
+ * List of available tools in this session
1713
+ */
1714
+ tool_router_tools: Array<string>;
1715
+
1716
+ /**
1717
+ * Experimental features
1718
+ */
1719
+ experimental?: SessionPatchResponse.Experimental;
1720
+
1721
+ /**
1722
+ * Advisory list — the session exists and is usable, but the listed issues may
1723
+ * warrant attention.
1724
+ */
1725
+ warnings?: Array<SessionPatchResponse.Warning>;
1726
+ }
1727
+
1728
+ export namespace SessionPatchResponse {
1729
+ /**
1730
+ * The configuration used to create this session
1731
+ */
1732
+ export interface Config {
1733
+ /**
1734
+ * Execute helper configuration
1735
+ */
1736
+ execute: Config.Execute;
1737
+
1738
+ /**
1739
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1740
+ * is returned as "all".
1741
+ */
1742
+ preload: Config.Preload;
1743
+
1744
+ /**
1745
+ * Search helper configuration
1746
+ */
1747
+ search: Config.Search;
1748
+
1749
+ /**
1750
+ * User identifier for this session
1751
+ */
1752
+ user_id: string;
1753
+
1754
+ /**
1755
+ * Auth config overrides per toolkit
1756
+ */
1757
+ auth_configs?: { [key: string]: string };
1758
+
1759
+ /**
1760
+ * Per-toolkit connected account overrides (array of nano-IDs). Multi-account
1761
+ * sessions can pin more than one account per toolkit; otherwise length is 1.
1762
+ */
1763
+ connected_accounts?: { [key: string]: Array<string> };
1764
+
1765
+ /**
1766
+ * Manage connections configuration
1767
+ */
1768
+ manage_connections?: Config.ManageConnections;
1769
+
1770
+ /**
1771
+ * Multi-account configuration for this session.
1772
+ */
1773
+ multi_account?: Config.MultiAccount;
1774
+
1775
+ /**
1776
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1777
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1778
+ * tool must NOT have any of. Both conditions must be satisfied.
1779
+ */
1780
+ tags?: Config.Tags;
1781
+
1782
+ /**
1783
+ * Toolkit configuration - either enabled list or disabled list
1784
+ */
1785
+ toolkits?: Config.Enabled | Config.Disabled;
1786
+
1787
+ /**
1788
+ * Tool-level configuration per toolkit
1789
+ */
1790
+ tools?: { [key: string]: Config.Enabled | Config.Disabled | Config.Tags };
1791
+
1792
+ /**
1793
+ * Workbench configuration
1794
+ */
1795
+ workbench?: Config.Workbench;
1796
+ }
1797
+
1798
+ export namespace Config {
1799
+ /**
1800
+ * Execute helper configuration
1801
+ */
1802
+ export interface Execute {
1803
+ enable_multi_execute?: boolean;
1804
+ }
1805
+
1806
+ /**
1807
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1808
+ * is returned as "all".
1809
+ */
1810
+ export interface Preload {
1811
+ /**
1812
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1813
+ * app tools allowed by its filters.
1814
+ */
1815
+ tools: Array<string> | 'all';
1816
+ }
1817
+
1818
+ /**
1819
+ * Search helper configuration
1820
+ */
1821
+ export interface Search {
1822
+ enable?: boolean;
1823
+ }
1824
+
1825
+ /**
1826
+ * Manage connections configuration
1827
+ */
1828
+ export interface ManageConnections {
1829
+ /**
1830
+ * Custom callback URL for connected account auth flows
1831
+ */
1832
+ callback_url?: string;
1833
+
1834
+ /**
1835
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1836
+ */
1837
+ enable_connection_removal?: boolean;
1838
+
1839
+ /**
1840
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1841
+ * Default false. May not work reliably with GPT models.
1842
+ */
1843
+ enable_wait_for_connections?: boolean;
1844
+
1845
+ /**
1846
+ * Whether to enable the connection manager for automatic connection handling
1847
+ */
1848
+ enabled?: boolean;
1849
+ }
1850
+
1851
+ /**
1852
+ * Multi-account configuration for this session.
1853
+ */
1854
+ export interface MultiAccount {
1855
+ /**
1856
+ * When true, enables multi-account mode for this session. When not set, falls back
1857
+ * to org/project-level configuration.
1858
+ */
1859
+ enable?: boolean;
1860
+
1861
+ /**
1862
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1863
+ * multi-account is enabled.
1864
+ */
1865
+ max_accounts_per_toolkit?: number;
1866
+
1867
+ /**
1868
+ * When true, require explicit account selection when multiple accounts are
1869
+ * connected. When false (default), use the first/default account.
1870
+ */
1871
+ require_explicit_selection?: boolean;
1872
+ }
1873
+
1874
+ /**
1875
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1876
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1877
+ * tool must NOT have any of. Both conditions must be satisfied.
1878
+ */
1879
+ export interface Tags {
1880
+ /**
1881
+ * Tags that the tool must NOT have any of
1882
+ */
1883
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1884
+
1885
+ /**
1886
+ * Tags that the tool must have at least one of
1887
+ */
1888
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1889
+ }
1890
+
1891
+ export interface Enabled {
1892
+ enabled: Array<string>;
1893
+ }
1894
+
1895
+ export interface Disabled {
1896
+ disabled: Array<string>;
1897
+ }
1898
+
1899
+ export interface Enabled {
1900
+ enabled: Array<string>;
1901
+ }
1902
+
1903
+ export interface Disabled {
1904
+ disabled: Array<string>;
1905
+ }
1906
+
1907
+ export interface Tags {
1908
+ tags: Tags.Tags;
1909
+ }
1910
+
1911
+ export namespace Tags {
1912
+ export interface Tags {
1913
+ /**
1914
+ * Tags that the tool must NOT have any of
1915
+ */
1916
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1917
+
1918
+ /**
1919
+ * Tags that the tool must have at least one of
1920
+ */
1921
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1922
+ }
1923
+ }
1924
+
1925
+ /**
1926
+ * Workbench configuration
1927
+ */
1928
+ export interface Workbench {
1929
+ /**
1930
+ * Character threshold after which tool execution response are saved to a file in
1931
+ * workbench. Default is 20k.
1932
+ */
1933
+ auto_offload_threshold?: number;
1934
+
1935
+ /**
1936
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1937
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1938
+ */
1939
+ enable?: boolean;
1940
+
1941
+ /**
1942
+ * Whether proxy execution is enabled in the workbench
1943
+ */
1944
+ proxy_execution_enabled?: boolean;
1945
+
1946
+ /**
1947
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1948
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1949
+ */
1950
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1951
+ }
1952
+ }
1953
+
1954
+ export interface Mcp {
1955
+ /**
1956
+ * The type of the MCP server. Can be http
1957
+ */
1958
+ type: 'http';
1959
+
1960
+ /**
1961
+ * The URL of the MCP server
1962
+ */
1963
+ url: string;
1964
+ }
1965
+
1966
+ /**
1967
+ * Experimental features
1968
+ */
1969
+ export interface Experimental {
1970
+ /**
1971
+ * The assistive system prompt for the tool router session
1972
+ */
1973
+ assistive_prompt?: string;
1974
+
1975
+ /**
1976
+ * User-defined custom toolkits with grouped tools (no-auth)
1977
+ */
1978
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1979
+
1980
+ /**
1981
+ * Custom tools — standalone or extending Composio toolkits
1982
+ */
1983
+ custom_tools?: Array<Experimental.CustomTool>;
1984
+ }
1985
+
1986
+ export namespace Experimental {
1987
+ export interface CustomToolkit {
1988
+ description: string;
1989
+
1990
+ name: string;
1991
+
1992
+ slug: string;
1993
+
1994
+ tools: Array<CustomToolkit.Tool>;
1995
+ }
1996
+
1997
+ export namespace CustomToolkit {
1998
+ export interface Tool {
1999
+ description: string;
2000
+
2001
+ input_schema: { [key: string]: unknown };
2002
+
2003
+ name: string;
2004
+
2005
+ /**
2006
+ * Original tool slug as provided by the user
2007
+ */
2008
+ original_slug: string;
2009
+
2010
+ /**
2011
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
2012
+ */
2013
+ slug: string;
2014
+
2015
+ output_schema?: { [key: string]: unknown };
2016
+ }
2017
+ }
2018
+
2019
+ export interface CustomTool {
2020
+ description: string;
2021
+
2022
+ input_schema: { [key: string]: unknown };
2023
+
2024
+ name: string;
2025
+
2026
+ /**
2027
+ * Original tool slug as provided by the user
2028
+ */
2029
+ original_slug: string;
2030
+
2031
+ /**
2032
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
2033
+ */
2034
+ slug: string;
2035
+
2036
+ extends_toolkit?: string;
2037
+
2038
+ output_schema?: { [key: string]: unknown };
2039
+ }
2040
+ }
2041
+
2042
+ export interface Warning {
2043
+ /**
2044
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
2045
+ */
2046
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
2047
+
2048
+ /**
2049
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
2050
+ * end users.
2051
+ */
2052
+ message: string;
2053
+ }
2054
+ }
2055
+
2056
+ export interface SessionProxyExecuteResponse {
2057
+ /**
2058
+ * The HTTP status code returned from the proxied API
2059
+ */
2060
+ status: number;
2061
+
2062
+ /**
2063
+ * Binary body response data. Present when the response is a binary file.
2064
+ */
2065
+ binary_data?: SessionProxyExecuteResponse.BinaryData;
2066
+
2067
+ /**
2068
+ * The response data returned from the proxied API
2069
+ */
2070
+ data?: unknown;
2071
+
2072
+ /**
2073
+ * The HTTP headers returned from the proxied API
2074
+ */
2075
+ headers?: { [key: string]: string };
2076
+ }
2077
+
2078
+ export namespace SessionProxyExecuteResponse {
2079
+ /**
2080
+ * Binary body response data. Present when the response is a binary file.
2081
+ */
2082
+ export interface BinaryData {
2083
+ /**
2084
+ * Content-Type of the binary data
2085
+ */
2086
+ content_type: string;
2087
+
2088
+ /**
2089
+ * File size in bytes
2090
+ */
2091
+ size: number;
2092
+
2093
+ /**
2094
+ * URL to download binary content
2095
+ */
2096
+ url: string;
2097
+
2098
+ /**
2099
+ * ISO 8601 timestamp when the URL expires
2100
+ */
2101
+ expires_at?: string;
2102
+ }
2103
+ }
2104
+
2105
+ export interface SessionSearchResponse {
2106
+ /**
2107
+ * Error message if any searches failed, null if all succeeded. Format: "X out of Y
2108
+ * searches failed, reasons: <details>"
2109
+ */
2110
+ error: string | null;
2111
+
2112
+ /**
2113
+ * Combined workflow guidance covering connections, planner, and memory usage. Each
2114
+ * element is a step instruction.
2115
+ */
2116
+ next_steps_guidance: Array<string>;
2117
+
2118
+ /**
2119
+ * Per-query search results with tools, reasoning, and memory. One entry per query
2120
+ * in request order.
2121
+ */
2122
+ results: Array<SessionSearchResponse.Result>;
2123
+
2124
+ /**
2125
+ * Session info for correlating meta tool calls
2126
+ */
2127
+ session: SessionSearchResponse.Session;
2128
+
2129
+ /**
2130
+ * Whether all searches completed successfully. False if any query failed.
2131
+ */
2132
+ success: boolean;
2133
+
2134
+ /**
2135
+ * Time information for the query
2136
+ */
2137
+ time_info: SessionSearchResponse.TimeInfo;
2138
+
2139
+ /**
2140
+ * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
2141
+ * appears once even if used in multiple queries.
2142
+ */
2143
+ tool_schemas: { [key: string]: SessionSearchResponse.ToolSchemas };
2144
+
2145
+ /**
2146
+ * Connection status for all toolkits mentioned across all queries, with
2147
+ * descriptions merged in.
2148
+ */
2149
+ toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
2150
+ }
2151
+
2152
+ export namespace SessionSearchResponse {
2153
+ export interface Result {
2154
+ /**
2155
+ * 1-based index of the query in the request
2156
+ */
2157
+ index: number;
2158
+
2159
+ /**
2160
+ * List of main tool slugs matching the search criteria
2161
+ */
2162
+ primary_tool_slugs: Array<string>;
2163
+
2164
+ /**
2165
+ * List of related tool slugs that might be useful
2166
+ */
2167
+ related_tool_slugs: Array<string>;
2168
+
2169
+ /**
2170
+ * List of unique toolkit slugs used by tools in this query
2171
+ */
2172
+ toolkits: Array<string>;
2173
+
2174
+ /**
2175
+ * The use case that was searched
2176
+ */
2177
+ use_case: string;
2178
+
2179
+ /**
2180
+ * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
2181
+ * known parameters")
2182
+ */
2183
+ difficulty?: string;
2184
+
2185
+ /**
2186
+ * Error message if the search for this query failed, null otherwise. Always
2187
+ * present for failed queries.
2188
+ */
2189
+ error?: string | null;
2190
+
2191
+ /**
2192
+ * Guidance message about the search results, particularly when a cached plan is
2193
+ * available
2194
+ */
2195
+ execution_guidance?: string;
2196
+
2197
+ /**
2198
+ * Common pitfalls and considerations (only present when cached plan is available)
2199
+ */
2200
+ known_pitfalls?: Array<string>;
2201
+
2202
+ /**
2203
+ * Memory data relevant to this query, grouped by app. Only present for non-cached
2204
+ * search results.
2205
+ */
2206
+ memory?: { [key: string]: Array<string> };
2207
+
2208
+ /**
2209
+ * ID of cached plan if available
2210
+ */
2211
+ plan_id?: string;
2212
+
2213
+ /**
2214
+ * Workflow steps from cached plan (only present when cached plan is available)
2215
+ */
2216
+ recommended_plan_steps?: Array<string>;
2217
+
2218
+ /**
2219
+ * Reference Python code snippets for processing tool responses in the workbench
2220
+ * (only present when cached plan is available)
2221
+ */
2222
+ reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
2223
+ }
2224
+
2225
+ export namespace Result {
2226
+ export interface ReferenceWorkbenchSnippet {
2227
+ /**
2228
+ * Python code snippet for the workbench
2229
+ */
2230
+ code: string;
2231
+
2232
+ /**
2233
+ * Description of what the code snippet does
2234
+ */
2235
+ description: string;
2236
+ }
2237
+ }
2238
+
2239
+ /**
2240
+ * Session info for correlating meta tool calls
2241
+ */
2242
+ export interface Session {
2243
+ /**
2244
+ * Session identifier to be passed to subsequent meta tool calls as session_id.
2245
+ */
2246
+ id: string;
2247
+
2248
+ /**
2249
+ * Whether a fresh session id was generated in this call.
2250
+ */
2251
+ generate_id: boolean;
2252
+
2253
+ /**
2254
+ * LLM-facing guidance on how to reuse this session id
2255
+ */
2256
+ instructions: string;
2257
+ }
2258
+
2259
+ /**
2260
+ * Time information for the query
2261
+ */
2262
+ export interface TimeInfo {
2263
+ /**
2264
+ * Current time in ISO format (UTC)
2265
+ */
2266
+ current_time_utc: string;
2267
+
2268
+ /**
2269
+ * Current time as Unix epoch timestamp in seconds
2270
+ */
2271
+ current_time_utc_epoch_seconds: number;
2272
+
2273
+ /**
2274
+ * Important message about time handling and timezone considerations
2275
+ */
2276
+ message: string;
2277
+ }
2278
+
2279
+ export interface ToolSchemas {
2280
+ /**
2281
+ * The slug of the tool
2282
+ */
2283
+ tool_slug: string;
2284
+
2285
+ /**
2286
+ * The slug of the toolkit that provides this tool
2287
+ */
2288
+ toolkit: string;
2289
+
2290
+ /**
2291
+ * Description of the tool
2292
+ */
2293
+ description?: string;
2294
+
2295
+ /**
2296
+ * Whether the full input_schema is included in this response
2297
+ */
2298
+ hasFullSchema?: boolean;
2299
+
2300
+ /**
2301
+ * Input schema for the tool (only present when hasFullSchema is true)
2302
+ */
2303
+ input_schema?: { [key: string]: unknown };
2304
+
2305
+ /**
2306
+ * Output/response schema for the tool. Only included when include_output_schemas
2307
+ * is true.
2308
+ */
2309
+ output_schema?: { [key: string]: unknown };
2310
+
2311
+ /**
2312
+ * Reference to fetch full schema when hasFullSchema is false
2313
+ */
2314
+ schemaRef?: ToolSchemas.SchemaRef;
2315
+ }
2316
+
2317
+ export namespace ToolSchemas {
2318
+ /**
2319
+ * Reference to fetch full schema when hasFullSchema is false
2320
+ */
2321
+ export interface SchemaRef {
2322
+ /**
2323
+ * Arguments to pass to the tool
2324
+ */
2325
+ args: SchemaRef.Args;
2326
+
2327
+ /**
2328
+ * Tool to call
2329
+ */
2330
+ tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
2331
+
2332
+ /**
2333
+ * Instruction message for the LLM
2334
+ */
2335
+ message?: string;
2336
+ }
2337
+
2338
+ export namespace SchemaRef {
2339
+ /**
2340
+ * Arguments to pass to the tool
2341
+ */
2342
+ export interface Args {
2343
+ /**
2344
+ * Tool slugs to fetch schemas for
2345
+ */
2346
+ tool_slugs: Array<string>;
2347
+ }
2348
+ }
2349
+ }
2350
+
2351
+ export interface ToolkitConnectionStatus {
2352
+ /**
2353
+ * Description of what the toolkit does and its capabilities
2354
+ */
2355
+ description: string;
2356
+
2357
+ /**
2358
+ * Whether an active connection exists for this toolkit
2359
+ */
2360
+ has_active_connection: boolean;
2361
+
2362
+ /**
2363
+ * Human-readable message about the connection status and next steps
2364
+ */
2365
+ status_message: string;
2366
+
2367
+ /**
2368
+ * The toolkit slug identifier (e.g., "gmail", "slack")
2369
+ */
2370
+ toolkit: string;
2371
+
2372
+ /**
2373
+ * When "required", the agent must specify which account to use. Present only when
2374
+ * multiple accounts exist.
2375
+ */
2376
+ account_selection?: 'required';
2377
+
2378
+ /**
2379
+ * List of connected accounts for this toolkit. Present when multi-account is
2380
+ * enabled.
2381
+ */
2382
+ accounts?: Array<ToolkitConnectionStatus.Account>;
2383
+
2384
+ /**
2385
+ * Connection details including auth config and connected account IDs. Only present
2386
+ * when has_active_connection is true.
2387
+ */
2388
+ connection_details?: { [key: string]: unknown };
2389
+
2390
+ /**
2391
+ * Information about the currently connected user (email, name, etc.)
2392
+ */
2393
+ current_user_info?: { [key: string]: unknown };
2394
+ }
2395
+
2396
+ export namespace ToolkitConnectionStatus {
2397
+ export interface Account {
2398
+ /**
2399
+ * Unique identifier for this account
2400
+ */
2401
+ id: string;
2402
+
2403
+ /**
2404
+ * ISO 8601 timestamp of when the account was connected
2405
+ */
2406
+ created_at: string;
2407
+
2408
+ /**
2409
+ * Whether this is the default account for the toolkit
2410
+ */
2411
+ is_default: boolean;
2412
+
2413
+ /**
2414
+ * Connection status (e.g., "active")
2415
+ */
2416
+ status: string;
2417
+
2418
+ /**
2419
+ * User-assigned alias for this account
2420
+ */
2421
+ alias?: string;
2422
+
2423
+ /**
2424
+ * Information about the connected user (email, name, etc.)
2425
+ */
2426
+ user_info?: { [key: string]: unknown };
2427
+ }
2428
+ }
2429
+ }
2430
+
2431
+ export interface SessionToolkitsResponse {
2432
+ current_page: number;
2433
+
2434
+ items: Array<SessionToolkitsResponse.Item>;
2435
+
2436
+ total_items: number;
2437
+
2438
+ total_pages: number;
2439
+
2440
+ next_cursor?: string | null;
2441
+ }
2442
+
2443
+ export namespace SessionToolkitsResponse {
2444
+ export interface Item {
2445
+ /**
2446
+ * Available Composio-managed auth schemes
2447
+ */
2448
+ composio_managed_auth_schemes: Array<string>;
2449
+
2450
+ /**
2451
+ * Connected account if available
2452
+ */
2453
+ connected_account: Item.ConnectedAccount | null;
2454
+
2455
+ /**
2456
+ * Whether the toolkit is enabled
2457
+ */
2458
+ enabled: boolean;
2459
+
2460
+ /**
2461
+ * Whether the toolkit is no-auth
2462
+ */
2463
+ is_no_auth: boolean;
2464
+
2465
+ /**
2466
+ * Toolkit metadata
2467
+ */
2468
+ meta: Item.Meta;
2469
+
2470
+ /**
2471
+ * Display name of the toolkit
2472
+ */
2473
+ name: string;
2474
+
2475
+ /**
2476
+ * Unique slug identifier
2477
+ */
2478
+ slug: string;
2479
+ }
2480
+
2481
+ export namespace Item {
2482
+ /**
2483
+ * Connected account if available
2484
+ */
2485
+ export interface ConnectedAccount {
2486
+ /**
2487
+ * Connected account identifier
2488
+ */
2489
+ id: string;
2490
+
2491
+ /**
2492
+ * Auth config details
2493
+ */
2494
+ auth_config: ConnectedAccount.AuthConfig;
2495
+
2496
+ /**
2497
+ * Creation timestamp
2498
+ */
2499
+ created_at: string;
2500
+
2501
+ /**
2502
+ * Connection status
2503
+ */
2504
+ status: string;
2505
+
2506
+ /**
2507
+ * User identifier
2508
+ */
2509
+ user_id: string;
2510
+ }
2511
+
2512
+ export namespace ConnectedAccount {
2513
+ /**
2514
+ * Auth config details
2515
+ */
2516
+ export interface AuthConfig {
2517
+ /**
2518
+ * Auth config identifier
2519
+ */
2520
+ id: string;
2521
+
2522
+ /**
2523
+ * Authentication scheme type
2524
+ */
2525
+ auth_scheme: string;
2526
+
2527
+ /**
2528
+ * Whether this is a Composio-managed auth config
2529
+ */
2530
+ is_composio_managed: boolean;
2531
+ }
2532
+ }
2533
+
2534
+ /**
2535
+ * Toolkit metadata
2536
+ */
2537
+ export interface Meta {
2538
+ /**
2539
+ * Description of the toolkit
2540
+ */
2541
+ description: string;
2542
+
2543
+ /**
2544
+ * URL to the toolkit logo
2545
+ */
2546
+ logo: string;
2547
+ }
2548
+ }
2549
+ }
2550
+
2551
+ export interface SessionToolsResponse {
2552
+ current_page: number;
2553
+
2554
+ items: Array<SessionToolsResponse.Item>;
2555
+
2556
+ total_items: number;
2557
+
2558
+ total_pages: number;
2559
+
2560
+ next_cursor?: string | null;
2561
+ }
2562
+
2563
+ export namespace SessionToolsResponse {
2564
+ export interface Item {
2565
+ /**
2566
+ * List of all available versions for this tool
2567
+ */
2568
+ available_versions: Array<string>;
2569
+
2570
+ deprecated: Item.Deprecated;
2571
+
2572
+ /**
2573
+ * Detailed explanation of the tool's functionality and purpose
2574
+ */
2575
+ description: string;
2576
+
2577
+ /**
2578
+ * Schema definition of required input parameters for the tool
2579
+ */
2580
+ input_parameters: { [key: string]: unknown };
2581
+
2582
+ /**
2583
+ * Indicates if this tool is deprecated and may be removed in the future
2584
+ */
2585
+ is_deprecated: boolean;
2586
+
2587
+ /**
2588
+ * Human-readable display name of the tool
2589
+ */
2590
+ name: string;
2591
+
2592
+ /**
2593
+ * Indicates if the tool can be used without authentication
2594
+ */
2595
+ no_auth: boolean;
2596
+
2597
+ /**
2598
+ * Schema definition of return values from the tool
2599
+ */
2600
+ output_parameters: { [key: string]: unknown };
2601
+
2602
+ /**
2603
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2604
+ * only exposes flat scopes.
2605
+ */
2606
+ scope_requirements: Item.ScopeRequirements | null;
2607
+
2608
+ /**
2609
+ * List of scopes associated with the tool
2610
+ */
2611
+ scopes: Array<string>;
2612
+
2613
+ /**
2614
+ * Unique identifier for the tool
2615
+ */
2616
+ slug: string;
2617
+
2618
+ /**
2619
+ * List of tags associated with the tool for categorization and filtering
2620
+ */
2621
+ tags: Array<string>;
2622
+
2623
+ toolkit: Item.Toolkit;
2624
+
2625
+ /**
2626
+ * Current version of the tool
2627
+ */
2628
+ version: string;
2629
+
2630
+ /**
2631
+ * Human-friendly description of the tool, if available
2632
+ */
2633
+ human_description?: string;
2634
+ }
2635
+
2636
+ export namespace Item {
2637
+ export interface Deprecated {
2638
+ /**
2639
+ * List of all available versions for this tool
2640
+ */
2641
+ available_versions: Array<string>;
2642
+
2643
+ /**
2644
+ * The display name of the tool
2645
+ */
2646
+ displayName: string;
2647
+
2648
+ /**
2649
+ * Indicates if this tool is deprecated and may be removed in the future
2650
+ */
2651
+ is_deprecated: boolean;
2652
+
2653
+ toolkit: Deprecated.Toolkit;
2654
+
2655
+ /**
2656
+ * Current version identifier of the tool
2657
+ */
2658
+ version: string;
2659
+ }
2660
+
2661
+ export namespace Deprecated {
2662
+ export interface Toolkit {
2663
+ /**
2664
+ * URL to the toolkit logo image
2665
+ */
2666
+ logo: string;
2667
+ }
2668
+ }
2669
+
2670
+ /**
2671
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2672
+ * only exposes flat scopes.
2673
+ */
2674
+ export interface ScopeRequirements {
2675
+ all_of: Array<string | ScopeRequirements.AnyOf>;
2676
+ }
2677
+
2678
+ export namespace ScopeRequirements {
2679
+ export interface AnyOf {
2680
+ any_of: Array<string>;
2681
+ }
2682
+ }
2683
+
2684
+ export interface Toolkit {
2685
+ /**
2686
+ * URL to the toolkit logo image
2687
+ */
2688
+ logo: string;
2689
+
2690
+ /**
2691
+ * Human-readable name of the parent toolkit
2692
+ */
2693
+ name: string;
2694
+
2695
+ /**
2696
+ * Unique identifier of the parent toolkit
2697
+ */
2698
+ slug: string;
2699
+ }
2700
+ }
2701
+ }
2702
+
2703
+ export interface SessionCreateParams {
2704
+ /**
2705
+ * The identifier of the user who is initiating the session, ideally a unique
2706
+ * identifier from your database like a user ID or email address
2707
+ */
2708
+ user_id: string;
2709
+
2710
+ /**
2711
+ * The auth configs to use for the session. This will override the default behavior
2712
+ * and use the given auth config when specific toolkits are being executed
2713
+ */
2714
+ auth_configs?: { [key: string]: string };
2715
+
2716
+ /**
2717
+ * The connected accounts to use for the session, as an array of nano-IDs per
2718
+ * toolkit. This overrides the default behaviour and pins specific connected
2719
+ * accounts when toolkits are executed. Each account must exist (not deleted or
2720
+ * disabled) and belong to the same `user_id` as the session. Multi-account
2721
+ * sessions can pin multiple; non-multi-account sessions are capped at length 1.
2722
+ */
2723
+ connected_accounts?: { [key: string]: Array<string> };
2724
+
2725
+ execute?: SessionCreateParams.Execute;
2726
+
2727
+ /**
2728
+ * Experimental features - not stable, may be modified or removed in future
2729
+ * versions.
2730
+ */
2731
+ experimental?: SessionCreateParams.Experimental;
2732
+
2733
+ /**
2734
+ * Configuration for connection management settings
2735
+ */
2736
+ manage_connections?: SessionCreateParams.ManageConnections;
2737
+
2738
+ /**
2739
+ * Configure multi-account behavior. When enabled, users can connect multiple
2740
+ * accounts per toolkit.
2741
+ */
2742
+ multi_account?: SessionCreateParams.MultiAccount;
2743
+
2744
+ /**
2745
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
2746
+ * "all" to dynamically expose every app tool allowed by positive
2747
+ * toolkits/tools/tags filters.
2748
+ */
2749
+ preload?: SessionCreateParams.Preload;
2750
+
2751
+ search?: SessionCreateParams.Search;
2752
+
2753
+ /**
2754
+ * Global MCP tool annotation hints for filtering. Array format is treated as
2755
+ * enabled list. Object format supports both enabled (tool must have at least one)
2756
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
2757
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
2758
+ */
2759
+ tags?:
2760
+ | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
2761
+ | SessionCreateParams.UnionMember1;
2762
+
2763
+ /**
2764
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
2765
+ * toolkits (denylist). Mutually exclusive.
2766
+ */
2767
+ toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
2768
+
2769
+ /**
2770
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
2771
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
2772
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
2773
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
2774
+ * match.
2775
+ */
2776
+ tools?: {
2777
+ [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
2778
+ };
2779
+
2780
+ /**
2781
+ * Configuration for workbench behavior
2782
+ */
2783
+ workbench?: SessionCreateParams.Workbench;
2784
+ }
2785
+
2786
+ export namespace SessionCreateParams {
2787
+ export interface Execute {
2788
+ enable_multi_execute?: boolean;
2789
+ }
2790
+
2791
+ /**
2792
+ * Experimental features - not stable, may be modified or removed in future
2793
+ * versions.
2794
+ */
2795
+ export interface Experimental {
2796
+ /**
2797
+ * Customize assistive prompt generation (e.g., timezone).
2798
+ */
2799
+ assistive_prompt_config?: Experimental.AssistivePromptConfig;
2800
+
2801
+ /**
2802
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
2803
+ * existing Composio toolkits. All tools are no-auth.
2804
+ */
2805
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
2806
+
2807
+ /**
2808
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
2809
+ * extends_toolkit inherit the Composio toolkit's connection.
2810
+ */
2811
+ custom_tools?: Array<Experimental.CustomTool>;
2812
+
2813
+ /**
2814
+ * Experimental base URL override for connection link redirects created from this
2815
+ * tool-router session. When set, link creation returns
2816
+ * `${link_url_overwrite}/link/{link_token}` instead of the default Composio
2817
+ * Connect base URL. Use only when your integration needs links to open through a
2818
+ * custom Connect host.
2819
+ */
2820
+ link_url_overwrite?: string;
2821
+
2822
+ /**
2823
+ * Per-tool elicitation permission config. Default behavior + per-tool
2824
+ * always_allow/always_deny overrides. Mutation via PATCH.
2825
+ */
2826
+ permissions?: Experimental.Permissions;
2827
+ }
2828
+
2829
+ export namespace Experimental {
2830
+ /**
2831
+ * Customize assistive prompt generation (e.g., timezone).
2832
+ */
2833
+ export interface AssistivePromptConfig {
2834
+ /**
2835
+ * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
2836
+ * customize the system prompt with timezone-aware instructions.
2837
+ */
2838
+ user_timezone?: string;
2839
+ }
2840
+
2841
+ export interface CustomToolkit {
2842
+ /**
2843
+ * Used for BM25 search matching and shown in toolkit connection statuses.
2844
+ */
2845
+ description: string;
2846
+
2847
+ /**
2848
+ * Display name shown to the LLM and in search results.
2849
+ */
2850
+ name: string;
2851
+
2852
+ /**
2853
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
2854
+ * slugs. Alphanumeric, underscores, and hyphens only.
2855
+ */
2856
+ slug: string;
2857
+
2858
+ /**
2859
+ * Tools in this custom toolkit
2860
+ */
2861
+ tools: Array<CustomToolkit.Tool>;
2862
+
2863
+ /**
2864
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2865
+ * in create/attach responses for inline custom definitions.
2866
+ */
2867
+ preload?: boolean;
2868
+ }
2869
+
2870
+ export namespace CustomToolkit {
2871
+ export interface Tool {
2872
+ /**
2873
+ * Used for BM25 search matching and shown to the LLM.
2874
+ */
2875
+ description: string;
2876
+
2877
+ /**
2878
+ * Must have type: "object" and a properties field.
2879
+ */
2880
+ input_schema: { [key: string]: unknown };
2881
+
2882
+ /**
2883
+ * Human-readable display name
2884
+ */
2885
+ name: string;
2886
+
2887
+ /**
2888
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
2889
+ * chars total).
2890
+ */
2891
+ slug: string;
2892
+
2893
+ /**
2894
+ * Optional output schema for the tool response.
2895
+ */
2896
+ output_schema?: { [key: string]: unknown };
2897
+
2898
+ /**
2899
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2900
+ * in create/attach responses for inline custom definitions.
2901
+ */
2902
+ preload?: boolean;
2903
+ }
2904
+ }
2905
+
2906
+ export interface CustomTool {
2907
+ /**
2908
+ * Used for BM25 search matching and shown to the LLM.
2909
+ */
2910
+ description: string;
2911
+
2912
+ /**
2913
+ * Must have type: "object" and a properties field.
2914
+ */
2915
+ input_schema: { [key: string]: unknown };
2916
+
2917
+ /**
2918
+ * Human-readable display name
2919
+ */
2920
+ name: string;
2921
+
2922
+ /**
2923
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
2924
+ * (extending). Max 60 chars total.
2925
+ */
2926
+ slug: string;
2927
+
2928
+ /**
2929
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
2930
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
2931
+ */
2932
+ extends_toolkit?: string;
2933
+
2934
+ /**
2935
+ * JSON Schema describing tool output (optional)
2936
+ */
2937
+ output_schema?: { [key: string]: unknown };
2938
+
2939
+ /**
2940
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
2941
+ * in create/attach responses for inline custom definitions.
2942
+ */
2943
+ preload?: boolean;
2944
+ }
2945
+
2946
+ /**
2947
+ * Per-tool elicitation permission config. Default behavior + per-tool
2948
+ * always_allow/always_deny overrides. Mutation via PATCH.
2949
+ */
2950
+ export interface Permissions {
2951
+ /**
2952
+ * Default elicitation behavior when no override matches. `allow_all` runs every
2953
+ * tool without prompting; `ask_every_call` prompts on each invocation;
2954
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
2955
+ * session.
2956
+ */
2957
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
2958
+
2959
+ /**
2960
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
2961
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
2962
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
2963
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
2964
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
2965
+ * every call with allow-once/allow-session/deny, ignoring any cached session
2966
+ * allow. Overrides take precedence over `default`.
2967
+ */
2968
+ overrides?: { [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always' };
2969
+ }
2970
+ }
2971
+
2972
+ /**
2973
+ * Configuration for connection management settings
2974
+ */
2975
+ export interface ManageConnections {
2976
+ /**
2977
+ * The URL to redirect to after a user completes authentication for a connected
2978
+ * account. This allows you to handle the auth callback in your own application.
2979
+ */
2980
+ callback_url?: string;
2981
+
2982
+ /**
2983
+ * Whether to enable the connection manager for automatic connection handling. If
2984
+ * true, we will provide a tool your agent can use to initiate connections to
2985
+ * toolkits if it doesnt exist. If set to false, then you have to manage
2986
+ * connections manually.
2987
+ */
2988
+ enable?: boolean | null;
2989
+
2990
+ /**
2991
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS to allow deleting
2992
+ * connected accounts. Default true.
2993
+ */
2994
+ enable_connection_removal?: boolean | null;
2995
+
2996
+ /**
2997
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
2998
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
2999
+ * not work reliably with GPT models.
3000
+ */
3001
+ enable_wait_for_connections?: boolean | null;
3002
+ }
3003
+
3004
+ /**
3005
+ * Configure multi-account behavior. When enabled, users can connect multiple
3006
+ * accounts per toolkit.
3007
+ */
3008
+ export interface MultiAccount {
3009
+ /**
3010
+ * When true, enables multi-account mode for this session. When not set, falls back
3011
+ * to org/project-level configuration.
3012
+ */
3013
+ enable?: boolean;
3014
+
3015
+ /**
3016
+ * Maximum number of connected accounts allowed per toolkit. Must be between 2
3017
+ * and 10.
3018
+ */
3019
+ max_accounts_per_toolkit?: number;
3020
+
3021
+ /**
3022
+ * When true, the agent must explicitly select which account to use. When false
3023
+ * (default), the first/default account is used automatically.
3024
+ */
3025
+ require_explicit_selection?: boolean;
3026
+ }
3027
+
3028
+ /**
3029
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3030
+ * "all" to dynamically expose every app tool allowed by positive
3031
+ * toolkits/tools/tags filters.
3032
+ */
3033
+ export interface Preload {
3034
+ /**
3035
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
3036
+ * future app tools allowed by the positive session filters. "all" is capped at
3037
+ * 1000 tools and is not supported without a positive allowlist.
3038
+ */
3039
+ tools?: Array<string> | string;
3040
+ }
3041
+
3042
+ export interface Search {
3043
+ enable?: boolean;
3044
+ }
3045
+
3046
+ export interface UnionMember1 {
3047
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3048
+
3049
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3050
+ }
3051
+
3052
+ /**
3053
+ * Enable only specific toolkits (allowlist)
3054
+ */
3055
+ export interface Enable {
3056
+ /**
3057
+ * Only these specific toolkits will be enabled
3058
+ */
3059
+ enable: Array<string>;
3060
+ }
3061
+
3062
+ /**
3063
+ * Disable specific toolkits (denylist)
3064
+ */
3065
+ export interface Disable {
3066
+ /**
3067
+ * These specific toolkits will be disabled
3068
+ */
3069
+ disable: Array<string>;
3070
+ }
3071
+
3072
+ export interface Enable {
3073
+ /**
3074
+ * Only these specific tools will be available for this toolkit
3075
+ */
3076
+ enable: Array<string>;
3077
+ }
3078
+
3079
+ export interface Disable {
3080
+ /**
3081
+ * These specific tools will be disabled for this toolkit
3082
+ */
3083
+ disable: Array<string>;
3084
+ }
3085
+
3086
+ export interface Tags {
3087
+ /**
3088
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
3089
+ * supports both enabled and disabled lists.
3090
+ */
3091
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
3092
+ }
3093
+
3094
+ export namespace Tags {
3095
+ export interface UnionMember1 {
3096
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3097
+
3098
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3099
+ }
3100
+ }
3101
+
3102
+ /**
3103
+ * Configuration for workbench behavior
3104
+ */
3105
+ export interface Workbench {
3106
+ /**
3107
+ * Character threshold for automatic offloading. When workbench response exceeds
3108
+ * this threshold, it will be automatically offloaded. Default is picked
3109
+ * automatically based on the response size.
3110
+ */
3111
+ auto_offload_threshold?: number;
3112
+
3113
+ /**
3114
+ * Set to false to disable the workbench entirely. When disabled, no code execution
3115
+ * tools are available in the session.
3116
+ */
3117
+ enable?: boolean;
3118
+
3119
+ /**
3120
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
3121
+ * APIs directly.
3122
+ */
3123
+ enable_proxy_execution?: boolean;
3124
+
3125
+ /**
3126
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
3127
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
3128
+ */
3129
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
3130
+ }
3131
+ }
3132
+
3133
+ export interface SessionAttachParams {
3134
+ /**
3135
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3136
+ * customs — pass them on every request that needs them.
3137
+ */
3138
+ experimental?: SessionAttachParams.Experimental;
3139
+ }
3140
+
3141
+ export namespace SessionAttachParams {
3142
+ /**
3143
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3144
+ * customs — pass them on every request that needs them.
3145
+ */
3146
+ export interface Experimental {
3147
+ /**
3148
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3149
+ * existing Composio toolkits. All tools are no-auth.
3150
+ */
3151
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3152
+
3153
+ /**
3154
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3155
+ * extends_toolkit inherit the Composio toolkit's connection.
3156
+ */
3157
+ custom_tools?: Array<Experimental.CustomTool>;
3158
+ }
3159
+
3160
+ export namespace Experimental {
3161
+ export interface CustomToolkit {
3162
+ /**
3163
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3164
+ */
3165
+ description: string;
3166
+
3167
+ /**
3168
+ * Display name shown to the LLM and in search results.
3169
+ */
3170
+ name: string;
3171
+
3172
+ /**
3173
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3174
+ * slugs. Alphanumeric, underscores, and hyphens only.
3175
+ */
3176
+ slug: string;
3177
+
3178
+ /**
3179
+ * Tools in this custom toolkit
3180
+ */
3181
+ tools: Array<CustomToolkit.Tool>;
3182
+
3183
+ /**
3184
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3185
+ * in create/attach responses for inline custom definitions.
3186
+ */
3187
+ preload?: boolean;
3188
+ }
3189
+
3190
+ export namespace CustomToolkit {
3191
+ export interface Tool {
3192
+ /**
3193
+ * Used for BM25 search matching and shown to the LLM.
3194
+ */
3195
+ description: string;
3196
+
3197
+ /**
3198
+ * Must have type: "object" and a properties field.
3199
+ */
3200
+ input_schema: { [key: string]: unknown };
3201
+
3202
+ /**
3203
+ * Human-readable display name
3204
+ */
3205
+ name: string;
3206
+
3207
+ /**
3208
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3209
+ * chars total).
3210
+ */
3211
+ slug: string;
3212
+
3213
+ /**
3214
+ * Optional output schema for the tool response.
3215
+ */
3216
+ output_schema?: { [key: string]: unknown };
3217
+
3218
+ /**
3219
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3220
+ * in create/attach responses for inline custom definitions.
3221
+ */
3222
+ preload?: boolean;
3223
+ }
3224
+ }
3225
+
3226
+ export interface CustomTool {
3227
+ /**
3228
+ * Used for BM25 search matching and shown to the LLM.
3229
+ */
3230
+ description: string;
3231
+
3232
+ /**
3233
+ * Must have type: "object" and a properties field.
3234
+ */
3235
+ input_schema: { [key: string]: unknown };
3236
+
3237
+ /**
3238
+ * Human-readable display name
3239
+ */
3240
+ name: string;
3241
+
3242
+ /**
3243
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3244
+ * (extending). Max 60 chars total.
3245
+ */
3246
+ slug: string;
3247
+
3248
+ /**
3249
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3250
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3251
+ */
3252
+ extends_toolkit?: string;
3253
+
3254
+ /**
3255
+ * JSON Schema describing tool output (optional)
3256
+ */
3257
+ output_schema?: { [key: string]: unknown };
3258
+
3259
+ /**
3260
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3261
+ * in create/attach responses for inline custom definitions.
3262
+ */
3263
+ preload?: boolean;
3264
+ }
3265
+ }
3266
+ }
3267
+
3268
+ export interface SessionConfigHistoryParams {
3269
+ /**
3270
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
3271
+ * limit. The page is the page number and the limit is the number of items per
3272
+ * page. The cursor is used to paginate through the items. The cursor is not
3273
+ * required for the first page.
3274
+ */
3275
+ cursor?: string;
3276
+
3277
+ /**
3278
+ * Number of items per page, max allowed is 100
3279
+ */
3280
+ limit?: number;
3281
+ }
3282
+
3283
+ export interface SessionExecuteParams {
3284
+ /**
3285
+ * The unique slug identifier of the tool to execute. Supports both meta tools and
3286
+ * app tools exposed by the session.
3287
+ */
3288
+ tool_slug: string;
3289
+
3290
+ /**
3291
+ * Account identifier to specify which connected account to use for direct tool
3292
+ * execution. Use the account ID (e.g. "coup_hurricane_dal_analytical") or an
3293
+ * alias. When omitted with a single account, the default is used. When omitted
3294
+ * with multiple accounts, an error lists available accounts. Meta/helper tools
3295
+ * either ignore this top-level field or define their own account-selection fields,
3296
+ * for example COMPOSIO_MULTI_EXECUTE_TOOL.tools[].account.
3297
+ */
3298
+ account?: string;
3299
+
3300
+ /**
3301
+ * The arguments required by the tool
3302
+ */
3303
+ arguments?: { [key: string]: unknown };
3304
+
3305
+ /**
3306
+ * When true, direct non-meta tool execution may return a workbench offload preview
3307
+ * if the response exceeds the configured threshold and the session workbench is
3308
+ * enabled. When omitted or false, direct tool execution returns the normal inline
3309
+ * response. Meta/helper tools are unaffected, and COMPOSIO_MULTI_EXECUTE_TOOL uses
3310
+ * session.workbench configuration for its own batch-level offload behavior.
3311
+ */
3312
+ enable_auto_workbench_offload?: boolean;
3313
+
3314
+ /**
3315
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3316
+ * customs — pass them on every request that needs them.
3317
+ */
3318
+ experimental?: SessionExecuteParams.Experimental;
3319
+ }
3320
+
3321
+ export namespace SessionExecuteParams {
3322
+ /**
3323
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3324
+ * customs — pass them on every request that needs them.
3325
+ */
3326
+ export interface Experimental {
3327
+ /**
3328
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3329
+ * existing Composio toolkits. All tools are no-auth.
3330
+ */
3331
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3332
+
3333
+ /**
3334
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3335
+ * extends_toolkit inherit the Composio toolkit's connection.
3336
+ */
3337
+ custom_tools?: Array<Experimental.CustomTool>;
3338
+ }
3339
+
3340
+ export namespace Experimental {
3341
+ export interface CustomToolkit {
3342
+ /**
3343
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3344
+ */
3345
+ description: string;
3346
+
3347
+ /**
3348
+ * Display name shown to the LLM and in search results.
3349
+ */
3350
+ name: string;
3351
+
3352
+ /**
3353
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3354
+ * slugs. Alphanumeric, underscores, and hyphens only.
3355
+ */
3356
+ slug: string;
3357
+
3358
+ /**
3359
+ * Tools in this custom toolkit
3360
+ */
3361
+ tools: Array<CustomToolkit.Tool>;
3362
+
3363
+ /**
3364
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3365
+ * in create/attach responses for inline custom definitions.
3366
+ */
3367
+ preload?: boolean;
3368
+ }
3369
+
3370
+ export namespace CustomToolkit {
3371
+ export interface Tool {
3372
+ /**
3373
+ * Used for BM25 search matching and shown to the LLM.
3374
+ */
3375
+ description: string;
3376
+
3377
+ /**
3378
+ * Must have type: "object" and a properties field.
3379
+ */
3380
+ input_schema: { [key: string]: unknown };
3381
+
3382
+ /**
3383
+ * Human-readable display name
3384
+ */
3385
+ name: string;
3386
+
3387
+ /**
3388
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3389
+ * chars total).
3390
+ */
3391
+ slug: string;
3392
+
3393
+ /**
3394
+ * Optional output schema for the tool response.
3395
+ */
3396
+ output_schema?: { [key: string]: unknown };
3397
+
3398
+ /**
3399
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3400
+ * in create/attach responses for inline custom definitions.
3401
+ */
3402
+ preload?: boolean;
3403
+ }
3404
+ }
3405
+
3406
+ export interface CustomTool {
3407
+ /**
3408
+ * Used for BM25 search matching and shown to the LLM.
3409
+ */
3410
+ description: string;
3411
+
3412
+ /**
3413
+ * Must have type: "object" and a properties field.
3414
+ */
3415
+ input_schema: { [key: string]: unknown };
3416
+
3417
+ /**
3418
+ * Human-readable display name
3419
+ */
3420
+ name: string;
3421
+
3422
+ /**
3423
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3424
+ * (extending). Max 60 chars total.
3425
+ */
3426
+ slug: string;
3427
+
3428
+ /**
3429
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3430
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3431
+ */
3432
+ extends_toolkit?: string;
3433
+
3434
+ /**
3435
+ * JSON Schema describing tool output (optional)
3436
+ */
3437
+ output_schema?: { [key: string]: unknown };
3438
+
3439
+ /**
3440
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3441
+ * in create/attach responses for inline custom definitions.
3442
+ */
3443
+ preload?: boolean;
3444
+ }
3445
+ }
3446
+ }
3447
+
3448
+ export interface SessionExecuteMetaParams {
3449
+ /**
3450
+ * The unique slug identifier of the meta tool to execute
3451
+ */
3452
+ slug:
3453
+ | 'COMPOSIO_SEARCH_TOOLS'
3454
+ | 'COMPOSIO_MULTI_EXECUTE_TOOL'
3455
+ | 'COMPOSIO_MANAGE_CONNECTIONS'
3456
+ | 'COMPOSIO_WAIT_FOR_CONNECTIONS'
3457
+ | 'COMPOSIO_REMOTE_WORKBENCH'
3458
+ | 'COMPOSIO_REMOTE_BASH_TOOL'
3459
+ | 'COMPOSIO_GET_TOOL_SCHEMAS'
3460
+ | 'COMPOSIO_UPSERT_RECIPE'
3461
+ | 'COMPOSIO_GET_RECIPE';
3462
+
3463
+ /**
3464
+ * The arguments required by the meta tool
3465
+ */
3466
+ arguments?: { [key: string]: unknown };
3467
+
3468
+ /**
3469
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3470
+ * customs — pass them on every request that needs them.
3471
+ */
3472
+ experimental?: SessionExecuteMetaParams.Experimental;
3473
+ }
3474
+
3475
+ export namespace SessionExecuteMetaParams {
3476
+ /**
3477
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3478
+ * customs — pass them on every request that needs them.
3479
+ */
3480
+ export interface Experimental {
3481
+ /**
3482
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3483
+ * existing Composio toolkits. All tools are no-auth.
3484
+ */
3485
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3486
+
3487
+ /**
3488
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3489
+ * extends_toolkit inherit the Composio toolkit's connection.
3490
+ */
3491
+ custom_tools?: Array<Experimental.CustomTool>;
3492
+ }
3493
+
3494
+ export namespace Experimental {
3495
+ export interface CustomToolkit {
3496
+ /**
3497
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3498
+ */
3499
+ description: string;
3500
+
3501
+ /**
3502
+ * Display name shown to the LLM and in search results.
3503
+ */
3504
+ name: string;
3505
+
3506
+ /**
3507
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3508
+ * slugs. Alphanumeric, underscores, and hyphens only.
3509
+ */
3510
+ slug: string;
3511
+
3512
+ /**
3513
+ * Tools in this custom toolkit
3514
+ */
3515
+ tools: Array<CustomToolkit.Tool>;
3516
+
3517
+ /**
3518
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3519
+ * in create/attach responses for inline custom definitions.
3520
+ */
3521
+ preload?: boolean;
3522
+ }
3523
+
3524
+ export namespace CustomToolkit {
3525
+ export interface Tool {
3526
+ /**
3527
+ * Used for BM25 search matching and shown to the LLM.
3528
+ */
3529
+ description: string;
3530
+
3531
+ /**
3532
+ * Must have type: "object" and a properties field.
3533
+ */
3534
+ input_schema: { [key: string]: unknown };
3535
+
3536
+ /**
3537
+ * Human-readable display name
3538
+ */
3539
+ name: string;
3540
+
3541
+ /**
3542
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3543
+ * chars total).
3544
+ */
3545
+ slug: string;
3546
+
3547
+ /**
3548
+ * Optional output schema for the tool response.
3549
+ */
3550
+ output_schema?: { [key: string]: unknown };
3551
+
3552
+ /**
3553
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3554
+ * in create/attach responses for inline custom definitions.
3555
+ */
3556
+ preload?: boolean;
3557
+ }
3558
+ }
3559
+
3560
+ export interface CustomTool {
3561
+ /**
3562
+ * Used for BM25 search matching and shown to the LLM.
3563
+ */
3564
+ description: string;
3565
+
3566
+ /**
3567
+ * Must have type: "object" and a properties field.
3568
+ */
3569
+ input_schema: { [key: string]: unknown };
3570
+
3571
+ /**
3572
+ * Human-readable display name
3573
+ */
3574
+ name: string;
3575
+
3576
+ /**
3577
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3578
+ * (extending). Max 60 chars total.
3579
+ */
3580
+ slug: string;
3581
+
3582
+ /**
3583
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3584
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3585
+ */
3586
+ extends_toolkit?: string;
3587
+
3588
+ /**
3589
+ * JSON Schema describing tool output (optional)
3590
+ */
3591
+ output_schema?: { [key: string]: unknown };
3592
+
3593
+ /**
3594
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
3595
+ * in create/attach responses for inline custom definitions.
3596
+ */
3597
+ preload?: boolean;
3598
+ }
3599
+ }
3600
+ }
3601
+
3602
+ export interface SessionLinkParams {
3603
+ /**
3604
+ * The unique slug identifier of the toolkit to connect
3605
+ */
3606
+ toolkit: string;
3607
+
3608
+ /**
3609
+ * A human-readable alias for this connected account. Must be unique per entity and
3610
+ * toolkit within the project.
3611
+ */
3612
+ alias?: string;
3613
+
3614
+ /**
3615
+ * URL where users will be redirected after completing auth
3616
+ */
3617
+ callback_url?: string;
3618
+ }
3619
+
3620
+ export interface SessionPatchParams {
3621
+ /**
3622
+ * The auth configs to use for the session. This will override the default behavior
3623
+ * and use the given auth config when specific toolkits are being executed
3624
+ */
3625
+ auth_configs?: { [key: string]: string };
3626
+
3627
+ /**
3628
+ * The connected accounts to use for the session, as an array of nano-IDs per
3629
+ * toolkit. This overrides the default behaviour and pins specific connected
3630
+ * accounts when toolkits are executed. Each account must exist (not deleted or
3631
+ * disabled) and belong to the same `user_id` as the session. Multi-account
3632
+ * sessions can pin multiple; non-multi-account sessions are capped at length 1.
3633
+ */
3634
+ connected_accounts?: { [key: string]: Array<string> } | null;
3635
+
3636
+ execute?: SessionPatchParams.Execute;
3637
+
3638
+ experimental?: SessionPatchParams.Experimental | null;
3639
+
3640
+ manage_connections?: SessionPatchParams.ManageConnections | null;
3641
+
3642
+ multi_account?: SessionPatchParams.MultiAccount | null;
3643
+
3644
+ /**
3645
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3646
+ * "all" to dynamically expose every app tool allowed by positive
3647
+ * toolkits/tools/tags filters.
3648
+ */
3649
+ preload?: SessionPatchParams.Preload;
3650
+
3651
+ search?: SessionPatchParams.Search;
3652
+
3653
+ /**
3654
+ * Global MCP tool annotation hints for filtering. Array format is treated as
3655
+ * enabled list. Object format supports both enabled (tool must have at least one)
3656
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
3657
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
3658
+ */
3659
+ tags?:
3660
+ | Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>
3661
+ | SessionPatchParams.UnionMember1;
3662
+
3663
+ /**
3664
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
3665
+ * toolkits (denylist). Mutually exclusive.
3666
+ */
3667
+ toolkits?: SessionPatchParams.Enable | SessionPatchParams.Disable;
3668
+
3669
+ /**
3670
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
3671
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
3672
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
3673
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
3674
+ * match.
3675
+ */
3676
+ tools?: { [key: string]: SessionPatchParams.Enable | SessionPatchParams.Disable | SessionPatchParams.Tags };
3677
+
3678
+ workbench?: SessionPatchParams.Workbench | null;
3679
+ }
3680
+
3681
+ export namespace SessionPatchParams {
3682
+ export interface Execute {
3683
+ enable_multi_execute?: boolean;
3684
+ }
3685
+
3686
+ export interface Experimental {
3687
+ /**
3688
+ * Experimental base URL override for connection link redirects created from this
3689
+ * tool-router session. When set, link creation returns
3690
+ * `${link_url_overwrite}/link/{link_token}` instead of the default Composio
3691
+ * Connect base URL. Use only when your integration needs links to open through a
3692
+ * custom Connect host.
3693
+ */
3694
+ link_url_overwrite?: string;
3695
+
3696
+ /**
3697
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3698
+ */
3699
+ permissions?: Experimental.Permissions;
3700
+ }
3701
+
3702
+ export namespace Experimental {
3703
+ /**
3704
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3705
+ */
3706
+ export interface Permissions {
3707
+ /**
3708
+ * Default elicitation behavior when no override matches. `allow_all` runs every
3709
+ * tool without prompting; `ask_every_call` prompts on each invocation;
3710
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
3711
+ * session.
3712
+ */
3713
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
3714
+
3715
+ /**
3716
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
3717
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
3718
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
3719
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
3720
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
3721
+ * every call with allow-once/allow-session/deny, ignoring any cached session
3722
+ * allow. Overrides take precedence over `default`.
3723
+ */
3724
+ overrides?: { [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always' };
3725
+ }
3726
+ }
3727
+
3728
+ export interface ManageConnections {
3729
+ /**
3730
+ * The URL to redirect to after a user completes authentication for a connected
3731
+ * account. This allows you to handle the auth callback in your own application.
3732
+ */
3733
+ callback_url?: string;
3734
+
3735
+ /**
3736
+ * Whether to enable the connection manager for automatic connection handling. If
3737
+ * true, we will provide a tool your agent can use to initiate connections to
3738
+ * toolkits if it doesnt exist. If set to false, then you have to manage
3739
+ * connections manually.
3740
+ */
3741
+ enable?: boolean | null;
3742
+
3743
+ /**
3744
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS to allow deleting
3745
+ * connected accounts. Default true.
3746
+ */
3747
+ enable_connection_removal?: boolean | null;
3748
+
3749
+ /**
3750
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
3751
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
3752
+ * not work reliably with GPT models.
3753
+ */
3754
+ enable_wait_for_connections?: boolean | null;
3755
+ }
3756
+
3757
+ export interface MultiAccount {
3758
+ /**
3759
+ * When true, enables multi-account mode for this session. When not set, falls back
3760
+ * to org/project-level configuration.
3761
+ */
3762
+ enable?: boolean;
3763
+
3764
+ /**
3765
+ * Maximum number of connected accounts allowed per toolkit. Must be between 2
3766
+ * and 10.
3767
+ */
3768
+ max_accounts_per_toolkit?: number;
3769
+
3770
+ /**
3771
+ * When true, the agent must explicitly select which account to use. When false
3772
+ * (default), the first/default account is used automatically.
3773
+ */
3774
+ require_explicit_selection?: boolean;
3775
+ }
3776
+
3777
+ /**
3778
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3779
+ * "all" to dynamically expose every app tool allowed by positive
3780
+ * toolkits/tools/tags filters.
3781
+ */
3782
+ export interface Preload {
3783
+ /**
3784
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
3785
+ * future app tools allowed by the positive session filters. "all" is capped at
3786
+ * 1000 tools and is not supported without a positive allowlist.
3787
+ */
3788
+ tools?: Array<string> | string;
3789
+ }
3790
+
3791
+ export interface Search {
3792
+ enable?: boolean;
3793
+ }
3794
+
3795
+ export interface UnionMember1 {
3796
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3797
+
3798
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3799
+ }
3800
+
3801
+ /**
3802
+ * Enable only specific toolkits (allowlist)
3803
+ */
3804
+ export interface Enable {
3805
+ /**
3806
+ * Only these specific toolkits will be enabled
3807
+ */
3808
+ enable: Array<string>;
3809
+ }
3810
+
3811
+ /**
3812
+ * Disable specific toolkits (denylist)
3813
+ */
3814
+ export interface Disable {
3815
+ /**
3816
+ * These specific toolkits will be disabled
3817
+ */
3818
+ disable: Array<string>;
3819
+ }
3820
+
3821
+ export interface Enable {
3822
+ /**
3823
+ * Only these specific tools will be available for this toolkit
3824
+ */
3825
+ enable: Array<string>;
3826
+ }
3827
+
3828
+ export interface Disable {
3829
+ /**
3830
+ * These specific tools will be disabled for this toolkit
3831
+ */
3832
+ disable: Array<string>;
3833
+ }
3834
+
3835
+ export interface Tags {
3836
+ /**
3837
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
3838
+ * supports both enabled and disabled lists.
3839
+ */
3840
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
3841
+ }
3842
+
3843
+ export namespace Tags {
3844
+ export interface UnionMember1 {
3845
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3846
+
3847
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
3848
+ }
3849
+ }
3850
+
3851
+ export interface Workbench {
3852
+ /**
3853
+ * Character threshold for automatic offloading. When workbench response exceeds
3854
+ * this threshold, it will be automatically offloaded. Default is picked
3855
+ * automatically based on the response size.
3856
+ */
3857
+ auto_offload_threshold?: number;
3858
+
3859
+ /**
3860
+ * Set to false to disable the workbench entirely. When disabled, no code execution
3861
+ * tools are available in the session.
3862
+ */
3863
+ enable?: boolean;
3864
+
3865
+ /**
3866
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
3867
+ * APIs directly.
3868
+ */
3869
+ enable_proxy_execution?: boolean;
3870
+
3871
+ /**
3872
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
3873
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Patching this value recreates the sandbox
3874
+ * on next access — sandbox FS state is lost, but /mnt/files/ R2 mount persists.
3875
+ */
3876
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
3877
+ }
3878
+ }
3879
+
3880
+ export interface SessionProxyExecuteParams {
3881
+ /**
3882
+ * The API endpoint to call (absolute URL or path relative to base URL of the
3883
+ * connected account)
3884
+ */
3885
+ endpoint: string;
3886
+
3887
+ /**
3888
+ * The HTTP method to use for the request
3889
+ */
3890
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
3891
+
3892
+ /**
3893
+ * The slug of the toolkit to use for the request
3894
+ */
3895
+ toolkit_slug: string;
3896
+
3897
+ /**
3898
+ * Binary body to send. For binary upload via URL: use {url: "https://...",
3899
+ * content_type?: "..."}. For binary upload via base64: use {base64: "...",
3900
+ * content_type?: "..."}.
3901
+ */
3902
+ binary_body?: SessionProxyExecuteParams.UnionMember0 | SessionProxyExecuteParams.UnionMember1;
3903
+
3904
+ /**
3905
+ * The request body (for POST, PUT, and PATCH requests)
3906
+ */
3907
+ body?: unknown;
3908
+
3909
+ custom_connection_data?:
3910
+ | SessionProxyExecuteParams.UnionMember0
3911
+ | SessionProxyExecuteParams.UnionMember1
3912
+ | SessionProxyExecuteParams.UnionMember2
3913
+ | SessionProxyExecuteParams.UnionMember3
3914
+ | SessionProxyExecuteParams.UnionMember4
3915
+ | SessionProxyExecuteParams.UnionMember5
3916
+ | SessionProxyExecuteParams.UnionMember6
3917
+ | SessionProxyExecuteParams.UnionMember7
3918
+ | SessionProxyExecuteParams.UnionMember8
3919
+ | SessionProxyExecuteParams.UnionMember9
3920
+ | SessionProxyExecuteParams.UnionMember10;
3921
+
3922
+ /**
3923
+ * Additional HTTP headers or query parameters to include in the request
3924
+ */
3925
+ parameters?: Array<SessionProxyExecuteParams.Parameter>;
3926
+ }
3927
+
3928
+ export namespace SessionProxyExecuteParams {
3929
+ export interface UnionMember0 {
3930
+ /**
3931
+ * URL to fetch binary content from
3932
+ */
3933
+ url: string;
3934
+
3935
+ /**
3936
+ * Content-Type header to use for the request
3937
+ */
3938
+ content_type?: string;
3939
+ }
3940
+
3941
+ export interface UnionMember1 {
3942
+ /**
3943
+ * Base64-encoded binary data
3944
+ */
3945
+ base64: string;
3946
+
3947
+ /**
3948
+ * Content-Type header to use for the request
3949
+ */
3950
+ content_type?: string;
3951
+ }
3952
+
3953
+ export interface UnionMember0 {
3954
+ authScheme: 'OAUTH2';
3955
+
3956
+ toolkitSlug: string;
3957
+
3958
+ val: UnionMember0.Val;
3959
+ }
3960
+
3961
+ export namespace UnionMember0 {
3962
+ export interface Val {
3963
+ access_token: string;
3964
+
3965
+ account_id?: string;
3966
+
3967
+ account_url?: string;
3968
+
3969
+ api_url?: string;
3970
+
3971
+ /**
3972
+ * for slack user scopes
3973
+ */
3974
+ authed_user?: Val.AuthedUser;
3975
+
3976
+ base_url?: string;
3977
+
3978
+ borneo_dashboard_url?: string;
3979
+
3980
+ COMPANYDOMAIN?: string;
3981
+
3982
+ dc?: string;
3983
+
3984
+ domain?: string;
3985
+
3986
+ expires_in?: number | string | null;
3987
+
3988
+ extension?: string;
3989
+
3990
+ form_api_base_url?: string;
3991
+
3992
+ id_token?: string;
3993
+
3994
+ instanceEndpoint?: string;
3995
+
3996
+ instanceName?: string;
3997
+
3998
+ /**
3999
+ * Whether to return the redirect url without shortening
4000
+ */
4001
+ long_redirect_url?: boolean;
4002
+
4003
+ proxy_password?: string;
4004
+
4005
+ proxy_username?: string;
4006
+
4007
+ refresh_token?: string | null;
4008
+
4009
+ region?: string;
4010
+
4011
+ scope?: string | Array<string> | null;
4012
+
4013
+ server_location?: string;
4014
+
4015
+ shop?: string;
4016
+
4017
+ site_name?: string;
4018
+
4019
+ /**
4020
+ * The oauth2 state prefix for the connection
4021
+ */
4022
+ state_prefix?: string;
4023
+
4024
+ subdomain?: string;
4025
+
4026
+ token_type?: string;
4027
+
4028
+ version?: string;
4029
+
4030
+ webhook_signature?: string;
4031
+
4032
+ your_server?: string;
4033
+
4034
+ 'your-domain'?: string;
4035
+
4036
+ [k: string]: unknown;
4037
+ }
4038
+
4039
+ export namespace Val {
4040
+ /**
4041
+ * for slack user scopes
4042
+ */
4043
+ export interface AuthedUser {
4044
+ access_token?: string;
4045
+
4046
+ scope?: string;
4047
+ }
4048
+ }
4049
+ }
4050
+
4051
+ export interface UnionMember1 {
4052
+ authScheme: 'DCR_OAUTH';
4053
+
4054
+ toolkitSlug: string;
4055
+
4056
+ val: UnionMember1.Val;
4057
+ }
4058
+
4059
+ export namespace UnionMember1 {
4060
+ export interface Val {
4061
+ access_token: string;
4062
+
4063
+ /**
4064
+ * Dynamically registered client ID
4065
+ */
4066
+ client_id: string;
4067
+
4068
+ account_id?: string;
4069
+
4070
+ account_url?: string;
4071
+
4072
+ api_url?: string;
4073
+
4074
+ base_url?: string;
4075
+
4076
+ borneo_dashboard_url?: string;
4077
+
4078
+ client_id_issued_at?: number;
4079
+
4080
+ /**
4081
+ * Dynamically registered client secret
4082
+ */
4083
+ client_secret?: string;
4084
+
4085
+ client_secret_expires_at?: number;
4086
+
4087
+ COMPANYDOMAIN?: string;
4088
+
4089
+ dc?: string;
4090
+
4091
+ domain?: string;
4092
+
4093
+ expires_in?: number | string | null;
4094
+
4095
+ extension?: string;
4096
+
4097
+ form_api_base_url?: string;
4098
+
4099
+ id_token?: string;
4100
+
4101
+ instanceEndpoint?: string;
4102
+
4103
+ instanceName?: string;
4104
+
4105
+ /**
4106
+ * Whether to return the redirect url without shortening
4107
+ */
4108
+ long_redirect_url?: boolean;
4109
+
4110
+ proxy_password?: string;
4111
+
4112
+ proxy_username?: string;
4113
+
4114
+ refresh_token?: string | null;
4115
+
4116
+ region?: string;
4117
+
4118
+ scope?: string | Array<string> | null;
4119
+
4120
+ server_location?: string;
4121
+
4122
+ shop?: string;
4123
+
4124
+ site_name?: string;
4125
+
4126
+ /**
4127
+ * The oauth2 state prefix for the connection
4128
+ */
4129
+ state_prefix?: string;
4130
+
4131
+ subdomain?: string;
4132
+
4133
+ token_type?: string;
4134
+
4135
+ version?: string;
4136
+
4137
+ your_server?: string;
4138
+
4139
+ 'your-domain'?: string;
4140
+
4141
+ [k: string]: unknown;
4142
+ }
4143
+ }
4144
+
4145
+ export interface UnionMember2 {
4146
+ authScheme: 'API_KEY';
4147
+
4148
+ toolkitSlug: string;
4149
+
4150
+ val: UnionMember2.Val;
4151
+ }
4152
+
4153
+ export namespace UnionMember2 {
4154
+ export interface Val {
4155
+ account_id?: string;
4156
+
4157
+ account_url?: string;
4158
+
4159
+ api_key?: string;
4160
+
4161
+ api_url?: string;
4162
+
4163
+ base_url?: string;
4164
+
4165
+ basic_encoded?: string;
4166
+
4167
+ bearer_token?: string;
4168
+
4169
+ borneo_dashboard_url?: string;
4170
+
4171
+ COMPANYDOMAIN?: string;
4172
+
4173
+ dc?: string;
4174
+
4175
+ domain?: string;
4176
+
4177
+ extension?: string;
4178
+
4179
+ form_api_base_url?: string;
4180
+
4181
+ generic_api_key?: string;
4182
+
4183
+ instanceEndpoint?: string;
4184
+
4185
+ instanceName?: string;
4186
+
4187
+ proxy_password?: string;
4188
+
4189
+ proxy_username?: string;
4190
+
4191
+ region?: string;
4192
+
4193
+ server_location?: string;
4194
+
4195
+ shop?: string;
4196
+
4197
+ site_name?: string;
4198
+
4199
+ subdomain?: string;
4200
+
4201
+ version?: string;
4202
+
4203
+ your_server?: string;
4204
+
4205
+ 'your-domain'?: string;
4206
+
4207
+ [k: string]: unknown;
4208
+ }
4209
+ }
4210
+
4211
+ export interface UnionMember3 {
4212
+ authScheme: 'BASIC_WITH_JWT';
4213
+
4214
+ toolkitSlug: string;
4215
+
4216
+ val: UnionMember3.Val;
4217
+ }
4218
+
4219
+ export namespace UnionMember3 {
4220
+ export interface Val {
4221
+ password: string;
4222
+
4223
+ username: string;
4224
+
4225
+ account_id?: string;
4226
+
4227
+ account_url?: string;
4228
+
4229
+ api_url?: string;
4230
+
4231
+ base_url?: string;
4232
+
4233
+ borneo_dashboard_url?: string;
4234
+
4235
+ COMPANYDOMAIN?: string;
4236
+
4237
+ dc?: string;
4238
+
4239
+ domain?: string;
4240
+
4241
+ extension?: string;
4242
+
4243
+ form_api_base_url?: string;
4244
+
4245
+ instanceEndpoint?: string;
4246
+
4247
+ instanceName?: string;
4248
+
4249
+ proxy_password?: string;
4250
+
4251
+ proxy_username?: string;
4252
+
4253
+ region?: string;
4254
+
4255
+ server_location?: string;
4256
+
4257
+ shop?: string;
4258
+
4259
+ site_name?: string;
4260
+
4261
+ subdomain?: string;
4262
+
4263
+ version?: string;
4264
+
4265
+ your_server?: string;
4266
+
4267
+ 'your-domain'?: string;
4268
+
4269
+ [k: string]: unknown;
4270
+ }
4271
+ }
4272
+
4273
+ export interface UnionMember4 {
4274
+ authScheme: 'BASIC';
4275
+
4276
+ toolkitSlug: string;
4277
+
4278
+ val: UnionMember4.Val;
4279
+ }
4280
+
4281
+ export namespace UnionMember4 {
4282
+ export interface Val {
4283
+ username: string;
4284
+
4285
+ account_id?: string;
4286
+
4287
+ account_url?: string;
4288
+
4289
+ api_url?: string;
4290
+
4291
+ base_url?: string;
4292
+
4293
+ borneo_dashboard_url?: string;
4294
+
4295
+ COMPANYDOMAIN?: string;
4296
+
4297
+ dc?: string;
4298
+
4299
+ domain?: string;
4300
+
4301
+ extension?: string;
4302
+
4303
+ form_api_base_url?: string;
4304
+
4305
+ instanceEndpoint?: string;
4306
+
4307
+ instanceName?: string;
4308
+
4309
+ password?: string;
4310
+
4311
+ proxy_password?: string;
4312
+
4313
+ proxy_username?: string;
4314
+
4315
+ region?: string;
4316
+
4317
+ server_location?: string;
4318
+
4319
+ shop?: string;
4320
+
4321
+ site_name?: string;
4322
+
4323
+ subdomain?: string;
4324
+
4325
+ version?: string;
4326
+
4327
+ your_server?: string;
4328
+
4329
+ 'your-domain'?: string;
4330
+
4331
+ [k: string]: unknown;
4332
+ }
4333
+ }
4334
+
4335
+ export interface UnionMember5 {
4336
+ authScheme: 'BEARER_TOKEN';
4337
+
4338
+ toolkitSlug: string;
4339
+
4340
+ val: UnionMember5.Val;
4341
+ }
4342
+
4343
+ export namespace UnionMember5 {
4344
+ export interface Val {
4345
+ token: string;
4346
+
4347
+ account_id?: string;
4348
+
4349
+ account_url?: string;
4350
+
4351
+ api_url?: string;
4352
+
4353
+ base_url?: string;
4354
+
4355
+ borneo_dashboard_url?: string;
4356
+
4357
+ COMPANYDOMAIN?: string;
4358
+
4359
+ dc?: string;
4360
+
4361
+ domain?: string;
4362
+
4363
+ extension?: string;
4364
+
4365
+ form_api_base_url?: string;
4366
+
4367
+ instanceEndpoint?: string;
4368
+
4369
+ instanceName?: string;
4370
+
4371
+ proxy_password?: string;
4372
+
4373
+ proxy_username?: string;
4374
+
4375
+ region?: string;
4376
+
4377
+ server_location?: string;
4378
+
4379
+ shop?: string;
4380
+
4381
+ site_name?: string;
4382
+
4383
+ subdomain?: string;
4384
+
4385
+ version?: string;
4386
+
4387
+ your_server?: string;
4388
+
4389
+ 'your-domain'?: string;
4390
+
4391
+ [k: string]: unknown;
4392
+ }
4393
+ }
4394
+
4395
+ export interface UnionMember6 {
4396
+ authScheme: 'OAUTH1';
4397
+
4398
+ toolkitSlug: string;
4399
+
4400
+ val: UnionMember6.Val;
4401
+ }
4402
+
4403
+ export namespace UnionMember6 {
4404
+ export interface Val {
4405
+ oauth_token: string;
4406
+
4407
+ oauth_token_secret: string;
4408
+
4409
+ account_id?: string;
4410
+
4411
+ account_url?: string;
4412
+
4413
+ api_url?: string;
4414
+
4415
+ base_url?: string;
4416
+
4417
+ borneo_dashboard_url?: string;
4418
+
4419
+ callback_url?: string;
4420
+
4421
+ COMPANYDOMAIN?: string;
4422
+
4423
+ consumer_key?: string;
4424
+
4425
+ dc?: string;
4426
+
4427
+ domain?: string;
4428
+
4429
+ extension?: string;
4430
+
4431
+ form_api_base_url?: string;
4432
+
4433
+ instanceEndpoint?: string;
4434
+
4435
+ instanceName?: string;
4436
+
4437
+ oauth_verifier?: string;
4438
+
4439
+ proxy_password?: string;
4440
+
4441
+ proxy_username?: string;
4442
+
4443
+ redirectUrl?: string;
4444
+
4445
+ region?: string;
4446
+
4447
+ server_location?: string;
4448
+
4449
+ shop?: string;
4450
+
4451
+ site_name?: string;
4452
+
4453
+ subdomain?: string;
4454
+
4455
+ version?: string;
4456
+
4457
+ your_server?: string;
4458
+
4459
+ 'your-domain'?: string;
4460
+
4461
+ [k: string]: unknown;
4462
+ }
4463
+ }
4464
+
4465
+ export interface UnionMember7 {
4466
+ authScheme: 'NO_AUTH';
4467
+
4468
+ toolkitSlug: string;
4469
+
4470
+ val: UnionMember7.Val;
4471
+ }
4472
+
4473
+ export namespace UnionMember7 {
4474
+ export interface Val {
4475
+ account_id?: string;
4476
+
4477
+ account_url?: string;
4478
+
4479
+ api_url?: string;
4480
+
4481
+ base_url?: string;
4482
+
4483
+ borneo_dashboard_url?: string;
4484
+
4485
+ COMPANYDOMAIN?: string;
4486
+
4487
+ dc?: string;
4488
+
4489
+ domain?: string;
4490
+
4491
+ extension?: string;
4492
+
4493
+ form_api_base_url?: string;
4494
+
4495
+ instanceEndpoint?: string;
4496
+
4497
+ instanceName?: string;
4498
+
4499
+ proxy_password?: string;
4500
+
4501
+ proxy_username?: string;
4502
+
4503
+ region?: string;
4504
+
4505
+ server_location?: string;
4506
+
4507
+ shop?: string;
4508
+
4509
+ site_name?: string;
4510
+
4511
+ subdomain?: string;
4512
+
4513
+ version?: string;
4514
+
4515
+ your_server?: string;
4516
+
4517
+ 'your-domain'?: string;
4518
+
4519
+ [k: string]: unknown;
4520
+ }
4521
+ }
4522
+
4523
+ export interface UnionMember8 {
4524
+ authScheme: 'SERVICE_ACCOUNT';
4525
+
4526
+ toolkitSlug: string;
4527
+
4528
+ val: UnionMember8.Val;
4529
+ }
4530
+
4531
+ export namespace UnionMember8 {
4532
+ export interface Val {
4533
+ application_id: string;
4534
+
4535
+ installation_id: string;
4536
+
4537
+ private_key: string;
4538
+
4539
+ account_id?: string;
4540
+
4541
+ account_url?: string;
4542
+
4543
+ api_url?: string;
4544
+
4545
+ base_url?: string;
4546
+
4547
+ borneo_dashboard_url?: string;
4548
+
4549
+ COMPANYDOMAIN?: string;
4550
+
4551
+ dc?: string;
4552
+
4553
+ domain?: string;
4554
+
4555
+ extension?: string;
4556
+
4557
+ form_api_base_url?: string;
4558
+
4559
+ instanceEndpoint?: string;
4560
+
4561
+ instanceName?: string;
4562
+
4563
+ proxy_password?: string;
4564
+
4565
+ proxy_username?: string;
4566
+
4567
+ region?: string;
4568
+
4569
+ server_location?: string;
4570
+
4571
+ shop?: string;
4572
+
4573
+ site_name?: string;
4574
+
4575
+ subdomain?: string;
4576
+
4577
+ version?: string;
4578
+
4579
+ your_server?: string;
4580
+
4581
+ 'your-domain'?: string;
4582
+
4583
+ [k: string]: unknown;
4584
+ }
4585
+ }
4586
+
4587
+ export interface UnionMember9 {
4588
+ authScheme: 'GOOGLE_SERVICE_ACCOUNT';
4589
+
4590
+ toolkitSlug: string;
4591
+
4592
+ val: UnionMember9.Val;
4593
+ }
4594
+
4595
+ export namespace UnionMember9 {
4596
+ export interface Val {
4597
+ credentials_json: string;
4598
+
4599
+ account_id?: string;
4600
+
4601
+ account_url?: string;
4602
+
4603
+ api_url?: string;
4604
+
4605
+ base_url?: string;
4606
+
4607
+ borneo_dashboard_url?: string;
4608
+
4609
+ COMPANYDOMAIN?: string;
4610
+
4611
+ dc?: string;
4612
+
4613
+ domain?: string;
4614
+
4615
+ extension?: string;
4616
+
4617
+ form_api_base_url?: string;
4618
+
4619
+ instanceEndpoint?: string;
4620
+
4621
+ instanceName?: string;
4622
+
4623
+ proxy_password?: string;
4624
+
4625
+ proxy_username?: string;
4626
+
4627
+ region?: string;
4628
+
4629
+ server_location?: string;
4630
+
4631
+ shop?: string;
4632
+
4633
+ site_name?: string;
4634
+
4635
+ subdomain?: string;
4636
+
4637
+ version?: string;
4638
+
4639
+ your_server?: string;
4640
+
4641
+ 'your-domain'?: string;
4642
+
4643
+ [k: string]: unknown;
4644
+ }
4645
+ }
4646
+
4647
+ export interface UnionMember10 {
4648
+ authScheme: 'S2S_OAUTH2';
4649
+
4650
+ toolkitSlug: string;
4651
+
4652
+ val: UnionMember10.Val;
4653
+ }
4654
+
4655
+ export namespace UnionMember10 {
4656
+ export interface Val {
4657
+ access_token: string;
4658
+
4659
+ client_id: string;
4660
+
4661
+ client_secret: string;
4662
+
4663
+ account_id?: string;
4664
+
4665
+ account_url?: string;
4666
+
4667
+ api_url?: string;
4668
+
4669
+ base_url?: string;
4670
+
4671
+ borneo_dashboard_url?: string;
4672
+
4673
+ COMPANYDOMAIN?: string;
4674
+
4675
+ dc?: string;
4676
+
4677
+ domain?: string;
4678
+
4679
+ expires_at?: string;
4680
+
4681
+ expires_in?: number | string | null;
4682
+
4683
+ extension?: string;
4684
+
4685
+ form_api_base_url?: string;
4686
+
4687
+ instanceEndpoint?: string;
4688
+
4689
+ instanceName?: string;
4690
+
4691
+ proxy_password?: string;
4692
+
4693
+ proxy_username?: string;
4694
+
4695
+ region?: string;
4696
+
4697
+ scope?: string | Array<string> | null;
4698
+
4699
+ server_location?: string;
4700
+
4701
+ shop?: string;
4702
+
4703
+ site_name?: string;
4704
+
4705
+ subdomain?: string;
4706
+
4707
+ token_type?: string;
4708
+
4709
+ version?: string;
4710
+
4711
+ your_server?: string;
4712
+
4713
+ 'your-domain'?: string;
4714
+
4715
+ [k: string]: unknown;
4716
+ }
4717
+ }
4718
+
4719
+ export interface Parameter {
4720
+ /**
4721
+ * Parameter name
4722
+ */
4723
+ name: string;
4724
+
4725
+ /**
4726
+ * Parameter type (header or query)
4727
+ */
4728
+ type: 'header' | 'query';
4729
+
4730
+ /**
4731
+ * Parameter value
4732
+ */
4733
+ value: string;
4734
+ }
4735
+ }
4736
+
4737
+ export interface SessionSearchParams {
4738
+ /**
4739
+ * List of search queries to execute in parallel.
4740
+ */
4741
+ queries: Array<SessionSearchParams.Query>;
4742
+
4743
+ /**
4744
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
4745
+ * customs — pass them on every request that needs them.
4746
+ */
4747
+ experimental?: SessionSearchParams.Experimental;
4748
+
4749
+ /**
4750
+ * Optional model hint for search/planning behavior (e.g., "gpt-4o").
4751
+ */
4752
+ model?: string;
4753
+ }
4754
+
4755
+ export namespace SessionSearchParams {
4756
+ export interface Query {
4757
+ /**
4758
+ * The task or use case to search tools for. Provide a detailed description to get
4759
+ * the best results. Max 1024 characters.
4760
+ */
4761
+ use_case: string;
4762
+
4763
+ /**
4764
+ * Known field hints as key:value pairs (e.g., "channel_name:general,
4765
+ * user_email:john@example.com"). Max 500 characters.
4766
+ */
4767
+ known_fields?: string;
4768
+ }
4769
+
4770
+ /**
4771
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
4772
+ * customs — pass them on every request that needs them.
4773
+ */
4774
+ export interface Experimental {
4775
+ /**
4776
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
4777
+ * existing Composio toolkits. All tools are no-auth.
4778
+ */
4779
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
4780
+
4781
+ /**
4782
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
4783
+ * extends_toolkit inherit the Composio toolkit's connection.
4784
+ */
4785
+ custom_tools?: Array<Experimental.CustomTool>;
4786
+ }
4787
+
4788
+ export namespace Experimental {
4789
+ export interface CustomToolkit {
4790
+ /**
4791
+ * Used for BM25 search matching and shown in toolkit connection statuses.
4792
+ */
4793
+ description: string;
4794
+
4795
+ /**
4796
+ * Display name shown to the LLM and in search results.
4797
+ */
4798
+ name: string;
4799
+
4800
+ /**
4801
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
4802
+ * slugs. Alphanumeric, underscores, and hyphens only.
4803
+ */
4804
+ slug: string;
4805
+
4806
+ /**
4807
+ * Tools in this custom toolkit
4808
+ */
4809
+ tools: Array<CustomToolkit.Tool>;
4810
+
4811
+ /**
4812
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4813
+ * in create/attach responses for inline custom definitions.
4814
+ */
4815
+ preload?: boolean;
4816
+ }
4817
+
4818
+ export namespace CustomToolkit {
4819
+ export interface Tool {
4820
+ /**
4821
+ * Used for BM25 search matching and shown to the LLM.
4822
+ */
4823
+ description: string;
4824
+
4825
+ /**
4826
+ * Must have type: "object" and a properties field.
4827
+ */
4828
+ input_schema: { [key: string]: unknown };
4829
+
4830
+ /**
4831
+ * Human-readable display name
4832
+ */
4833
+ name: string;
4834
+
4835
+ /**
4836
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
4837
+ * chars total).
4838
+ */
4839
+ slug: string;
4840
+
4841
+ /**
4842
+ * Optional output schema for the tool response.
4843
+ */
4844
+ output_schema?: { [key: string]: unknown };
4845
+
4846
+ /**
4847
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4848
+ * in create/attach responses for inline custom definitions.
4849
+ */
4850
+ preload?: boolean;
4851
+ }
4852
+ }
4853
+
4854
+ export interface CustomTool {
4855
+ /**
4856
+ * Used for BM25 search matching and shown to the LLM.
4857
+ */
4858
+ description: string;
4859
+
4860
+ /**
4861
+ * Must have type: "object" and a properties field.
4862
+ */
4863
+ input_schema: { [key: string]: unknown };
4864
+
4865
+ /**
4866
+ * Human-readable display name
4867
+ */
4868
+ name: string;
4869
+
4870
+ /**
4871
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
4872
+ * (extending). Max 60 chars total.
4873
+ */
4874
+ slug: string;
4875
+
4876
+ /**
4877
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
4878
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
4879
+ */
4880
+ extends_toolkit?: string;
4881
+
4882
+ /**
4883
+ * JSON Schema describing tool output (optional)
4884
+ */
4885
+ output_schema?: { [key: string]: unknown };
4886
+
4887
+ /**
4888
+ * SDK hint for direct custom-tool exposure. Not stored in session config; echoed
4889
+ * in create/attach responses for inline custom definitions.
4890
+ */
4891
+ preload?: boolean;
4892
+ }
4893
+ }
4894
+ }
4895
+
4896
+ export interface SessionToolkitsParams {
4897
+ /**
4898
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
4899
+ * limit. The page is the page number and the limit is the number of items per
4900
+ * page. The cursor is used to paginate through the items. The cursor is not
4901
+ * required for the first page.
4902
+ */
4903
+ cursor?: string;
4904
+
4905
+ /**
4906
+ * Whether to filter by connected toolkits. If provided, only connected toolkits
4907
+ * will be returned.
4908
+ */
4909
+ is_connected?: boolean | null;
4910
+
4911
+ /**
4912
+ * Number of items per page, max allowed is 50
4913
+ */
4914
+ limit?: number;
4915
+
4916
+ /**
4917
+ * Search query to filter toolkits by name, slug, or description
4918
+ */
4919
+ search?: string;
4920
+
4921
+ /**
4922
+ * Optional comma-separated list of toolkit slugs to filter by. If provided, only
4923
+ * these toolkits will be returned, overriding the session configuration.
4924
+ */
4925
+ toolkits?: Array<string> | null;
4926
+ }
4927
+
4928
+ export interface SessionToolsParams {
4929
+ /**
4930
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
4931
+ * limit. The page is the page number and the limit is the number of items per
4932
+ * page. The cursor is used to paginate through the items. The cursor is not
4933
+ * required for the first page.
4934
+ */
4935
+ cursor?: string;
4936
+
4937
+ /**
4938
+ * Number of items per page, max allowed is 500
4939
+ */
4940
+ limit?: number;
4941
+ }
4942
+
4943
+ Session.Files = Files;
4944
+
4945
+ export declare namespace Session {
4946
+ export {
4947
+ type SessionCreateResponse as SessionCreateResponse,
4948
+ type SessionRetrieveResponse as SessionRetrieveResponse,
4949
+ type SessionAttachResponse as SessionAttachResponse,
4950
+ type SessionConfigHistoryResponse as SessionConfigHistoryResponse,
4951
+ type SessionExecuteResponse as SessionExecuteResponse,
4952
+ type SessionExecuteMetaResponse as SessionExecuteMetaResponse,
4953
+ type SessionLinkResponse as SessionLinkResponse,
4954
+ type SessionPatchResponse as SessionPatchResponse,
4955
+ type SessionProxyExecuteResponse as SessionProxyExecuteResponse,
4956
+ type SessionSearchResponse as SessionSearchResponse,
4957
+ type SessionToolkitsResponse as SessionToolkitsResponse,
4958
+ type SessionToolsResponse as SessionToolsResponse,
4959
+ type SessionCreateParams as SessionCreateParams,
4960
+ type SessionAttachParams as SessionAttachParams,
4961
+ type SessionConfigHistoryParams as SessionConfigHistoryParams,
4962
+ type SessionExecuteParams as SessionExecuteParams,
4963
+ type SessionExecuteMetaParams as SessionExecuteMetaParams,
4964
+ type SessionLinkParams as SessionLinkParams,
4965
+ type SessionPatchParams as SessionPatchParams,
4966
+ type SessionProxyExecuteParams as SessionProxyExecuteParams,
4967
+ type SessionSearchParams as SessionSearchParams,
4968
+ type SessionToolkitsParams as SessionToolkitsParams,
4969
+ type SessionToolsParams as SessionToolsParams,
4970
+ };
4971
+
4972
+ export {
4973
+ Files as Files,
4974
+ type FileListResponse as FileListResponse,
4975
+ type FileDeleteResponse as FileDeleteResponse,
4976
+ type FileCreateDownloadURLResponse as FileCreateDownloadURLResponse,
4977
+ type FileCreateUploadURLResponse as FileCreateUploadURLResponse,
4978
+ type FileListParams as FileListParams,
4979
+ type FileDeleteParams as FileDeleteParams,
4980
+ type FileCreateDownloadURLParams as FileCreateDownloadURLParams,
4981
+ type FileCreateUploadURLParams as FileCreateUploadURLParams,
4982
+ };
4983
+ }