@composio/client 0.1.0-alpha.67 → 0.1.0-alpha.69

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 (147) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/internal/types.d.mts +6 -6
  3. package/internal/types.d.mts.map +1 -1
  4. package/internal/types.d.ts +6 -6
  5. package/internal/types.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/auth-configs.js +6 -6
  8. package/resources/auth-configs.js.map +1 -1
  9. package/resources/auth-configs.mjs +6 -6
  10. package/resources/auth-configs.mjs.map +1 -1
  11. package/resources/cli/cli.js +2 -2
  12. package/resources/cli/cli.js.map +1 -1
  13. package/resources/cli/cli.mjs +2 -2
  14. package/resources/cli/cli.mjs.map +1 -1
  15. package/resources/cli/realtime.js +2 -2
  16. package/resources/cli/realtime.js.map +1 -1
  17. package/resources/cli/realtime.mjs +2 -2
  18. package/resources/cli/realtime.mjs.map +1 -1
  19. package/resources/connected-accounts.d.mts +164 -11
  20. package/resources/connected-accounts.d.mts.map +1 -1
  21. package/resources/connected-accounts.d.ts +164 -11
  22. package/resources/connected-accounts.d.ts.map +1 -1
  23. package/resources/connected-accounts.js +16 -7
  24. package/resources/connected-accounts.js.map +1 -1
  25. package/resources/connected-accounts.mjs +16 -7
  26. package/resources/connected-accounts.mjs.map +1 -1
  27. package/resources/files.js +2 -2
  28. package/resources/files.js.map +1 -1
  29. package/resources/files.mjs +2 -2
  30. package/resources/files.mjs.map +1 -1
  31. package/resources/link.d.mts +78 -44
  32. package/resources/link.d.mts.map +1 -1
  33. package/resources/link.d.ts +78 -44
  34. package/resources/link.d.ts.map +1 -1
  35. package/resources/link.js +1 -1
  36. package/resources/link.js.map +1 -1
  37. package/resources/link.mjs +1 -1
  38. package/resources/link.mjs.map +1 -1
  39. package/resources/logs/tools.js +2 -2
  40. package/resources/logs/tools.js.map +1 -1
  41. package/resources/logs/tools.mjs +2 -2
  42. package/resources/logs/tools.mjs.map +1 -1
  43. package/resources/logs/triggers.js +2 -2
  44. package/resources/logs/triggers.js.map +1 -1
  45. package/resources/logs/triggers.mjs +2 -2
  46. package/resources/logs/triggers.mjs.map +1 -1
  47. package/resources/mcp/custom.js +1 -1
  48. package/resources/mcp/custom.js.map +1 -1
  49. package/resources/mcp/custom.mjs +1 -1
  50. package/resources/mcp/custom.mjs.map +1 -1
  51. package/resources/mcp/generate.js +1 -1
  52. package/resources/mcp/generate.js.map +1 -1
  53. package/resources/mcp/generate.mjs +1 -1
  54. package/resources/mcp/generate.mjs.map +1 -1
  55. package/resources/mcp/mcp.js +6 -6
  56. package/resources/mcp/mcp.js.map +1 -1
  57. package/resources/mcp/mcp.mjs +6 -6
  58. package/resources/mcp/mcp.mjs.map +1 -1
  59. package/resources/migration.js +1 -1
  60. package/resources/migration.js.map +1 -1
  61. package/resources/migration.mjs +1 -1
  62. package/resources/migration.mjs.map +1 -1
  63. package/resources/project/config.js +2 -2
  64. package/resources/project/config.js.map +1 -1
  65. package/resources/project/config.mjs +2 -2
  66. package/resources/project/config.mjs.map +1 -1
  67. package/resources/tool-router/index.d.mts +1 -1
  68. package/resources/tool-router/index.d.mts.map +1 -1
  69. package/resources/tool-router/index.d.ts +1 -1
  70. package/resources/tool-router/index.d.ts.map +1 -1
  71. package/resources/tool-router/index.js.map +1 -1
  72. package/resources/tool-router/index.mjs.map +1 -1
  73. package/resources/tool-router/session/files.js +4 -7
  74. package/resources/tool-router/session/files.js.map +1 -1
  75. package/resources/tool-router/session/files.mjs +4 -7
  76. package/resources/tool-router/session/files.mjs.map +1 -1
  77. package/resources/tool-router/session/index.d.mts +1 -1
  78. package/resources/tool-router/session/index.d.mts.map +1 -1
  79. package/resources/tool-router/session/index.d.ts +1 -1
  80. package/resources/tool-router/session/index.d.ts.map +1 -1
  81. package/resources/tool-router/session/index.js.map +1 -1
  82. package/resources/tool-router/session/index.mjs.map +1 -1
  83. package/resources/tool-router/session/session.d.mts +2184 -560
  84. package/resources/tool-router/session/session.d.mts.map +1 -1
  85. package/resources/tool-router/session/session.d.ts +2184 -560
  86. package/resources/tool-router/session/session.d.ts.map +1 -1
  87. package/resources/tool-router/session/session.js +65 -25
  88. package/resources/tool-router/session/session.js.map +1 -1
  89. package/resources/tool-router/session/session.mjs +65 -25
  90. package/resources/tool-router/session/session.mjs.map +1 -1
  91. package/resources/tool-router/tool-router.d.mts +2 -2
  92. package/resources/tool-router/tool-router.d.mts.map +1 -1
  93. package/resources/tool-router/tool-router.d.ts +2 -2
  94. package/resources/tool-router/tool-router.d.ts.map +1 -1
  95. package/resources/tool-router/tool-router.js +1 -1
  96. package/resources/tool-router/tool-router.js.map +1 -1
  97. package/resources/tool-router/tool-router.mjs +1 -1
  98. package/resources/tool-router/tool-router.mjs.map +1 -1
  99. package/resources/toolkits.js +3 -3
  100. package/resources/toolkits.js.map +1 -1
  101. package/resources/toolkits.mjs +3 -3
  102. package/resources/toolkits.mjs.map +1 -1
  103. package/resources/tools.js +6 -6
  104. package/resources/tools.js.map +1 -1
  105. package/resources/tools.mjs +6 -6
  106. package/resources/tools.mjs.map +1 -1
  107. package/resources/trigger-instances/manage.js +2 -2
  108. package/resources/trigger-instances/manage.js.map +1 -1
  109. package/resources/trigger-instances/manage.mjs +2 -2
  110. package/resources/trigger-instances/manage.mjs.map +1 -1
  111. package/resources/trigger-instances/trigger-instances.js +2 -2
  112. package/resources/trigger-instances/trigger-instances.js.map +1 -1
  113. package/resources/trigger-instances/trigger-instances.mjs +2 -2
  114. package/resources/trigger-instances/trigger-instances.mjs.map +1 -1
  115. package/resources/triggers-types.js +3 -3
  116. package/resources/triggers-types.js.map +1 -1
  117. package/resources/triggers-types.mjs +3 -3
  118. package/resources/triggers-types.mjs.map +1 -1
  119. package/src/internal/types.ts +6 -8
  120. package/src/resources/auth-configs.ts +6 -6
  121. package/src/resources/cli/cli.ts +2 -2
  122. package/src/resources/cli/realtime.ts +2 -2
  123. package/src/resources/connected-accounts.ts +285 -18
  124. package/src/resources/files.ts +2 -2
  125. package/src/resources/link.ts +122 -61
  126. package/src/resources/logs/tools.ts +2 -2
  127. package/src/resources/logs/triggers.ts +2 -2
  128. package/src/resources/mcp/custom.ts +1 -1
  129. package/src/resources/mcp/generate.ts +1 -1
  130. package/src/resources/mcp/mcp.ts +6 -6
  131. package/src/resources/migration.ts +1 -1
  132. package/src/resources/project/config.ts +2 -2
  133. package/src/resources/tool-router/index.ts +6 -0
  134. package/src/resources/tool-router/session/files.ts +7 -7
  135. package/src/resources/tool-router/session/index.ts +6 -0
  136. package/src/resources/tool-router/session/session.ts +2605 -712
  137. package/src/resources/tool-router/tool-router.ts +13 -1
  138. package/src/resources/toolkits.ts +3 -3
  139. package/src/resources/tools.ts +6 -6
  140. package/src/resources/trigger-instances/manage.ts +2 -2
  141. package/src/resources/trigger-instances/trigger-instances.ts +2 -2
  142. package/src/resources/triggers-types.ts +3 -3
  143. package/src/version.ts +1 -1
  144. package/version.d.mts +1 -1
  145. package/version.d.ts +1 -1
  146. package/version.js +1 -1
  147. package/version.mjs +1 -1
@@ -35,12 +35,32 @@ export declare class Session extends APIResource {
35
35
  */
36
36
  retrieve(sessionID: string, options?: RequestOptions): APIPromise<SessionRetrieveResponse>;
37
37
  /**
38
- * Executes a specific tool within a tool router session. This is the primary
39
- * execution endpoint for both meta tools and app tools exposed by the session. The
40
- * toolkit is automatically inferred from the tool slug. For app tools, the tool
41
- * must belong to an allowed toolkit and must not be disabled in the session
42
- * configuration. The endpoint validates permissions, resolves connected accounts
43
- * when needed, and executes the tool with the session context.
38
+ * Fetch an existing tool router session by ID.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const response = await client.toolRouter.session.attach(
43
+ * 'trs_1a2b3c4d5e6f',
44
+ * );
45
+ * ```
46
+ */
47
+ attach(sessionID: string, body?: SessionAttachParams | null | undefined, options?: RequestOptions): APIPromise<SessionAttachResponse>;
48
+ /**
49
+ * Returns the session config history ordered by version DESC (newest first). The
50
+ * live (current) config appears once, on the first page only, with
51
+ * `is_current: true`; archived versions have `is_current: false`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const response =
56
+ * await client.toolRouter.session.configHistory(
57
+ * 'trs_1a2b3c4d5e6f',
58
+ * );
59
+ * ```
60
+ */
61
+ configHistory(sessionID: string, query?: SessionConfigHistoryParams | null | undefined, options?: RequestOptions): APIPromise<SessionConfigHistoryResponse>;
62
+ /**
63
+ * Execute a tool (meta or app) within an existing tool router session.
44
64
  *
45
65
  * @example
46
66
  * ```ts
@@ -52,9 +72,8 @@ export declare class Session extends APIResource {
52
72
  */
53
73
  execute(sessionID: string, body: SessionExecuteParams, options?: RequestOptions): APIPromise<SessionExecuteResponse>;
54
74
  /**
55
- * Executes a Composio meta tool (COMPOSIO\_\*) within a tool router session. This
56
- * endpoint is kept for meta-tool compatibility; clients can also use the primary
57
- * /execute endpoint.
75
+ * Execute a Composio meta tool (COMPOSIO\_\*) within an existing tool router
76
+ * session.
58
77
  *
59
78
  * @example
60
79
  * ```ts
@@ -80,6 +99,20 @@ export declare class Session extends APIResource {
80
99
  * ```
81
100
  */
82
101
  link(sessionID: string, body: SessionLinkParams, options?: RequestOptions): APIPromise<SessionLinkResponse>;
102
+ /**
103
+ * Partially updates the configuration of an existing tool router session. Only the
104
+ * fields provided in the request body will be updated. Uses optimistic concurrency
105
+ * control to prevent lost updates. The previous config is stored in config
106
+ * history.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const response = await client.toolRouter.session.patch(
111
+ * 'trs_1a2b3c4d5e6f',
112
+ * );
113
+ * ```
114
+ */
115
+ patch(sessionID: string, body?: SessionPatchParams | null | undefined, options?: RequestOptions): APIPromise<SessionPatchResponse>;
83
116
  /**
84
117
  * Execute any native API call on a toolkit with authentication automatically
85
118
  * injected from Composio. This endpoint proxies HTTP requests to third-party APIs
@@ -104,9 +137,8 @@ export declare class Session extends APIResource {
104
137
  */
105
138
  proxyExecute(sessionID: string, body: SessionProxyExecuteParams, options?: RequestOptions): APIPromise<SessionProxyExecuteResponse>;
106
139
  /**
107
- * Search for tools matching a given use case query within a tool router session.
108
- * Returns matching tool slugs, full tool schemas, toolkit connection statuses, and
109
- * workflow guidance in a predictable format.
140
+ * Search for tools matching a use case query within an existing tool router
141
+ * session.
110
142
  *
111
143
  * @example
112
144
  * ```ts
@@ -135,9 +167,8 @@ export declare class Session extends APIResource {
135
167
  */
136
168
  toolkits(sessionID: string, query?: SessionToolkitsParams | null | undefined, options?: RequestOptions): APIPromise<SessionToolkitsResponse>;
137
169
  /**
138
- * Returns the tools available in a tool router session with their complete
139
- * schemas. This includes both meta tools and any preloaded app tools exposed by
140
- * the session.
170
+ * Returns tools available in a tool router session with complete schemas. Results
171
+ * are paginated; use `next_cursor` to fetch the next page.
141
172
  *
142
173
  * @example
143
174
  * ```ts
@@ -150,7 +181,7 @@ export declare class Session extends APIResource {
150
181
  }
151
182
  export interface SessionCreateResponse {
152
183
  /**
153
- * The session configuration including user, toolkits, and overrides
184
+ * The configuration used to create this session
154
185
  */
155
186
  config: SessionCreateResponse.Config;
156
187
  /**
@@ -173,24 +204,29 @@ export interface SessionCreateResponse {
173
204
  */
174
205
  experimental?: SessionCreateResponse.Experimental;
175
206
  /**
176
- * Advisory list — session was created, but the listed issues may warrant
177
- * attention.
207
+ * Advisory list — the session exists and is usable, but the listed issues may
208
+ * warrant attention.
178
209
  */
179
210
  warnings?: Array<SessionCreateResponse.Warning>;
180
211
  }
181
212
  export declare namespace SessionCreateResponse {
182
213
  /**
183
- * The session configuration including user, toolkits, and overrides
214
+ * The configuration used to create this session
184
215
  */
185
216
  interface Config {
186
217
  /**
187
- * Preload configuration. Controls which tools appear in `session.tools` and the
188
- * MCP server tool list, callable directly without going through search. Each
189
- * preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
190
- * Always present in the response (empty `tools: []` when the session was created
191
- * without a preload config).
218
+ * Execute helper configuration
219
+ */
220
+ execute: Config.Execute;
221
+ /**
222
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
223
+ * is returned as "all".
192
224
  */
193
225
  preload: Config.Preload;
226
+ /**
227
+ * Search helper configuration
228
+ */
229
+ search: Config.Search;
194
230
  /**
195
231
  * User identifier for this session
196
232
  */
@@ -239,19 +275,27 @@ export declare namespace SessionCreateResponse {
239
275
  }
240
276
  namespace Config {
241
277
  /**
242
- * Preload configuration. Controls which tools appear in `session.tools` and the
243
- * MCP server tool list, callable directly without going through search. Each
244
- * preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
245
- * Always present in the response (empty `tools: []` when the session was created
246
- * without a preload config).
278
+ * Execute helper configuration
279
+ */
280
+ interface Execute {
281
+ enable_multi_execute?: boolean;
282
+ }
283
+ /**
284
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
285
+ * is returned as "all".
247
286
  */
248
287
  interface Preload {
249
288
  /**
250
- * Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
251
- * server tool list, callable directly without going through search. Empty array
252
- * when no preload was configured.
289
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
290
+ * app tools allowed by its filters.
253
291
  */
254
- tools: Array<string>;
292
+ tools: Array<string> | 'all';
293
+ }
294
+ /**
295
+ * Search helper configuration
296
+ */
297
+ interface Search {
298
+ enable?: boolean;
255
299
  }
256
300
  /**
257
301
  * Manage connections configuration
@@ -451,7 +495,7 @@ export declare namespace SessionCreateResponse {
451
495
  }
452
496
  export interface SessionRetrieveResponse {
453
497
  /**
454
- * The session configuration including user, toolkits, and overrides
498
+ * The configuration used to create this session
455
499
  */
456
500
  config: SessionRetrieveResponse.Config;
457
501
  /**
@@ -472,20 +516,30 @@ export interface SessionRetrieveResponse {
472
516
  * Experimental features
473
517
  */
474
518
  experimental?: SessionRetrieveResponse.Experimental;
519
+ /**
520
+ * Advisory list — the session exists and is usable, but the listed issues may
521
+ * warrant attention.
522
+ */
523
+ warnings?: Array<SessionRetrieveResponse.Warning>;
475
524
  }
476
525
  export declare namespace SessionRetrieveResponse {
477
526
  /**
478
- * The session configuration including user, toolkits, and overrides
527
+ * The configuration used to create this session
479
528
  */
480
529
  interface Config {
481
530
  /**
482
- * Preload configuration. Controls which tools appear in `session.tools` and the
483
- * MCP server tool list, callable directly without going through search. Each
484
- * preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
485
- * Always present in the response (empty `tools: []` when the session was created
486
- * without a preload config).
531
+ * Execute helper configuration
532
+ */
533
+ execute: Config.Execute;
534
+ /**
535
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
536
+ * is returned as "all".
487
537
  */
488
538
  preload: Config.Preload;
539
+ /**
540
+ * Search helper configuration
541
+ */
542
+ search: Config.Search;
489
543
  /**
490
544
  * User identifier for this session
491
545
  */
@@ -534,19 +588,27 @@ export declare namespace SessionRetrieveResponse {
534
588
  }
535
589
  namespace Config {
536
590
  /**
537
- * Preload configuration. Controls which tools appear in `session.tools` and the
538
- * MCP server tool list, callable directly without going through search. Each
539
- * preloaded tool adds to the agent context — roughly ≤20 tools is recommended.
540
- * Always present in the response (empty `tools: []` when the session was created
541
- * without a preload config).
591
+ * Execute helper configuration
592
+ */
593
+ interface Execute {
594
+ enable_multi_execute?: boolean;
595
+ }
596
+ /**
597
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
598
+ * is returned as "all".
542
599
  */
543
600
  interface Preload {
544
601
  /**
545
- * Tool slugs preloaded for this session. Appear in `session.tools` and the MCP
546
- * server tool list, callable directly without going through search. Empty array
547
- * when no preload was configured.
602
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
603
+ * app tools allowed by its filters.
548
604
  */
549
- tools: Array<string>;
605
+ tools: Array<string> | 'all';
606
+ }
607
+ /**
608
+ * Search helper configuration
609
+ */
610
+ interface Search {
611
+ enable?: boolean;
550
612
  }
551
613
  /**
552
614
  * Manage connections configuration
@@ -731,215 +793,1077 @@ export declare namespace SessionRetrieveResponse {
731
793
  };
732
794
  }
733
795
  }
734
- }
735
- export interface SessionExecuteResponse {
736
- /**
737
- * The data returned by the tool execution
738
- */
739
- data: {
740
- [key: string]: unknown;
741
- };
742
- /**
743
- * Error message if the execution failed, null otherwise
744
- */
745
- error: string | null;
746
- /**
747
- * Unique identifier for the execution log
748
- */
749
- log_id: string;
750
- }
751
- export interface SessionExecuteMetaResponse {
752
- /**
753
- * The data returned by the tool execution
754
- */
755
- data: {
756
- [key: string]: unknown;
757
- };
758
- /**
759
- * Error message if the execution failed, null otherwise
760
- */
761
- error: string | null;
762
- /**
763
- * Unique identifier for the execution log
764
- */
765
- log_id: string;
766
- }
767
- export interface SessionLinkResponse {
768
- /**
769
- * The unique identifier for the connected account
770
- */
771
- connected_account_id: string;
772
- /**
773
- * Token used to complete the authentication flow
774
- */
775
- link_token: string;
776
- /**
777
- * The URL where users should be redirected to complete OAuth
778
- */
779
- redirect_url: string;
780
- }
781
- export interface SessionProxyExecuteResponse {
782
- /**
783
- * The HTTP status code returned from the proxied API
784
- */
785
- status: number;
786
- /**
787
- * Binary body response data. Present when the response is a binary file.
788
- */
789
- binary_data?: SessionProxyExecuteResponse.BinaryData;
790
- /**
791
- * The response data returned from the proxied API
792
- */
793
- data?: unknown;
794
- /**
795
- * The HTTP headers returned from the proxied API
796
- */
797
- headers?: {
798
- [key: string]: string;
799
- };
800
- }
801
- export declare namespace SessionProxyExecuteResponse {
802
- /**
803
- * Binary body response data. Present when the response is a binary file.
804
- */
805
- interface BinaryData {
806
- /**
807
- * Content-Type of the binary data
808
- */
809
- content_type: string;
810
- /**
811
- * File size in bytes
812
- */
813
- size: number;
796
+ interface Warning {
814
797
  /**
815
- * URL to download binary content
798
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
816
799
  */
817
- url: string;
800
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
818
801
  /**
819
- * ISO 8601 timestamp when the URL expires
802
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
803
+ * end users.
820
804
  */
821
- expires_at?: string;
805
+ message: string;
822
806
  }
823
807
  }
824
- export interface SessionSearchResponse {
825
- /**
826
- * Error message if any searches failed, null if all succeeded. Format: "X out of Y
827
- * searches failed, reasons: <details>"
828
- */
829
- error: string | null;
808
+ export interface SessionAttachResponse {
830
809
  /**
831
- * Combined workflow guidance covering connections, planner, and memory usage. Each
832
- * element is a step instruction.
810
+ * The configuration used to create this session
833
811
  */
834
- next_steps_guidance: Array<string>;
812
+ config: SessionAttachResponse.Config;
835
813
  /**
836
- * Per-query search results with tools, reasoning, and memory. One entry per query
837
- * in request order.
814
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
815
+ * concurrency control.
838
816
  */
839
- results: Array<SessionSearchResponse.Result>;
817
+ config_version: number;
818
+ mcp: SessionAttachResponse.Mcp;
840
819
  /**
841
- * Session info for correlating meta tool calls
820
+ * The identifier of the session
842
821
  */
843
- session: SessionSearchResponse.Session;
822
+ session_id: string;
844
823
  /**
845
- * Whether all searches completed successfully. False if any query failed.
824
+ * List of available tools in this session
846
825
  */
847
- success: boolean;
826
+ tool_router_tools: Array<string>;
848
827
  /**
849
- * Time information for the query
828
+ * Experimental features
850
829
  */
851
- time_info: SessionSearchResponse.TimeInfo;
830
+ experimental?: SessionAttachResponse.Experimental;
852
831
  /**
853
- * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
854
- * appears once even if used in multiple queries.
832
+ * Advisory list the session exists and is usable, but the listed issues may
833
+ * warrant attention.
855
834
  */
856
- tool_schemas: {
857
- [key: string]: SessionSearchResponse.ToolSchemas;
858
- };
835
+ warnings?: Array<SessionAttachResponse.Warning>;
836
+ }
837
+ export declare namespace SessionAttachResponse {
859
838
  /**
860
- * Connection status for all toolkits mentioned across all queries, with
861
- * descriptions merged in.
839
+ * The configuration used to create this session
862
840
  */
863
- toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
864
- }
865
- export declare namespace SessionSearchResponse {
866
- interface Result {
841
+ interface Config {
867
842
  /**
868
- * 1-based index of the query in the request
843
+ * Execute helper configuration
869
844
  */
870
- index: number;
845
+ execute: Config.Execute;
871
846
  /**
872
- * List of main tool slugs matching the search criteria
847
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
848
+ * is returned as "all".
873
849
  */
874
- primary_tool_slugs: Array<string>;
850
+ preload: Config.Preload;
875
851
  /**
876
- * List of related tool slugs that might be useful
852
+ * Search helper configuration
877
853
  */
878
- related_tool_slugs: Array<string>;
854
+ search: Config.Search;
879
855
  /**
880
- * List of unique toolkit slugs used by tools in this query
856
+ * User identifier for this session
881
857
  */
882
- toolkits: Array<string>;
858
+ user_id: string;
883
859
  /**
884
- * The use case that was searched
860
+ * Auth config overrides per toolkit
885
861
  */
886
- use_case: string;
862
+ auth_configs?: {
863
+ [key: string]: string;
864
+ };
887
865
  /**
888
- * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
889
- * known parameters")
866
+ * Connected account overrides per toolkit. Each connected account must belong to
867
+ * the same user_id as the session.
890
868
  */
891
- difficulty?: string;
869
+ connected_accounts?: {
870
+ [key: string]: string;
871
+ };
892
872
  /**
893
- * Error message if the search for this query failed, null otherwise. Always
894
- * present for failed queries.
873
+ * Manage connections configuration
895
874
  */
896
- error?: string | null;
875
+ manage_connections?: Config.ManageConnections;
897
876
  /**
898
- * Guidance message about the search results, particularly when a cached plan is
899
- * available
877
+ * Multi-account configuration for this session.
900
878
  */
901
- execution_guidance?: string;
879
+ multi_account?: Config.MultiAccount;
902
880
  /**
903
- * Common pitfalls and considerations (only present when cached plan is available)
881
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
882
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
883
+ * tool must NOT have any of. Both conditions must be satisfied.
904
884
  */
905
- known_pitfalls?: Array<string>;
885
+ tags?: Config.Tags;
906
886
  /**
907
- * Memory data relevant to this query, grouped by app. Only present for non-cached
908
- * search results.
887
+ * Toolkit configuration - either enabled list or disabled list
909
888
  */
910
- memory?: {
911
- [key: string]: Array<string>;
889
+ toolkits?: Config.Enabled | Config.Disabled;
890
+ /**
891
+ * Tool-level configuration per toolkit
892
+ */
893
+ tools?: {
894
+ [key: string]: Config.Enabled | Config.Disabled | Config.Tags;
912
895
  };
913
896
  /**
914
- * ID of cached plan if available
897
+ * Workbench configuration
915
898
  */
916
- plan_id?: string;
899
+ workbench?: Config.Workbench;
900
+ }
901
+ namespace Config {
917
902
  /**
918
- * Workflow steps from cached plan (only present when cached plan is available)
903
+ * Execute helper configuration
919
904
  */
920
- recommended_plan_steps?: Array<string>;
905
+ interface Execute {
906
+ enable_multi_execute?: boolean;
907
+ }
921
908
  /**
922
- * Reference Python code snippets for processing tool responses in the workbench
923
- * (only present when cached plan is available)
909
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
910
+ * is returned as "all".
924
911
  */
925
- reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
926
- }
927
- namespace Result {
928
- interface ReferenceWorkbenchSnippet {
929
- /**
930
- * Python code snippet for the workbench
931
- */
932
- code: string;
912
+ interface Preload {
933
913
  /**
934
- * Description of what the code snippet does
914
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
915
+ * app tools allowed by its filters.
935
916
  */
936
- description: string;
917
+ tools: Array<string> | 'all';
937
918
  }
938
- }
939
- /**
940
- * Session info for correlating meta tool calls
941
- */
942
- interface Session {
919
+ /**
920
+ * Search helper configuration
921
+ */
922
+ interface Search {
923
+ enable?: boolean;
924
+ }
925
+ /**
926
+ * Manage connections configuration
927
+ */
928
+ interface ManageConnections {
929
+ /**
930
+ * Custom callback URL for connected account auth flows
931
+ */
932
+ callback_url?: string;
933
+ /**
934
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
935
+ */
936
+ enable_connection_removal?: boolean;
937
+ /**
938
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
939
+ * Default false. May not work reliably with GPT models.
940
+ */
941
+ enable_wait_for_connections?: boolean;
942
+ /**
943
+ * Whether to enable the connection manager for automatic connection handling
944
+ */
945
+ enabled?: boolean;
946
+ }
947
+ /**
948
+ * Multi-account configuration for this session.
949
+ */
950
+ interface MultiAccount {
951
+ /**
952
+ * When true, enables multi-account mode for this session. When not set, falls back
953
+ * to org/project-level configuration.
954
+ */
955
+ enable?: boolean;
956
+ /**
957
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
958
+ * multi-account is enabled.
959
+ */
960
+ max_accounts_per_toolkit?: number;
961
+ /**
962
+ * When true, require explicit account selection when multiple accounts are
963
+ * connected. When false (default), use the first/default account.
964
+ */
965
+ require_explicit_selection?: boolean;
966
+ }
967
+ /**
968
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
969
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
970
+ * tool must NOT have any of. Both conditions must be satisfied.
971
+ */
972
+ interface Tags {
973
+ /**
974
+ * Tags that the tool must NOT have any of
975
+ */
976
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
977
+ /**
978
+ * Tags that the tool must have at least one of
979
+ */
980
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
981
+ }
982
+ interface Enabled {
983
+ enabled: Array<string>;
984
+ }
985
+ interface Disabled {
986
+ disabled: Array<string>;
987
+ }
988
+ interface Enabled {
989
+ enabled: Array<string>;
990
+ }
991
+ interface Disabled {
992
+ disabled: Array<string>;
993
+ }
994
+ interface Tags {
995
+ tags: Tags.Tags;
996
+ }
997
+ namespace Tags {
998
+ interface Tags {
999
+ /**
1000
+ * Tags that the tool must NOT have any of
1001
+ */
1002
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1003
+ /**
1004
+ * Tags that the tool must have at least one of
1005
+ */
1006
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1007
+ }
1008
+ }
1009
+ /**
1010
+ * Workbench configuration
1011
+ */
1012
+ interface Workbench {
1013
+ /**
1014
+ * Character threshold after which tool execution response are saved to a file in
1015
+ * workbench. Default is 20k.
1016
+ */
1017
+ auto_offload_threshold?: number;
1018
+ /**
1019
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1020
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1021
+ */
1022
+ enable?: boolean;
1023
+ /**
1024
+ * Whether proxy execution is enabled in the workbench
1025
+ */
1026
+ proxy_execution_enabled?: boolean;
1027
+ /**
1028
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1029
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1030
+ */
1031
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1032
+ }
1033
+ }
1034
+ interface Mcp {
1035
+ /**
1036
+ * The type of the MCP server. Can be http
1037
+ */
1038
+ type: 'http';
1039
+ /**
1040
+ * The URL of the MCP server
1041
+ */
1042
+ url: string;
1043
+ }
1044
+ /**
1045
+ * Experimental features
1046
+ */
1047
+ interface Experimental {
1048
+ /**
1049
+ * The assistive system prompt for the tool router session
1050
+ */
1051
+ assistive_prompt?: string;
1052
+ /**
1053
+ * User-defined custom toolkits with grouped tools (no-auth)
1054
+ */
1055
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1056
+ /**
1057
+ * Custom tools — standalone or extending Composio toolkits
1058
+ */
1059
+ custom_tools?: Array<Experimental.CustomTool>;
1060
+ }
1061
+ namespace Experimental {
1062
+ interface CustomToolkit {
1063
+ description: string;
1064
+ name: string;
1065
+ slug: string;
1066
+ tools: Array<CustomToolkit.Tool>;
1067
+ }
1068
+ namespace CustomToolkit {
1069
+ interface Tool {
1070
+ description: string;
1071
+ input_schema: {
1072
+ [key: string]: unknown;
1073
+ };
1074
+ name: string;
1075
+ /**
1076
+ * Original tool slug as provided by the user
1077
+ */
1078
+ original_slug: string;
1079
+ /**
1080
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
1081
+ */
1082
+ slug: string;
1083
+ output_schema?: {
1084
+ [key: string]: unknown;
1085
+ };
1086
+ }
1087
+ }
1088
+ interface CustomTool {
1089
+ description: string;
1090
+ input_schema: {
1091
+ [key: string]: unknown;
1092
+ };
1093
+ name: string;
1094
+ /**
1095
+ * Original tool slug as provided by the user
1096
+ */
1097
+ original_slug: string;
1098
+ /**
1099
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
1100
+ */
1101
+ slug: string;
1102
+ extends_toolkit?: string;
1103
+ output_schema?: {
1104
+ [key: string]: unknown;
1105
+ };
1106
+ }
1107
+ }
1108
+ interface Warning {
1109
+ /**
1110
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1111
+ */
1112
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1113
+ /**
1114
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1115
+ * end users.
1116
+ */
1117
+ message: string;
1118
+ }
1119
+ }
1120
+ export interface SessionConfigHistoryResponse {
1121
+ current_page: number;
1122
+ items: Array<SessionConfigHistoryResponse.Item>;
1123
+ total_items: number;
1124
+ total_pages: number;
1125
+ next_cursor?: string | null;
1126
+ }
1127
+ export declare namespace SessionConfigHistoryResponse {
1128
+ interface Item {
1129
+ /**
1130
+ * The session configuration at this version
1131
+ */
1132
+ config: Item.Config;
1133
+ /**
1134
+ * ISO timestamp. For history rows, when the entry was archived (i.e. the moment
1135
+ * the version was superseded by a PATCH).
1136
+ */
1137
+ created_at: string;
1138
+ /**
1139
+ * True only for the live (current) session config, present on the first page.
1140
+ * False for archived history rows.
1141
+ */
1142
+ is_current: boolean;
1143
+ /**
1144
+ * The config version this entry represents
1145
+ */
1146
+ version: number;
1147
+ }
1148
+ namespace Item {
1149
+ /**
1150
+ * The session configuration at this version
1151
+ */
1152
+ interface Config {
1153
+ /**
1154
+ * Execute helper configuration
1155
+ */
1156
+ execute: Config.Execute;
1157
+ /**
1158
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1159
+ * is returned as "all".
1160
+ */
1161
+ preload: Config.Preload;
1162
+ /**
1163
+ * Search helper configuration
1164
+ */
1165
+ search: Config.Search;
1166
+ /**
1167
+ * User identifier for this session
1168
+ */
1169
+ user_id: string;
1170
+ /**
1171
+ * Auth config overrides per toolkit
1172
+ */
1173
+ auth_configs?: {
1174
+ [key: string]: string;
1175
+ };
1176
+ /**
1177
+ * Connected account overrides per toolkit. Each connected account must belong to
1178
+ * the same user_id as the session.
1179
+ */
1180
+ connected_accounts?: {
1181
+ [key: string]: string;
1182
+ };
1183
+ /**
1184
+ * Manage connections configuration
1185
+ */
1186
+ manage_connections?: Config.ManageConnections;
1187
+ /**
1188
+ * Multi-account configuration for this session.
1189
+ */
1190
+ multi_account?: Config.MultiAccount;
1191
+ /**
1192
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1193
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1194
+ * tool must NOT have any of. Both conditions must be satisfied.
1195
+ */
1196
+ tags?: Config.Tags;
1197
+ /**
1198
+ * Toolkit configuration - either enabled list or disabled list
1199
+ */
1200
+ toolkits?: Config.Enabled | Config.Disabled;
1201
+ /**
1202
+ * Tool-level configuration per toolkit
1203
+ */
1204
+ tools?: {
1205
+ [key: string]: Config.Enabled | Config.Disabled | Config.Tags;
1206
+ };
1207
+ /**
1208
+ * Workbench configuration
1209
+ */
1210
+ workbench?: Config.Workbench;
1211
+ }
1212
+ namespace Config {
1213
+ /**
1214
+ * Execute helper configuration
1215
+ */
1216
+ interface Execute {
1217
+ enable_multi_execute?: boolean;
1218
+ }
1219
+ /**
1220
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1221
+ * is returned as "all".
1222
+ */
1223
+ interface Preload {
1224
+ /**
1225
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1226
+ * app tools allowed by its filters.
1227
+ */
1228
+ tools: Array<string> | 'all';
1229
+ }
1230
+ /**
1231
+ * Search helper configuration
1232
+ */
1233
+ interface Search {
1234
+ enable?: boolean;
1235
+ }
1236
+ /**
1237
+ * Manage connections configuration
1238
+ */
1239
+ interface ManageConnections {
1240
+ /**
1241
+ * Custom callback URL for connected account auth flows
1242
+ */
1243
+ callback_url?: string;
1244
+ /**
1245
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1246
+ */
1247
+ enable_connection_removal?: boolean;
1248
+ /**
1249
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1250
+ * Default false. May not work reliably with GPT models.
1251
+ */
1252
+ enable_wait_for_connections?: boolean;
1253
+ /**
1254
+ * Whether to enable the connection manager for automatic connection handling
1255
+ */
1256
+ enabled?: boolean;
1257
+ }
1258
+ /**
1259
+ * Multi-account configuration for this session.
1260
+ */
1261
+ interface MultiAccount {
1262
+ /**
1263
+ * When true, enables multi-account mode for this session. When not set, falls back
1264
+ * to org/project-level configuration.
1265
+ */
1266
+ enable?: boolean;
1267
+ /**
1268
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1269
+ * multi-account is enabled.
1270
+ */
1271
+ max_accounts_per_toolkit?: number;
1272
+ /**
1273
+ * When true, require explicit account selection when multiple accounts are
1274
+ * connected. When false (default), use the first/default account.
1275
+ */
1276
+ require_explicit_selection?: boolean;
1277
+ }
1278
+ /**
1279
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1280
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1281
+ * tool must NOT have any of. Both conditions must be satisfied.
1282
+ */
1283
+ interface Tags {
1284
+ /**
1285
+ * Tags that the tool must NOT have any of
1286
+ */
1287
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1288
+ /**
1289
+ * Tags that the tool must have at least one of
1290
+ */
1291
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1292
+ }
1293
+ interface Enabled {
1294
+ enabled: Array<string>;
1295
+ }
1296
+ interface Disabled {
1297
+ disabled: Array<string>;
1298
+ }
1299
+ interface Enabled {
1300
+ enabled: Array<string>;
1301
+ }
1302
+ interface Disabled {
1303
+ disabled: Array<string>;
1304
+ }
1305
+ interface Tags {
1306
+ tags: Tags.Tags;
1307
+ }
1308
+ namespace Tags {
1309
+ interface Tags {
1310
+ /**
1311
+ * Tags that the tool must NOT have any of
1312
+ */
1313
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1314
+ /**
1315
+ * Tags that the tool must have at least one of
1316
+ */
1317
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1318
+ }
1319
+ }
1320
+ /**
1321
+ * Workbench configuration
1322
+ */
1323
+ interface Workbench {
1324
+ /**
1325
+ * Character threshold after which tool execution response are saved to a file in
1326
+ * workbench. Default is 20k.
1327
+ */
1328
+ auto_offload_threshold?: number;
1329
+ /**
1330
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1331
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1332
+ */
1333
+ enable?: boolean;
1334
+ /**
1335
+ * Whether proxy execution is enabled in the workbench
1336
+ */
1337
+ proxy_execution_enabled?: boolean;
1338
+ /**
1339
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1340
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1341
+ */
1342
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1343
+ }
1344
+ }
1345
+ }
1346
+ }
1347
+ export interface SessionExecuteResponse {
1348
+ /**
1349
+ * The data returned by the tool execution
1350
+ */
1351
+ data: {
1352
+ [key: string]: unknown;
1353
+ };
1354
+ /**
1355
+ * Error message if the execution failed, null otherwise
1356
+ */
1357
+ error: string | null;
1358
+ /**
1359
+ * Unique identifier for the execution log
1360
+ */
1361
+ log_id: string;
1362
+ }
1363
+ export interface SessionExecuteMetaResponse {
1364
+ /**
1365
+ * The data returned by the tool execution
1366
+ */
1367
+ data: {
1368
+ [key: string]: unknown;
1369
+ };
1370
+ /**
1371
+ * Error message if the execution failed, null otherwise
1372
+ */
1373
+ error: string | null;
1374
+ /**
1375
+ * Unique identifier for the execution log
1376
+ */
1377
+ log_id: string;
1378
+ }
1379
+ export interface SessionLinkResponse {
1380
+ /**
1381
+ * The unique identifier for the connected account
1382
+ */
1383
+ connected_account_id: string;
1384
+ /**
1385
+ * Token used to complete the authentication flow
1386
+ */
1387
+ link_token: string;
1388
+ /**
1389
+ * The URL where users should be redirected to complete OAuth
1390
+ */
1391
+ redirect_url: string;
1392
+ }
1393
+ export interface SessionPatchResponse {
1394
+ /**
1395
+ * The configuration used to create this session
1396
+ */
1397
+ config: SessionPatchResponse.Config;
1398
+ /**
1399
+ * Monotonic version of the config. Incremented on each PATCH. Use for optimistic
1400
+ * concurrency control.
1401
+ */
1402
+ config_version: number;
1403
+ mcp: SessionPatchResponse.Mcp;
1404
+ /**
1405
+ * The identifier of the session
1406
+ */
1407
+ session_id: string;
1408
+ /**
1409
+ * List of available tools in this session
1410
+ */
1411
+ tool_router_tools: Array<string>;
1412
+ /**
1413
+ * Experimental features
1414
+ */
1415
+ experimental?: SessionPatchResponse.Experimental;
1416
+ /**
1417
+ * Advisory list — the session exists and is usable, but the listed issues may
1418
+ * warrant attention.
1419
+ */
1420
+ warnings?: Array<SessionPatchResponse.Warning>;
1421
+ }
1422
+ export declare namespace SessionPatchResponse {
1423
+ /**
1424
+ * The configuration used to create this session
1425
+ */
1426
+ interface Config {
1427
+ /**
1428
+ * Execute helper configuration
1429
+ */
1430
+ execute: Config.Execute;
1431
+ /**
1432
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1433
+ * is returned as "all".
1434
+ */
1435
+ preload: Config.Preload;
1436
+ /**
1437
+ * Search helper configuration
1438
+ */
1439
+ search: Config.Search;
1440
+ /**
1441
+ * User identifier for this session
1442
+ */
1443
+ user_id: string;
1444
+ /**
1445
+ * Auth config overrides per toolkit
1446
+ */
1447
+ auth_configs?: {
1448
+ [key: string]: string;
1449
+ };
1450
+ /**
1451
+ * Connected account overrides per toolkit. Each connected account must belong to
1452
+ * the same user_id as the session.
1453
+ */
1454
+ connected_accounts?: {
1455
+ [key: string]: string;
1456
+ };
1457
+ /**
1458
+ * Manage connections configuration
1459
+ */
1460
+ manage_connections?: Config.ManageConnections;
1461
+ /**
1462
+ * Multi-account configuration for this session.
1463
+ */
1464
+ multi_account?: Config.MultiAccount;
1465
+ /**
1466
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1467
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1468
+ * tool must NOT have any of. Both conditions must be satisfied.
1469
+ */
1470
+ tags?: Config.Tags;
1471
+ /**
1472
+ * Toolkit configuration - either enabled list or disabled list
1473
+ */
1474
+ toolkits?: Config.Enabled | Config.Disabled;
1475
+ /**
1476
+ * Tool-level configuration per toolkit
1477
+ */
1478
+ tools?: {
1479
+ [key: string]: Config.Enabled | Config.Disabled | Config.Tags;
1480
+ };
1481
+ /**
1482
+ * Workbench configuration
1483
+ */
1484
+ workbench?: Config.Workbench;
1485
+ }
1486
+ namespace Config {
1487
+ /**
1488
+ * Execute helper configuration
1489
+ */
1490
+ interface Execute {
1491
+ enable_multi_execute?: boolean;
1492
+ }
1493
+ /**
1494
+ * Preload configuration. Explicit slugs are returned as an array; dynamic preload
1495
+ * is returned as "all".
1496
+ */
1497
+ interface Preload {
1498
+ /**
1499
+ * Explicit preloaded tool slugs, or "all" when the session dynamically exposes all
1500
+ * app tools allowed by its filters.
1501
+ */
1502
+ tools: Array<string> | 'all';
1503
+ }
1504
+ /**
1505
+ * Search helper configuration
1506
+ */
1507
+ interface Search {
1508
+ enable?: boolean;
1509
+ }
1510
+ /**
1511
+ * Manage connections configuration
1512
+ */
1513
+ interface ManageConnections {
1514
+ /**
1515
+ * Custom callback URL for connected account auth flows
1516
+ */
1517
+ callback_url?: string;
1518
+ /**
1519
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS. Default true.
1520
+ */
1521
+ enable_connection_removal?: boolean;
1522
+ /**
1523
+ * Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
1524
+ * Default false. May not work reliably with GPT models.
1525
+ */
1526
+ enable_wait_for_connections?: boolean;
1527
+ /**
1528
+ * Whether to enable the connection manager for automatic connection handling
1529
+ */
1530
+ enabled?: boolean;
1531
+ }
1532
+ /**
1533
+ * Multi-account configuration for this session.
1534
+ */
1535
+ interface MultiAccount {
1536
+ /**
1537
+ * When true, enables multi-account mode for this session. When not set, falls back
1538
+ * to org/project-level configuration.
1539
+ */
1540
+ enable?: boolean;
1541
+ /**
1542
+ * Maximum number of connected accounts allowed per toolkit. Defaults to 5 when
1543
+ * multi-account is enabled.
1544
+ */
1545
+ max_accounts_per_toolkit?: number;
1546
+ /**
1547
+ * When true, require explicit account selection when multiple accounts are
1548
+ * connected. When false (default), use the first/default account.
1549
+ */
1550
+ require_explicit_selection?: boolean;
1551
+ }
1552
+ /**
1553
+ * MCP tool annotation hints for filtering tools with enabled/disabled support.
1554
+ * enabled: tags that the tool must have at least one of. disabled: tags that the
1555
+ * tool must NOT have any of. Both conditions must be satisfied.
1556
+ */
1557
+ interface Tags {
1558
+ /**
1559
+ * Tags that the tool must NOT have any of
1560
+ */
1561
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1562
+ /**
1563
+ * Tags that the tool must have at least one of
1564
+ */
1565
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1566
+ }
1567
+ interface Enabled {
1568
+ enabled: Array<string>;
1569
+ }
1570
+ interface Disabled {
1571
+ disabled: Array<string>;
1572
+ }
1573
+ interface Enabled {
1574
+ enabled: Array<string>;
1575
+ }
1576
+ interface Disabled {
1577
+ disabled: Array<string>;
1578
+ }
1579
+ interface Tags {
1580
+ tags: Tags.Tags;
1581
+ }
1582
+ namespace Tags {
1583
+ interface Tags {
1584
+ /**
1585
+ * Tags that the tool must NOT have any of
1586
+ */
1587
+ disabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1588
+ /**
1589
+ * Tags that the tool must have at least one of
1590
+ */
1591
+ enabled?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1592
+ }
1593
+ }
1594
+ /**
1595
+ * Workbench configuration
1596
+ */
1597
+ interface Workbench {
1598
+ /**
1599
+ * Character threshold after which tool execution response are saved to a file in
1600
+ * workbench. Default is 20k.
1601
+ */
1602
+ auto_offload_threshold?: number;
1603
+ /**
1604
+ * Whether the workbench (code execution sandbox) is enabled. When false,
1605
+ * COMPOSIO_REMOTE_WORKBENCH and COMPOSIO_REMOTE_BASH_TOOL are not exposed.
1606
+ */
1607
+ enable?: boolean;
1608
+ /**
1609
+ * Whether proxy execution is enabled in the workbench
1610
+ */
1611
+ proxy_execution_enabled?: boolean;
1612
+ /**
1613
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1614
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
1615
+ */
1616
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1617
+ }
1618
+ }
1619
+ interface Mcp {
1620
+ /**
1621
+ * The type of the MCP server. Can be http
1622
+ */
1623
+ type: 'http';
1624
+ /**
1625
+ * The URL of the MCP server
1626
+ */
1627
+ url: string;
1628
+ }
1629
+ /**
1630
+ * Experimental features
1631
+ */
1632
+ interface Experimental {
1633
+ /**
1634
+ * The assistive system prompt for the tool router session
1635
+ */
1636
+ assistive_prompt?: string;
1637
+ /**
1638
+ * User-defined custom toolkits with grouped tools (no-auth)
1639
+ */
1640
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1641
+ /**
1642
+ * Custom tools — standalone or extending Composio toolkits
1643
+ */
1644
+ custom_tools?: Array<Experimental.CustomTool>;
1645
+ }
1646
+ namespace Experimental {
1647
+ interface CustomToolkit {
1648
+ description: string;
1649
+ name: string;
1650
+ slug: string;
1651
+ tools: Array<CustomToolkit.Tool>;
1652
+ }
1653
+ namespace CustomToolkit {
1654
+ interface Tool {
1655
+ description: string;
1656
+ input_schema: {
1657
+ [key: string]: unknown;
1658
+ };
1659
+ name: string;
1660
+ /**
1661
+ * Original tool slug as provided by the user
1662
+ */
1663
+ original_slug: string;
1664
+ /**
1665
+ * Prefixed tool slug (e.g. LOCAL_CRM_FIND_CUSTOMER)
1666
+ */
1667
+ slug: string;
1668
+ output_schema?: {
1669
+ [key: string]: unknown;
1670
+ };
1671
+ }
1672
+ }
1673
+ interface CustomTool {
1674
+ description: string;
1675
+ input_schema: {
1676
+ [key: string]: unknown;
1677
+ };
1678
+ name: string;
1679
+ /**
1680
+ * Original tool slug as provided by the user
1681
+ */
1682
+ original_slug: string;
1683
+ /**
1684
+ * Prefixed tool slug (e.g. LOCAL_GMAIL_GET_IMPORTANT_EMAILS)
1685
+ */
1686
+ slug: string;
1687
+ extends_toolkit?: string;
1688
+ output_schema?: {
1689
+ [key: string]: unknown;
1690
+ };
1691
+ }
1692
+ }
1693
+ interface Warning {
1694
+ /**
1695
+ * Stable machine code identifying the advisory. Safe to switch on in client code.
1696
+ */
1697
+ code: 'PRELOAD_TOOLS_HIGH_CONTEXT_USAGE';
1698
+ /**
1699
+ * Human-readable description of the advisory. Suitable for logging or surfacing to
1700
+ * end users.
1701
+ */
1702
+ message: string;
1703
+ }
1704
+ }
1705
+ export interface SessionProxyExecuteResponse {
1706
+ /**
1707
+ * The HTTP status code returned from the proxied API
1708
+ */
1709
+ status: number;
1710
+ /**
1711
+ * Binary body response data. Present when the response is a binary file.
1712
+ */
1713
+ binary_data?: SessionProxyExecuteResponse.BinaryData;
1714
+ /**
1715
+ * The response data returned from the proxied API
1716
+ */
1717
+ data?: unknown;
1718
+ /**
1719
+ * The HTTP headers returned from the proxied API
1720
+ */
1721
+ headers?: {
1722
+ [key: string]: string;
1723
+ };
1724
+ }
1725
+ export declare namespace SessionProxyExecuteResponse {
1726
+ /**
1727
+ * Binary body response data. Present when the response is a binary file.
1728
+ */
1729
+ interface BinaryData {
1730
+ /**
1731
+ * Content-Type of the binary data
1732
+ */
1733
+ content_type: string;
1734
+ /**
1735
+ * File size in bytes
1736
+ */
1737
+ size: number;
1738
+ /**
1739
+ * URL to download binary content
1740
+ */
1741
+ url: string;
1742
+ /**
1743
+ * ISO 8601 timestamp when the URL expires
1744
+ */
1745
+ expires_at?: string;
1746
+ }
1747
+ }
1748
+ export interface SessionSearchResponse {
1749
+ /**
1750
+ * Error message if any searches failed, null if all succeeded. Format: "X out of Y
1751
+ * searches failed, reasons: <details>"
1752
+ */
1753
+ error: string | null;
1754
+ /**
1755
+ * Combined workflow guidance covering connections, planner, and memory usage. Each
1756
+ * element is a step instruction.
1757
+ */
1758
+ next_steps_guidance: Array<string>;
1759
+ /**
1760
+ * Per-query search results with tools, reasoning, and memory. One entry per query
1761
+ * in request order.
1762
+ */
1763
+ results: Array<SessionSearchResponse.Result>;
1764
+ /**
1765
+ * Session info for correlating meta tool calls
1766
+ */
1767
+ session: SessionSearchResponse.Session;
1768
+ /**
1769
+ * Whether all searches completed successfully. False if any query failed.
1770
+ */
1771
+ success: boolean;
1772
+ /**
1773
+ * Time information for the query
1774
+ */
1775
+ time_info: SessionSearchResponse.TimeInfo;
1776
+ /**
1777
+ * Deduplicated tool definitions keyed by tool_slug for O(1) lookup. Each tool
1778
+ * appears once even if used in multiple queries.
1779
+ */
1780
+ tool_schemas: {
1781
+ [key: string]: SessionSearchResponse.ToolSchemas;
1782
+ };
1783
+ /**
1784
+ * Connection status for all toolkits mentioned across all queries, with
1785
+ * descriptions merged in.
1786
+ */
1787
+ toolkit_connection_statuses: Array<SessionSearchResponse.ToolkitConnectionStatus>;
1788
+ }
1789
+ export declare namespace SessionSearchResponse {
1790
+ interface Result {
1791
+ /**
1792
+ * 1-based index of the query in the request
1793
+ */
1794
+ index: number;
1795
+ /**
1796
+ * List of main tool slugs matching the search criteria
1797
+ */
1798
+ primary_tool_slugs: Array<string>;
1799
+ /**
1800
+ * List of related tool slugs that might be useful
1801
+ */
1802
+ related_tool_slugs: Array<string>;
1803
+ /**
1804
+ * List of unique toolkit slugs used by tools in this query
1805
+ */
1806
+ toolkits: Array<string>;
1807
+ /**
1808
+ * The use case that was searched
1809
+ */
1810
+ use_case: string;
1811
+ /**
1812
+ * Task difficulty assessment (e.g., "easy - Simple single-tool operation with
1813
+ * known parameters")
1814
+ */
1815
+ difficulty?: string;
1816
+ /**
1817
+ * Error message if the search for this query failed, null otherwise. Always
1818
+ * present for failed queries.
1819
+ */
1820
+ error?: string | null;
1821
+ /**
1822
+ * Guidance message about the search results, particularly when a cached plan is
1823
+ * available
1824
+ */
1825
+ execution_guidance?: string;
1826
+ /**
1827
+ * Common pitfalls and considerations (only present when cached plan is available)
1828
+ */
1829
+ known_pitfalls?: Array<string>;
1830
+ /**
1831
+ * Memory data relevant to this query, grouped by app. Only present for non-cached
1832
+ * search results.
1833
+ */
1834
+ memory?: {
1835
+ [key: string]: Array<string>;
1836
+ };
1837
+ /**
1838
+ * ID of cached plan if available
1839
+ */
1840
+ plan_id?: string;
1841
+ /**
1842
+ * Workflow steps from cached plan (only present when cached plan is available)
1843
+ */
1844
+ recommended_plan_steps?: Array<string>;
1845
+ /**
1846
+ * Reference Python code snippets for processing tool responses in the workbench
1847
+ * (only present when cached plan is available)
1848
+ */
1849
+ reference_workbench_snippets?: Array<Result.ReferenceWorkbenchSnippet>;
1850
+ }
1851
+ namespace Result {
1852
+ interface ReferenceWorkbenchSnippet {
1853
+ /**
1854
+ * Python code snippet for the workbench
1855
+ */
1856
+ code: string;
1857
+ /**
1858
+ * Description of what the code snippet does
1859
+ */
1860
+ description: string;
1861
+ }
1862
+ }
1863
+ /**
1864
+ * Session info for correlating meta tool calls
1865
+ */
1866
+ interface Session {
943
1867
  /**
944
1868
  * Session identifier to be passed to subsequent meta tool calls as session_id.
945
1869
  */
@@ -984,436 +1908,987 @@ export declare namespace SessionSearchResponse {
984
1908
  */
985
1909
  description?: string;
986
1910
  /**
987
- * Whether the full input_schema is included in this response
1911
+ * Whether the full input_schema is included in this response
1912
+ */
1913
+ hasFullSchema?: boolean;
1914
+ /**
1915
+ * Input schema for the tool (only present when hasFullSchema is true)
1916
+ */
1917
+ input_schema?: {
1918
+ [key: string]: unknown;
1919
+ };
1920
+ /**
1921
+ * Output/response schema for the tool. Only included when include_output_schemas
1922
+ * is true.
1923
+ */
1924
+ output_schema?: {
1925
+ [key: string]: unknown;
1926
+ };
1927
+ /**
1928
+ * Reference to fetch full schema when hasFullSchema is false
1929
+ */
1930
+ schemaRef?: ToolSchemas.SchemaRef;
1931
+ }
1932
+ namespace ToolSchemas {
1933
+ /**
1934
+ * Reference to fetch full schema when hasFullSchema is false
1935
+ */
1936
+ interface SchemaRef {
1937
+ /**
1938
+ * Arguments to pass to the tool
1939
+ */
1940
+ args: SchemaRef.Args;
1941
+ /**
1942
+ * Tool to call
1943
+ */
1944
+ tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
1945
+ /**
1946
+ * Instruction message for the LLM
1947
+ */
1948
+ message?: string;
1949
+ }
1950
+ namespace SchemaRef {
1951
+ /**
1952
+ * Arguments to pass to the tool
1953
+ */
1954
+ interface Args {
1955
+ /**
1956
+ * Tool slugs to fetch schemas for
1957
+ */
1958
+ tool_slugs: Array<string>;
1959
+ }
1960
+ }
1961
+ }
1962
+ interface ToolkitConnectionStatus {
1963
+ /**
1964
+ * Description of what the toolkit does and its capabilities
1965
+ */
1966
+ description: string;
1967
+ /**
1968
+ * Whether an active connection exists for this toolkit
1969
+ */
1970
+ has_active_connection: boolean;
1971
+ /**
1972
+ * Human-readable message about the connection status and next steps
1973
+ */
1974
+ status_message: string;
1975
+ /**
1976
+ * The toolkit slug identifier (e.g., "gmail", "slack")
1977
+ */
1978
+ toolkit: string;
1979
+ /**
1980
+ * When "required", the agent must specify which account to use. Present only when
1981
+ * multiple accounts exist.
1982
+ */
1983
+ account_selection?: 'required';
1984
+ /**
1985
+ * List of connected accounts for this toolkit. Present when multi-account is
1986
+ * enabled.
1987
+ */
1988
+ accounts?: Array<ToolkitConnectionStatus.Account>;
1989
+ /**
1990
+ * Connection details including auth config and connected account IDs. Only present
1991
+ * when has_active_connection is true.
1992
+ */
1993
+ connection_details?: {
1994
+ [key: string]: unknown;
1995
+ };
1996
+ /**
1997
+ * Information about the currently connected user (email, name, etc.)
1998
+ */
1999
+ current_user_info?: {
2000
+ [key: string]: unknown;
2001
+ };
2002
+ }
2003
+ namespace ToolkitConnectionStatus {
2004
+ interface Account {
2005
+ /**
2006
+ * Unique identifier for this account
2007
+ */
2008
+ id: string;
2009
+ /**
2010
+ * ISO 8601 timestamp of when the account was connected
2011
+ */
2012
+ created_at: string;
2013
+ /**
2014
+ * Whether this is the default account for the toolkit
2015
+ */
2016
+ is_default: boolean;
2017
+ /**
2018
+ * Connection status (e.g., "active")
2019
+ */
2020
+ status: string;
2021
+ /**
2022
+ * User-assigned alias for this account
2023
+ */
2024
+ alias?: string;
2025
+ /**
2026
+ * Information about the connected user (email, name, etc.)
2027
+ */
2028
+ user_info?: {
2029
+ [key: string]: unknown;
2030
+ };
2031
+ }
2032
+ }
2033
+ }
2034
+ export interface SessionToolkitsResponse {
2035
+ current_page: number;
2036
+ items: Array<SessionToolkitsResponse.Item>;
2037
+ total_items: number;
2038
+ total_pages: number;
2039
+ next_cursor?: string | null;
2040
+ }
2041
+ export declare namespace SessionToolkitsResponse {
2042
+ interface Item {
2043
+ /**
2044
+ * Available Composio-managed auth schemes
2045
+ */
2046
+ composio_managed_auth_schemes: Array<string>;
2047
+ /**
2048
+ * Connected account if available
2049
+ */
2050
+ connected_account: Item.ConnectedAccount | null;
2051
+ /**
2052
+ * Whether the toolkit is enabled
2053
+ */
2054
+ enabled: boolean;
2055
+ /**
2056
+ * Whether the toolkit is no-auth
2057
+ */
2058
+ is_no_auth: boolean;
2059
+ /**
2060
+ * Toolkit metadata
2061
+ */
2062
+ meta: Item.Meta;
2063
+ /**
2064
+ * Display name of the toolkit
2065
+ */
2066
+ name: string;
2067
+ /**
2068
+ * Unique slug identifier
2069
+ */
2070
+ slug: string;
2071
+ }
2072
+ namespace Item {
2073
+ /**
2074
+ * Connected account if available
2075
+ */
2076
+ interface ConnectedAccount {
2077
+ /**
2078
+ * Connected account identifier
2079
+ */
2080
+ id: string;
2081
+ /**
2082
+ * Auth config details
2083
+ */
2084
+ auth_config: ConnectedAccount.AuthConfig;
2085
+ /**
2086
+ * Creation timestamp
2087
+ */
2088
+ created_at: string;
2089
+ /**
2090
+ * Connection status
2091
+ */
2092
+ status: string;
2093
+ /**
2094
+ * User identifier
2095
+ */
2096
+ user_id: string;
2097
+ }
2098
+ namespace ConnectedAccount {
2099
+ /**
2100
+ * Auth config details
2101
+ */
2102
+ interface AuthConfig {
2103
+ /**
2104
+ * Auth config identifier
2105
+ */
2106
+ id: string;
2107
+ /**
2108
+ * Authentication scheme type
2109
+ */
2110
+ auth_scheme: string;
2111
+ /**
2112
+ * Whether this is a Composio-managed auth config
2113
+ */
2114
+ is_composio_managed: boolean;
2115
+ }
2116
+ }
2117
+ /**
2118
+ * Toolkit metadata
2119
+ */
2120
+ interface Meta {
2121
+ /**
2122
+ * Description of the toolkit
2123
+ */
2124
+ description: string;
2125
+ /**
2126
+ * URL to the toolkit logo
2127
+ */
2128
+ logo: string;
2129
+ }
2130
+ }
2131
+ }
2132
+ export interface SessionToolsResponse {
2133
+ current_page: number;
2134
+ items: Array<SessionToolsResponse.Item>;
2135
+ total_items: number;
2136
+ total_pages: number;
2137
+ next_cursor?: string | null;
2138
+ }
2139
+ export declare namespace SessionToolsResponse {
2140
+ interface Item {
2141
+ /**
2142
+ * List of all available versions for this tool
988
2143
  */
989
- hasFullSchema?: boolean;
2144
+ available_versions: Array<string>;
2145
+ deprecated: Item.Deprecated;
990
2146
  /**
991
- * Input schema for the tool (only present when hasFullSchema is true)
2147
+ * Detailed explanation of the tool's functionality and purpose
992
2148
  */
993
- input_schema?: {
994
- [key: string]: unknown;
995
- };
2149
+ description: string;
996
2150
  /**
997
- * Output/response schema for the tool. Only included when include_output_schemas
998
- * is true.
2151
+ * Schema definition of required input parameters for the tool
999
2152
  */
1000
- output_schema?: {
2153
+ input_parameters: {
1001
2154
  [key: string]: unknown;
1002
2155
  };
1003
2156
  /**
1004
- * Reference to fetch full schema when hasFullSchema is false
2157
+ * Indicates if this tool is deprecated and may be removed in the future
1005
2158
  */
1006
- schemaRef?: ToolSchemas.SchemaRef;
1007
- }
1008
- namespace ToolSchemas {
2159
+ is_deprecated: boolean;
1009
2160
  /**
1010
- * Reference to fetch full schema when hasFullSchema is false
2161
+ * Human-readable display name of the tool
1011
2162
  */
1012
- interface SchemaRef {
1013
- /**
1014
- * Arguments to pass to the tool
1015
- */
1016
- args: SchemaRef.Args;
1017
- /**
1018
- * Tool to call
1019
- */
1020
- tool: 'COMPOSIO_GET_TOOL_SCHEMAS';
1021
- /**
1022
- * Instruction message for the LLM
1023
- */
1024
- message?: string;
1025
- }
1026
- namespace SchemaRef {
1027
- /**
1028
- * Arguments to pass to the tool
1029
- */
1030
- interface Args {
1031
- /**
1032
- * Tool slugs to fetch schemas for
1033
- */
1034
- tool_slugs: Array<string>;
1035
- }
1036
- }
1037
- }
1038
- interface ToolkitConnectionStatus {
2163
+ name: string;
1039
2164
  /**
1040
- * Description of what the toolkit does and its capabilities
2165
+ * Indicates if the tool can be used without authentication
1041
2166
  */
1042
- description: string;
2167
+ no_auth: boolean;
1043
2168
  /**
1044
- * Whether an active connection exists for this toolkit
2169
+ * Schema definition of return values from the tool
1045
2170
  */
1046
- has_active_connection: boolean;
2171
+ output_parameters: {
2172
+ [key: string]: unknown;
2173
+ };
1047
2174
  /**
1048
- * Human-readable message about the connection status and next steps
2175
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2176
+ * only exposes flat scopes.
1049
2177
  */
1050
- status_message: string;
2178
+ scope_requirements: Item.ScopeRequirements | null;
1051
2179
  /**
1052
- * The toolkit slug identifier (e.g., "gmail", "slack")
2180
+ * List of scopes associated with the tool
1053
2181
  */
1054
- toolkit: string;
2182
+ scopes: Array<string>;
1055
2183
  /**
1056
- * When "required", the agent must specify which account to use. Present only when
1057
- * multiple accounts exist.
2184
+ * Unique identifier for the tool
1058
2185
  */
1059
- account_selection?: 'required';
2186
+ slug: string;
1060
2187
  /**
1061
- * List of connected accounts for this toolkit. Present when multi-account is
1062
- * enabled.
2188
+ * List of tags associated with the tool for categorization and filtering
1063
2189
  */
1064
- accounts?: Array<ToolkitConnectionStatus.Account>;
2190
+ tags: Array<string>;
2191
+ toolkit: Item.Toolkit;
1065
2192
  /**
1066
- * Connection details including auth config and connected account IDs. Only present
1067
- * when has_active_connection is true.
2193
+ * Current version of the tool
1068
2194
  */
1069
- connection_details?: {
1070
- [key: string]: unknown;
1071
- };
2195
+ version: string;
1072
2196
  /**
1073
- * Information about the currently connected user (email, name, etc.)
2197
+ * Human-friendly description of the tool, if available
1074
2198
  */
1075
- current_user_info?: {
1076
- [key: string]: unknown;
1077
- };
2199
+ human_description?: string;
1078
2200
  }
1079
- namespace ToolkitConnectionStatus {
1080
- interface Account {
2201
+ namespace Item {
2202
+ interface Deprecated {
1081
2203
  /**
1082
- * Unique identifier for this account
2204
+ * List of all available versions for this tool
1083
2205
  */
1084
- id: string;
2206
+ available_versions: Array<string>;
1085
2207
  /**
1086
- * ISO 8601 timestamp of when the account was connected
2208
+ * The display name of the tool
1087
2209
  */
1088
- created_at: string;
2210
+ displayName: string;
1089
2211
  /**
1090
- * Whether this is the default account for the toolkit
2212
+ * Indicates if this tool is deprecated and may be removed in the future
1091
2213
  */
1092
- is_default: boolean;
2214
+ is_deprecated: boolean;
2215
+ toolkit: Deprecated.Toolkit;
1093
2216
  /**
1094
- * Connection status (e.g., "active")
2217
+ * Current version identifier of the tool
1095
2218
  */
1096
- status: string;
2219
+ version: string;
2220
+ }
2221
+ namespace Deprecated {
2222
+ interface Toolkit {
2223
+ /**
2224
+ * URL to the toolkit logo image
2225
+ */
2226
+ logo: string;
2227
+ }
2228
+ }
2229
+ /**
2230
+ * Structured scope requirements for the tool. Null means the tool is legacy and
2231
+ * only exposes flat scopes.
2232
+ */
2233
+ interface ScopeRequirements {
2234
+ all_of: Array<string | ScopeRequirements.AnyOf>;
2235
+ }
2236
+ namespace ScopeRequirements {
2237
+ interface AnyOf {
2238
+ any_of: Array<string>;
2239
+ }
2240
+ }
2241
+ interface Toolkit {
1097
2242
  /**
1098
- * User-assigned alias for this account
2243
+ * URL to the toolkit logo image
1099
2244
  */
1100
- alias?: string;
2245
+ logo: string;
1101
2246
  /**
1102
- * Information about the connected user (email, name, etc.)
2247
+ * Human-readable name of the parent toolkit
1103
2248
  */
1104
- user_info?: {
1105
- [key: string]: unknown;
1106
- };
2249
+ name: string;
2250
+ /**
2251
+ * Unique identifier of the parent toolkit
2252
+ */
2253
+ slug: string;
1107
2254
  }
1108
2255
  }
1109
2256
  }
1110
- export interface SessionToolkitsResponse {
1111
- current_page: number;
1112
- items: Array<SessionToolkitsResponse.Item>;
1113
- total_items: number;
1114
- total_pages: number;
1115
- next_cursor?: string | null;
2257
+ export interface SessionCreateParams {
2258
+ /**
2259
+ * The identifier of the user who is initiating the session, ideally a unique
2260
+ * identifier from your database like a user ID or email address
2261
+ */
2262
+ user_id: string;
2263
+ /**
2264
+ * The auth configs to use for the session. This will override the default behavior
2265
+ * and use the given auth config when specific toolkits are being executed
2266
+ */
2267
+ auth_configs?: {
2268
+ [key: string]: string;
2269
+ };
2270
+ /**
2271
+ * The connected accounts to use for the session. This will override the default
2272
+ * behaviour and use the given connected account when specific toolkits are being
2273
+ * executed. Each connected account must exist (not deleted or disabled) and belong
2274
+ * to the same `user_id` as the session — otherwise session creation fails with a
2275
+ * clear error explaining which account didn't match.
2276
+ */
2277
+ connected_accounts?: {
2278
+ [key: string]: string;
2279
+ };
2280
+ execute?: SessionCreateParams.Execute;
2281
+ /**
2282
+ * Experimental features - not stable, may be modified or removed in future
2283
+ * versions.
2284
+ */
2285
+ experimental?: SessionCreateParams.Experimental;
2286
+ /**
2287
+ * Configuration for connection management settings
2288
+ */
2289
+ manage_connections?: SessionCreateParams.ManageConnections;
2290
+ /**
2291
+ * Configure multi-account behavior. When enabled, users can connect multiple
2292
+ * accounts per toolkit.
2293
+ */
2294
+ multi_account?: SessionCreateParams.MultiAccount;
2295
+ /**
2296
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
2297
+ * "all" to dynamically expose every app tool allowed by positive
2298
+ * toolkits/tools/tags filters.
2299
+ */
2300
+ preload?: SessionCreateParams.Preload;
2301
+ search?: SessionCreateParams.Search;
2302
+ /**
2303
+ * Global MCP tool annotation hints for filtering. Array format is treated as
2304
+ * enabled list. Object format supports both enabled (tool must have at least one)
2305
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
2306
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
2307
+ */
2308
+ tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | SessionCreateParams.UnionMember1;
2309
+ /**
2310
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
2311
+ * toolkits (denylist). Mutually exclusive.
2312
+ */
2313
+ toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
2314
+ /**
2315
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
2316
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
2317
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
2318
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
2319
+ * match.
2320
+ */
2321
+ tools?: {
2322
+ [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
2323
+ };
2324
+ /**
2325
+ * Configuration for workbench behavior
2326
+ */
2327
+ workbench?: SessionCreateParams.Workbench;
1116
2328
  }
1117
- export declare namespace SessionToolkitsResponse {
1118
- interface Item {
1119
- /**
1120
- * Available Composio-managed auth schemes
1121
- */
1122
- composio_managed_auth_schemes: Array<string>;
1123
- /**
1124
- * Connected account if available
1125
- */
1126
- connected_account: Item.ConnectedAccount | null;
1127
- /**
1128
- * Whether the toolkit is enabled
1129
- */
1130
- enabled: boolean;
2329
+ export declare namespace SessionCreateParams {
2330
+ interface Execute {
2331
+ enable_multi_execute?: boolean;
2332
+ }
2333
+ /**
2334
+ * Experimental features - not stable, may be modified or removed in future
2335
+ * versions.
2336
+ */
2337
+ interface Experimental {
1131
2338
  /**
1132
- * Whether the toolkit is no-auth
2339
+ * Customize assistive prompt generation (e.g., timezone).
1133
2340
  */
1134
- is_no_auth: boolean;
2341
+ assistive_prompt_config?: Experimental.AssistivePromptConfig;
1135
2342
  /**
1136
- * Toolkit metadata
2343
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
2344
+ * existing Composio toolkits. All tools are no-auth.
1137
2345
  */
1138
- meta: Item.Meta;
2346
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1139
2347
  /**
1140
- * Display name of the toolkit
2348
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
2349
+ * extends_toolkit inherit the Composio toolkit's connection.
1141
2350
  */
1142
- name: string;
2351
+ custom_tools?: Array<Experimental.CustomTool>;
1143
2352
  /**
1144
- * Unique slug identifier
2353
+ * Per-tool elicitation permission config. Default behavior + per-tool
2354
+ * always_allow/always_deny overrides. Mutation via PATCH.
1145
2355
  */
1146
- slug: string;
2356
+ permissions?: Experimental.Permissions;
1147
2357
  }
1148
- namespace Item {
2358
+ namespace Experimental {
1149
2359
  /**
1150
- * Connected account if available
2360
+ * Customize assistive prompt generation (e.g., timezone).
1151
2361
  */
1152
- interface ConnectedAccount {
2362
+ interface AssistivePromptConfig {
1153
2363
  /**
1154
- * Connected account identifier
2364
+ * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
2365
+ * customize the system prompt with timezone-aware instructions.
1155
2366
  */
1156
- id: string;
2367
+ user_timezone?: string;
2368
+ }
2369
+ interface CustomToolkit {
1157
2370
  /**
1158
- * Auth config details
2371
+ * Used for BM25 search matching and shown in toolkit connection statuses.
1159
2372
  */
1160
- auth_config: ConnectedAccount.AuthConfig;
2373
+ description: string;
1161
2374
  /**
1162
- * Creation timestamp
2375
+ * Display name shown to the LLM and in search results.
1163
2376
  */
1164
- created_at: string;
2377
+ name: string;
1165
2378
  /**
1166
- * Connection status
2379
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
2380
+ * slugs. Alphanumeric, underscores, and hyphens only.
1167
2381
  */
1168
- status: string;
2382
+ slug: string;
1169
2383
  /**
1170
- * User identifier
2384
+ * Tools in this custom toolkit
1171
2385
  */
1172
- user_id: string;
2386
+ tools: Array<CustomToolkit.Tool>;
1173
2387
  }
1174
- namespace ConnectedAccount {
1175
- /**
1176
- * Auth config details
1177
- */
1178
- interface AuthConfig {
2388
+ namespace CustomToolkit {
2389
+ interface Tool {
1179
2390
  /**
1180
- * Auth config identifier
2391
+ * Used for BM25 search matching and shown to the LLM.
1181
2392
  */
1182
- id: string;
2393
+ description: string;
1183
2394
  /**
1184
- * Authentication scheme type
2395
+ * Must have type: "object" and a properties field.
1185
2396
  */
1186
- auth_scheme: string;
2397
+ input_schema: {
2398
+ [key: string]: unknown;
2399
+ };
1187
2400
  /**
1188
- * Whether this is a Composio-managed auth config
2401
+ * Human-readable display name
1189
2402
  */
1190
- is_composio_managed: boolean;
2403
+ name: string;
2404
+ /**
2405
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
2406
+ * chars total).
2407
+ */
2408
+ slug: string;
2409
+ /**
2410
+ * Optional output schema for the tool response.
2411
+ */
2412
+ output_schema?: {
2413
+ [key: string]: unknown;
2414
+ };
1191
2415
  }
1192
2416
  }
2417
+ interface CustomTool {
2418
+ /**
2419
+ * Used for BM25 search matching and shown to the LLM.
2420
+ */
2421
+ description: string;
2422
+ /**
2423
+ * Must have type: "object" and a properties field.
2424
+ */
2425
+ input_schema: {
2426
+ [key: string]: unknown;
2427
+ };
2428
+ /**
2429
+ * Human-readable display name
2430
+ */
2431
+ name: string;
2432
+ /**
2433
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
2434
+ * (extending). Max 60 chars total.
2435
+ */
2436
+ slug: string;
2437
+ /**
2438
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
2439
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
2440
+ */
2441
+ extends_toolkit?: string;
2442
+ /**
2443
+ * JSON Schema describing tool output (optional)
2444
+ */
2445
+ output_schema?: {
2446
+ [key: string]: unknown;
2447
+ };
2448
+ }
1193
2449
  /**
1194
- * Toolkit metadata
2450
+ * Per-tool elicitation permission config. Default behavior + per-tool
2451
+ * always_allow/always_deny overrides. Mutation via PATCH.
1195
2452
  */
1196
- interface Meta {
2453
+ interface Permissions {
1197
2454
  /**
1198
- * Description of the toolkit
2455
+ * Default elicitation behavior when no override matches. `allow_all` runs every
2456
+ * tool without prompting; `ask_every_call` prompts on each invocation;
2457
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
2458
+ * session.
1199
2459
  */
1200
- description: string;
2460
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
1201
2461
  /**
1202
- * URL to the toolkit logo
2462
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
2463
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
2464
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
2465
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
2466
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
2467
+ * every call with allow-once/allow-session/deny, ignoring any cached session
2468
+ * allow. Overrides take precedence over `default`.
1203
2469
  */
1204
- logo: string;
2470
+ overrides?: {
2471
+ [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always';
2472
+ };
1205
2473
  }
1206
2474
  }
1207
- }
1208
- export interface SessionToolsResponse {
1209
2475
  /**
1210
- * List of tools with their complete schemas
2476
+ * Configuration for connection management settings
1211
2477
  */
1212
- items: Array<SessionToolsResponse.Item>;
1213
- }
1214
- export declare namespace SessionToolsResponse {
1215
- interface Item {
2478
+ interface ManageConnections {
1216
2479
  /**
1217
- * List of all available versions for this tool
2480
+ * The URL to redirect to after a user completes authentication for a connected
2481
+ * account. This allows you to handle the auth callback in your own application.
1218
2482
  */
1219
- available_versions: Array<string>;
1220
- deprecated: Item.Deprecated;
2483
+ callback_url?: string;
1221
2484
  /**
1222
- * Detailed explanation of the tool's functionality and purpose
2485
+ * Whether to enable the connection manager for automatic connection handling. If
2486
+ * true, we will provide a tool your agent can use to initiate connections to
2487
+ * toolkits if it doesnt exist. If set to false, then you have to manage
2488
+ * connections manually.
1223
2489
  */
1224
- description: string;
2490
+ enable?: boolean | null;
1225
2491
  /**
1226
- * Schema definition of required input parameters for the tool
2492
+ * Enable the "remove" action in COMPOSIO_MANAGE_CONNECTIONS to allow deleting
2493
+ * connected accounts. Default true.
1227
2494
  */
1228
- input_parameters: {
1229
- [key: string]: unknown;
1230
- };
2495
+ enable_connection_removal?: boolean | null;
1231
2496
  /**
1232
- * Indicates if this tool is deprecated and may be removed in the future
2497
+ * When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
2498
+ * poll connection status after sharing auth URLs. Default is false (disabled). May
2499
+ * not work reliably with GPT models.
1233
2500
  */
1234
- is_deprecated: boolean;
2501
+ enable_wait_for_connections?: boolean | null;
2502
+ }
2503
+ /**
2504
+ * Configure multi-account behavior. When enabled, users can connect multiple
2505
+ * accounts per toolkit.
2506
+ */
2507
+ interface MultiAccount {
1235
2508
  /**
1236
- * Human-readable display name of the tool
2509
+ * When true, enables multi-account mode for this session. When not set, falls back
2510
+ * to org/project-level configuration.
1237
2511
  */
1238
- name: string;
2512
+ enable?: boolean;
1239
2513
  /**
1240
- * Indicates if the tool can be used without authentication
2514
+ * Maximum number of connected accounts allowed per toolkit. Must be between 2
2515
+ * and 10.
1241
2516
  */
1242
- no_auth: boolean;
2517
+ max_accounts_per_toolkit?: number;
1243
2518
  /**
1244
- * Schema definition of return values from the tool
2519
+ * When true, the agent must explicitly select which account to use. When false
2520
+ * (default), the first/default account is used automatically.
1245
2521
  */
1246
- output_parameters: {
1247
- [key: string]: unknown;
1248
- };
2522
+ require_explicit_selection?: boolean;
2523
+ }
2524
+ /**
2525
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
2526
+ * "all" to dynamically expose every app tool allowed by positive
2527
+ * toolkits/tools/tags filters.
2528
+ */
2529
+ interface Preload {
1249
2530
  /**
1250
- * Structured scope requirements for the tool. Null means the tool is legacy and
1251
- * only exposes flat scopes.
2531
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
2532
+ * future app tools allowed by the positive session filters. "all" is capped at
2533
+ * 1000 tools and is not supported without a positive allowlist.
1252
2534
  */
1253
- scope_requirements: Item.ScopeRequirements | null;
2535
+ tools?: Array<string> | string;
2536
+ }
2537
+ interface Search {
2538
+ enable?: boolean;
2539
+ }
2540
+ interface UnionMember1 {
2541
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
2542
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
2543
+ }
2544
+ /**
2545
+ * Enable only specific toolkits (allowlist)
2546
+ */
2547
+ interface Enable {
1254
2548
  /**
1255
- * List of scopes associated with the tool
2549
+ * Only these specific toolkits will be enabled
1256
2550
  */
1257
- scopes: Array<string>;
2551
+ enable: Array<string>;
2552
+ }
2553
+ /**
2554
+ * Disable specific toolkits (denylist)
2555
+ */
2556
+ interface Disable {
1258
2557
  /**
1259
- * Unique identifier for the tool
2558
+ * These specific toolkits will be disabled
1260
2559
  */
1261
- slug: string;
2560
+ disable: Array<string>;
2561
+ }
2562
+ interface Enable {
1262
2563
  /**
1263
- * List of tags associated with the tool for categorization and filtering
2564
+ * Only these specific tools will be available for this toolkit
1264
2565
  */
1265
- tags: Array<string>;
1266
- toolkit: Item.Toolkit;
2566
+ enable: Array<string>;
2567
+ }
2568
+ interface Disable {
2569
+ /**
2570
+ * These specific tools will be disabled for this toolkit
2571
+ */
2572
+ disable: Array<string>;
2573
+ }
2574
+ interface Tags {
2575
+ /**
2576
+ * MCP tags to filter tools. Array format is treated as enabled list. Object format
2577
+ * supports both enabled and disabled lists.
2578
+ */
2579
+ tags: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | Tags.UnionMember1;
2580
+ }
2581
+ namespace Tags {
2582
+ interface UnionMember1 {
2583
+ disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
2584
+ enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
2585
+ }
2586
+ }
2587
+ /**
2588
+ * Configuration for workbench behavior
2589
+ */
2590
+ interface Workbench {
2591
+ /**
2592
+ * Character threshold for automatic offloading. When workbench response exceeds
2593
+ * this threshold, it will be automatically offloaded. Default is picked
2594
+ * automatically based on the response size.
2595
+ */
2596
+ auto_offload_threshold?: number;
2597
+ /**
2598
+ * Set to false to disable the workbench entirely. When disabled, no code execution
2599
+ * tools are available in the session.
2600
+ */
2601
+ enable?: boolean;
2602
+ /**
2603
+ * Whether proxy execution is enabled. When enabled, workbench can call URLs and
2604
+ * APIs directly.
2605
+ */
2606
+ enable_proxy_execution?: boolean;
2607
+ /**
2608
+ * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
2609
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
2610
+ */
2611
+ sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
2612
+ }
2613
+ }
2614
+ export interface SessionAttachParams {
2615
+ /**
2616
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2617
+ * customs — pass them on every request that needs them.
2618
+ */
2619
+ experimental?: SessionAttachParams.Experimental;
2620
+ }
2621
+ export declare namespace SessionAttachParams {
2622
+ /**
2623
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2624
+ * customs — pass them on every request that needs them.
2625
+ */
2626
+ interface Experimental {
1267
2627
  /**
1268
- * Current version of the tool
2628
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
2629
+ * existing Composio toolkits. All tools are no-auth.
1269
2630
  */
1270
- version: string;
2631
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
1271
2632
  /**
1272
- * Human-friendly description of the tool, if available
2633
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
2634
+ * extends_toolkit inherit the Composio toolkit's connection.
1273
2635
  */
1274
- human_description?: string;
2636
+ custom_tools?: Array<Experimental.CustomTool>;
1275
2637
  }
1276
- namespace Item {
1277
- interface Deprecated {
2638
+ namespace Experimental {
2639
+ interface CustomToolkit {
1278
2640
  /**
1279
- * List of all available versions for this tool
2641
+ * Used for BM25 search matching and shown in toolkit connection statuses.
1280
2642
  */
1281
- available_versions: Array<string>;
2643
+ description: string;
1282
2644
  /**
1283
- * The display name of the tool
2645
+ * Display name shown to the LLM and in search results.
1284
2646
  */
1285
- displayName: string;
2647
+ name: string;
1286
2648
  /**
1287
- * Indicates if this tool is deprecated and may be removed in the future
2649
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
2650
+ * slugs. Alphanumeric, underscores, and hyphens only.
1288
2651
  */
1289
- is_deprecated: boolean;
1290
- toolkit: Deprecated.Toolkit;
2652
+ slug: string;
1291
2653
  /**
1292
- * Current version identifier of the tool
2654
+ * Tools in this custom toolkit
1293
2655
  */
1294
- version: string;
2656
+ tools: Array<CustomToolkit.Tool>;
1295
2657
  }
1296
- namespace Deprecated {
1297
- interface Toolkit {
2658
+ namespace CustomToolkit {
2659
+ interface Tool {
1298
2660
  /**
1299
- * URL to the toolkit logo image
2661
+ * Used for BM25 search matching and shown to the LLM.
1300
2662
  */
1301
- logo: string;
1302
- }
1303
- }
1304
- /**
1305
- * Structured scope requirements for the tool. Null means the tool is legacy and
1306
- * only exposes flat scopes.
1307
- */
1308
- interface ScopeRequirements {
1309
- all_of: Array<string | ScopeRequirements.AnyOf>;
1310
- }
1311
- namespace ScopeRequirements {
1312
- interface AnyOf {
1313
- any_of: Array<string>;
2663
+ description: string;
2664
+ /**
2665
+ * Must have type: "object" and a properties field.
2666
+ */
2667
+ input_schema: {
2668
+ [key: string]: unknown;
2669
+ };
2670
+ /**
2671
+ * Human-readable display name
2672
+ */
2673
+ name: string;
2674
+ /**
2675
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
2676
+ * chars total).
2677
+ */
2678
+ slug: string;
2679
+ /**
2680
+ * Optional output schema for the tool response.
2681
+ */
2682
+ output_schema?: {
2683
+ [key: string]: unknown;
2684
+ };
1314
2685
  }
1315
2686
  }
1316
- interface Toolkit {
2687
+ interface CustomTool {
1317
2688
  /**
1318
- * URL to the toolkit logo image
2689
+ * Used for BM25 search matching and shown to the LLM.
1319
2690
  */
1320
- logo: string;
2691
+ description: string;
1321
2692
  /**
1322
- * Human-readable name of the parent toolkit
2693
+ * Must have type: "object" and a properties field.
2694
+ */
2695
+ input_schema: {
2696
+ [key: string]: unknown;
2697
+ };
2698
+ /**
2699
+ * Human-readable display name
1323
2700
  */
1324
2701
  name: string;
1325
2702
  /**
1326
- * Unique identifier of the parent toolkit
2703
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
2704
+ * (extending). Max 60 chars total.
1327
2705
  */
1328
2706
  slug: string;
2707
+ /**
2708
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
2709
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
2710
+ */
2711
+ extends_toolkit?: string;
2712
+ /**
2713
+ * JSON Schema describing tool output (optional)
2714
+ */
2715
+ output_schema?: {
2716
+ [key: string]: unknown;
2717
+ };
1329
2718
  }
1330
2719
  }
1331
2720
  }
1332
- export interface SessionCreateParams {
2721
+ export interface SessionConfigHistoryParams {
1333
2722
  /**
1334
- * The identifier of the user who is initiating the session, ideally a unique
1335
- * identifier from your database like a user ID or email address
2723
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
2724
+ * limit. The page is the page number and the limit is the number of items per
2725
+ * page. The cursor is used to paginate through the items. The cursor is not
2726
+ * required for the first page.
1336
2727
  */
1337
- user_id: string;
2728
+ cursor?: string;
1338
2729
  /**
1339
- * The auth configs to use for the session. This will override the default behavior
1340
- * and use the given auth config when specific toolkits are being executed
2730
+ * Number of items per page, max allowed is 100
1341
2731
  */
1342
- auth_configs?: {
1343
- [key: string]: string;
1344
- };
2732
+ limit?: number;
2733
+ }
2734
+ export interface SessionExecuteParams {
1345
2735
  /**
1346
- * The connected accounts to use for the session. This will override the default
1347
- * behaviour and use the given connected account when specific toolkits are being
1348
- * executed. Each connected account must exist (not deleted or disabled) and belong
1349
- * to the same `user_id` as the session — otherwise session creation fails with a
1350
- * clear error explaining which account didn't match.
2736
+ * The unique slug identifier of the tool to execute. Supports both meta tools and
2737
+ * app tools exposed by the session.
1351
2738
  */
1352
- connected_accounts?: {
1353
- [key: string]: string;
1354
- };
2739
+ tool_slug: string;
1355
2740
  /**
1356
- * Experimental features - not stable, may be modified or removed in future
1357
- * versions.
2741
+ * Account identifier to specify which connected account to use for direct tool
2742
+ * execution. Use the account ID (e.g. "coup_hurricane_dal_analytical") or an
2743
+ * alias. When omitted with a single account, the default is used. When omitted
2744
+ * with multiple accounts, an error lists available accounts. Meta/helper tools
2745
+ * either ignore this top-level field or define their own account-selection fields,
2746
+ * for example COMPOSIO_MULTI_EXECUTE_TOOL.tools[].account.
1358
2747
  */
1359
- experimental?: SessionCreateParams.Experimental;
2748
+ account?: string;
1360
2749
  /**
1361
- * Configuration for connection management settings
2750
+ * The arguments required by the tool
1362
2751
  */
1363
- manage_connections?: SessionCreateParams.ManageConnections;
2752
+ arguments?: {
2753
+ [key: string]: unknown;
2754
+ };
1364
2755
  /**
1365
- * Configure multi-account behavior. When enabled, users can connect multiple
1366
- * accounts per toolkit.
2756
+ * When true, direct non-meta tool execution may return a workbench offload preview
2757
+ * if the response exceeds the configured threshold and the session workbench is
2758
+ * enabled. When omitted or false, direct tool execution returns the normal inline
2759
+ * response. Meta/helper tools are unaffected, and COMPOSIO_MULTI_EXECUTE_TOOL uses
2760
+ * session.workbench configuration for its own batch-level offload behavior.
1367
2761
  */
1368
- multi_account?: SessionCreateParams.MultiAccount;
2762
+ enable_auto_workbench_offload?: boolean;
1369
2763
  /**
1370
- * Preload configuration. Controls which tools appear in `session.tools` and the
1371
- * MCP server tool list so the agent can call them directly without going through
1372
- * search first — useful for frequently used tools. Each slug must be allowed by
1373
- * the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
1374
- * fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
1375
- * can also be preloaded. Not supported when multi-account is enabled. Each
1376
- * preloaded tool adds to the agent context window, so keep the list at or under
1377
- * ~20 tools.
2764
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2765
+ * customs pass them on every request that needs them.
1378
2766
  */
1379
- preload?: SessionCreateParams.Preload;
2767
+ experimental?: SessionExecuteParams.Experimental;
2768
+ }
2769
+ export declare namespace SessionExecuteParams {
1380
2770
  /**
1381
- * Global MCP tool annotation hints for filtering. Array format is treated as
1382
- * enabled list. Object format supports both enabled (tool must have at least one)
1383
- * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
1384
- * Toolkit enabled/disabled lists take precedence over tag filtering.
2771
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2772
+ * customs pass them on every request that needs them.
1385
2773
  */
1386
- tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | SessionCreateParams.UnionMember1;
2774
+ interface Experimental {
2775
+ /**
2776
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
2777
+ * existing Composio toolkits. All tools are no-auth.
2778
+ */
2779
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
2780
+ /**
2781
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
2782
+ * extends_toolkit inherit the Composio toolkit's connection.
2783
+ */
2784
+ custom_tools?: Array<Experimental.CustomTool>;
2785
+ }
2786
+ namespace Experimental {
2787
+ interface CustomToolkit {
2788
+ /**
2789
+ * Used for BM25 search matching and shown in toolkit connection statuses.
2790
+ */
2791
+ description: string;
2792
+ /**
2793
+ * Display name shown to the LLM and in search results.
2794
+ */
2795
+ name: string;
2796
+ /**
2797
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
2798
+ * slugs. Alphanumeric, underscores, and hyphens only.
2799
+ */
2800
+ slug: string;
2801
+ /**
2802
+ * Tools in this custom toolkit
2803
+ */
2804
+ tools: Array<CustomToolkit.Tool>;
2805
+ }
2806
+ namespace CustomToolkit {
2807
+ interface Tool {
2808
+ /**
2809
+ * Used for BM25 search matching and shown to the LLM.
2810
+ */
2811
+ description: string;
2812
+ /**
2813
+ * Must have type: "object" and a properties field.
2814
+ */
2815
+ input_schema: {
2816
+ [key: string]: unknown;
2817
+ };
2818
+ /**
2819
+ * Human-readable display name
2820
+ */
2821
+ name: string;
2822
+ /**
2823
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
2824
+ * chars total).
2825
+ */
2826
+ slug: string;
2827
+ /**
2828
+ * Optional output schema for the tool response.
2829
+ */
2830
+ output_schema?: {
2831
+ [key: string]: unknown;
2832
+ };
2833
+ }
2834
+ }
2835
+ interface CustomTool {
2836
+ /**
2837
+ * Used for BM25 search matching and shown to the LLM.
2838
+ */
2839
+ description: string;
2840
+ /**
2841
+ * Must have type: "object" and a properties field.
2842
+ */
2843
+ input_schema: {
2844
+ [key: string]: unknown;
2845
+ };
2846
+ /**
2847
+ * Human-readable display name
2848
+ */
2849
+ name: string;
2850
+ /**
2851
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
2852
+ * (extending). Max 60 chars total.
2853
+ */
2854
+ slug: string;
2855
+ /**
2856
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
2857
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
2858
+ */
2859
+ extends_toolkit?: string;
2860
+ /**
2861
+ * JSON Schema describing tool output (optional)
2862
+ */
2863
+ output_schema?: {
2864
+ [key: string]: unknown;
2865
+ };
2866
+ }
2867
+ }
2868
+ }
2869
+ export interface SessionExecuteMetaParams {
1387
2870
  /**
1388
- * Toolkit configuration - specify either enable toolkits (allowlist) or disable
1389
- * toolkits (denylist). Mutually exclusive.
2871
+ * The unique slug identifier of the meta tool to execute
1390
2872
  */
1391
- toolkits?: SessionCreateParams.Enable | SessionCreateParams.Disable;
1392
- /**
1393
- * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
1394
- * by tags for specific tools within each toolkit. Every slug passed in `enable` /
1395
- * `disable` must be a valid Composio tool slug for that toolkit — invalid or
1396
- * typo'd slugs fail session creation with a clear error listing which ones didn't
1397
- * match.
2873
+ slug: 'COMPOSIO_SEARCH_TOOLS' | 'COMPOSIO_MULTI_EXECUTE_TOOL' | 'COMPOSIO_MANAGE_CONNECTIONS' | 'COMPOSIO_WAIT_FOR_CONNECTIONS' | 'COMPOSIO_REMOTE_WORKBENCH' | 'COMPOSIO_REMOTE_BASH_TOOL' | 'COMPOSIO_GET_TOOL_SCHEMAS' | 'COMPOSIO_UPSERT_RECIPE' | 'COMPOSIO_GET_RECIPE';
2874
+ /**
2875
+ * The arguments required by the meta tool
1398
2876
  */
1399
- tools?: {
1400
- [key: string]: SessionCreateParams.Enable | SessionCreateParams.Disable | SessionCreateParams.Tags;
2877
+ arguments?: {
2878
+ [key: string]: unknown;
1401
2879
  };
1402
2880
  /**
1403
- * Configuration for workbench behavior
2881
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2882
+ * customs — pass them on every request that needs them.
1404
2883
  */
1405
- workbench?: SessionCreateParams.Workbench;
2884
+ experimental?: SessionExecuteMetaParams.Experimental;
1406
2885
  }
1407
- export declare namespace SessionCreateParams {
2886
+ export declare namespace SessionExecuteMetaParams {
1408
2887
  /**
1409
- * Experimental features - not stable, may be modified or removed in future
1410
- * versions.
2888
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
2889
+ * customs — pass them on every request that needs them.
1411
2890
  */
1412
2891
  interface Experimental {
1413
- /**
1414
- * Customize assistive prompt generation (e.g., timezone).
1415
- */
1416
- assistive_prompt_config?: Experimental.AssistivePromptConfig;
1417
2892
  /**
1418
2893
  * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
1419
2894
  * existing Composio toolkits. All tools are no-auth.
@@ -1426,16 +2901,6 @@ export declare namespace SessionCreateParams {
1426
2901
  custom_tools?: Array<Experimental.CustomTool>;
1427
2902
  }
1428
2903
  namespace Experimental {
1429
- /**
1430
- * Customize assistive prompt generation (e.g., timezone).
1431
- */
1432
- interface AssistivePromptConfig {
1433
- /**
1434
- * IANA timezone identifier (e.g., 'America/New_York', 'Europe/London'). Used to
1435
- * customize the system prompt with timezone-aware instructions.
1436
- */
1437
- user_timezone?: string;
1438
- }
1439
2904
  interface CustomToolkit {
1440
2905
  /**
1441
2906
  * Used for BM25 search matching and shown in toolkit connection statuses.
@@ -1517,9 +2982,111 @@ export declare namespace SessionCreateParams {
1517
2982
  };
1518
2983
  }
1519
2984
  }
2985
+ }
2986
+ export interface SessionLinkParams {
1520
2987
  /**
1521
- * Configuration for connection management settings
2988
+ * The unique slug identifier of the toolkit to connect
2989
+ */
2990
+ toolkit: string;
2991
+ /**
2992
+ * A human-readable alias for this connected account. Must be unique per entity and
2993
+ * toolkit within the project.
2994
+ */
2995
+ alias?: string;
2996
+ /**
2997
+ * URL where users will be redirected after completing auth
2998
+ */
2999
+ callback_url?: string;
3000
+ }
3001
+ export interface SessionPatchParams {
3002
+ /**
3003
+ * The auth configs to use for the session. This will override the default behavior
3004
+ * and use the given auth config when specific toolkits are being executed
3005
+ */
3006
+ auth_configs?: {
3007
+ [key: string]: string;
3008
+ };
3009
+ /**
3010
+ * The connected accounts to use for the session. This will override the default
3011
+ * behaviour and use the given connected account when specific toolkits are being
3012
+ * executed. Each connected account must exist (not deleted or disabled) and belong
3013
+ * to the same `user_id` as the session — otherwise session creation fails with a
3014
+ * clear error explaining which account didn't match.
3015
+ */
3016
+ connected_accounts?: {
3017
+ [key: string]: string;
3018
+ };
3019
+ execute?: SessionPatchParams.Execute;
3020
+ experimental?: SessionPatchParams.Experimental | null;
3021
+ manage_connections?: SessionPatchParams.ManageConnections | null;
3022
+ multi_account?: SessionPatchParams.MultiAccount | null;
3023
+ /**
3024
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3025
+ * "all" to dynamically expose every app tool allowed by positive
3026
+ * toolkits/tools/tags filters.
3027
+ */
3028
+ preload?: SessionPatchParams.Preload;
3029
+ search?: SessionPatchParams.Search;
3030
+ /**
3031
+ * Global MCP tool annotation hints for filtering. Array format is treated as
3032
+ * enabled list. Object format supports both enabled (tool must have at least one)
3033
+ * and disabled (tool must NOT have any) lists. Toolkit-level tags override this.
3034
+ * Toolkit enabled/disabled lists take precedence over tag filtering.
3035
+ */
3036
+ tags?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'> | SessionPatchParams.UnionMember1;
3037
+ /**
3038
+ * Toolkit configuration - specify either enable toolkits (allowlist) or disable
3039
+ * toolkits (denylist). Mutually exclusive.
3040
+ */
3041
+ toolkits?: SessionPatchParams.Enable | SessionPatchParams.Disable;
3042
+ /**
3043
+ * Tool-level configuration per toolkit. Allows you to enable, disable, or filter
3044
+ * by tags for specific tools within each toolkit. Every slug passed in `enable` /
3045
+ * `disable` must be a valid Composio tool slug for that toolkit — invalid or
3046
+ * typo'd slugs fail session creation with a clear error listing which ones didn't
3047
+ * match.
1522
3048
  */
3049
+ tools?: {
3050
+ [key: string]: SessionPatchParams.Enable | SessionPatchParams.Disable | SessionPatchParams.Tags;
3051
+ };
3052
+ workbench?: SessionPatchParams.Workbench | null;
3053
+ }
3054
+ export declare namespace SessionPatchParams {
3055
+ interface Execute {
3056
+ enable_multi_execute?: boolean;
3057
+ }
3058
+ interface Experimental {
3059
+ /**
3060
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3061
+ */
3062
+ permissions?: Experimental.Permissions;
3063
+ }
3064
+ namespace Experimental {
3065
+ /**
3066
+ * Per-tool elicitation permission config. Replaces the stored block when provided.
3067
+ */
3068
+ interface Permissions {
3069
+ /**
3070
+ * Default elicitation behavior when no override matches. `allow_all` runs every
3071
+ * tool without prompting; `ask_every_call` prompts on each invocation;
3072
+ * `ask_once_per_session` prompts once and remembers the answer for the rest of the
3073
+ * session.
3074
+ */
3075
+ default: 'allow_all' | 'ask_every_call' | 'ask_once_per_session';
3076
+ /**
3077
+ * Per-tool overrides keyed by `${toolSlug}:${connectedAccountId ?? "__none__"}`,
3078
+ * plus account-wide overrides keyed by `*:${connectedAccountId ?? "__none__"}`.
3079
+ * Exact tool overrides take precedence over account-wide overrides. `always_allow`
3080
+ * skips the prompt and runs the tool; `always_deny` blocks the tool; `ask_once`
3081
+ * prompts once per session (allow/deny) and remembers; `ask_always` prompts on
3082
+ * every call with allow-once/allow-session/deny, ignoring any cached session
3083
+ * allow. Overrides take precedence over `default`.
3084
+ */
3085
+ overrides?: {
3086
+ [key: string]: 'always_allow' | 'always_deny' | 'ask_once' | 'ask_always';
3087
+ };
3088
+ }
3089
+ }
1523
3090
  interface ManageConnections {
1524
3091
  /**
1525
3092
  * The URL to redirect to after a user completes authentication for a connected
@@ -1545,10 +3112,6 @@ export declare namespace SessionCreateParams {
1545
3112
  */
1546
3113
  enable_wait_for_connections?: boolean | null;
1547
3114
  }
1548
- /**
1549
- * Configure multi-account behavior. When enabled, users can connect multiple
1550
- * accounts per toolkit.
1551
- */
1552
3115
  interface MultiAccount {
1553
3116
  /**
1554
3117
  * When true, enables multi-account mode for this session. When not set, falls back
@@ -1567,23 +3130,20 @@ export declare namespace SessionCreateParams {
1567
3130
  require_explicit_selection?: boolean;
1568
3131
  }
1569
3132
  /**
1570
- * Preload configuration. Controls which tools appear in `session.tools` and the
1571
- * MCP server tool list so the agent can call them directly without going through
1572
- * search first — useful for frequently used tools. Each slug must be allowed by
1573
- * the session filters (`toolkits`, `tools`, `tags`), otherwise session creation
1574
- * fails with a 400. Custom tools declared in `custom_tools` / `custom_toolkits`
1575
- * can also be preloaded. Not supported when multi-account is enabled. Each
1576
- * preloaded tool adds to the agent context window, so keep the list at or under
1577
- * ~20 tools.
3133
+ * Preload configuration. Use an explicit list for frequently used tool slugs, or
3134
+ * "all" to dynamically expose every app tool allowed by positive
3135
+ * toolkits/tools/tags filters.
1578
3136
  */
1579
3137
  interface Preload {
1580
3138
  /**
1581
- * Tool slugs to preload. Each slug must be allowed by the session filters
1582
- * (`toolkits`, `tools`, `tags`) and exist either in the Composio tool catalog or
1583
- * in `custom_tools` / `custom_toolkits` unknown or blocked slugs return a 400 at
1584
- * session creation.
3139
+ * Explicit tool slugs to preload, or "all" to dynamically expose all current and
3140
+ * future app tools allowed by the positive session filters. "all" is capped at
3141
+ * 1000 tools and is not supported without a positive allowlist.
1585
3142
  */
1586
- tools?: Array<string>;
3143
+ tools?: Array<string> | string;
3144
+ }
3145
+ interface Search {
3146
+ enable?: boolean;
1587
3147
  }
1588
3148
  interface UnionMember1 {
1589
3149
  disable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
@@ -1632,9 +3192,6 @@ export declare namespace SessionCreateParams {
1632
3192
  enable?: Array<'readOnlyHint' | 'destructiveHint' | 'idempotentHint' | 'openWorldHint'>;
1633
3193
  }
1634
3194
  }
1635
- /**
1636
- * Configuration for workbench behavior
1637
- */
1638
3195
  interface Workbench {
1639
3196
  /**
1640
3197
  * Character threshold for automatic offloading. When workbench response exceeds
@@ -1654,58 +3211,12 @@ export declare namespace SessionCreateParams {
1654
3211
  enable_proxy_execution?: boolean;
1655
3212
  /**
1656
3213
  * Sandbox compute tier: standard (1 vCPU / 1 GB), medium (2 vCPU / 2 GB), large (4
1657
- * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Defaults to standard.
3214
+ * vCPU / 4 GB), xlarge (8 vCPU / 8 GB). Patching this value recreates the sandbox
3215
+ * on next access — sandbox FS state is lost, but /mnt/files/ R2 mount persists.
1658
3216
  */
1659
3217
  sandbox_size?: 'standard' | 'medium' | 'large' | 'xlarge';
1660
3218
  }
1661
3219
  }
1662
- export interface SessionExecuteParams {
1663
- /**
1664
- * The unique slug identifier of the tool to execute. Supports both meta tools and
1665
- * app tools exposed by the session.
1666
- */
1667
- tool_slug: string;
1668
- /**
1669
- * Account identifier to specify which connected account to use. Use the account ID
1670
- * (e.g. "coup_hurricane_dal_analytical") or an alias. When omitted with a single
1671
- * account, the default is used. When omitted with multiple accounts, an error
1672
- * lists available accounts.
1673
- */
1674
- account?: string;
1675
- /**
1676
- * The arguments required by the tool
1677
- */
1678
- arguments?: {
1679
- [key: string]: unknown;
1680
- };
1681
- }
1682
- export interface SessionExecuteMetaParams {
1683
- /**
1684
- * The unique slug identifier of the meta tool to execute
1685
- */
1686
- slug: 'COMPOSIO_SEARCH_TOOLS' | 'COMPOSIO_MULTI_EXECUTE_TOOL' | 'COMPOSIO_MANAGE_CONNECTIONS' | 'COMPOSIO_WAIT_FOR_CONNECTIONS' | 'COMPOSIO_REMOTE_WORKBENCH' | 'COMPOSIO_REMOTE_BASH_TOOL' | 'COMPOSIO_GET_TOOL_SCHEMAS' | 'COMPOSIO_UPSERT_RECIPE' | 'COMPOSIO_GET_RECIPE';
1687
- /**
1688
- * The arguments required by the meta tool
1689
- */
1690
- arguments?: {
1691
- [key: string]: unknown;
1692
- };
1693
- }
1694
- export interface SessionLinkParams {
1695
- /**
1696
- * The unique slug identifier of the toolkit to connect
1697
- */
1698
- toolkit: string;
1699
- /**
1700
- * A human-readable alias for this connected account. Must be unique per entity and
1701
- * toolkit within the project.
1702
- */
1703
- alias?: string;
1704
- /**
1705
- * URL where users will be redirected after completing auth
1706
- */
1707
- callback_url?: string;
1708
- }
1709
3220
  export interface SessionProxyExecuteParams {
1710
3221
  /**
1711
3222
  * The API endpoint to call (absolute URL or path relative to base URL of the
@@ -2204,12 +3715,16 @@ export declare namespace SessionProxyExecuteParams {
2204
3715
  }
2205
3716
  export interface SessionSearchParams {
2206
3717
  /**
2207
- * List of search queries to execute in parallel. Up to 7 queries supported.
3718
+ * List of search queries to execute in parallel.
2208
3719
  */
2209
3720
  queries: Array<SessionSearchParams.Query>;
2210
3721
  /**
2211
- * Optional model hint for search/planning behavior (e.g., "gpt-4o"). Ignored if
2212
- * invalid.
3722
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3723
+ * customs — pass them on every request that needs them.
3724
+ */
3725
+ experimental?: SessionSearchParams.Experimental;
3726
+ /**
3727
+ * Optional model hint for search/planning behavior (e.g., "gpt-4o").
2213
3728
  */
2214
3729
  model?: string;
2215
3730
  }
@@ -2226,6 +3741,104 @@ export declare namespace SessionSearchParams {
2226
3741
  */
2227
3742
  known_fields?: string;
2228
3743
  }
3744
+ /**
3745
+ * Inline custom tools and toolkits for this request. v3.1 sessions do not persist
3746
+ * customs — pass them on every request that needs them.
3747
+ */
3748
+ interface Experimental {
3749
+ /**
3750
+ * Custom toolkits with grouped tools. Toolkit slugs must not conflict with
3751
+ * existing Composio toolkits. All tools are no-auth.
3752
+ */
3753
+ custom_toolkits?: Array<Experimental.CustomToolkit>;
3754
+ /**
3755
+ * Custom tools to include in search. Standalone tools need no auth. Tools with
3756
+ * extends_toolkit inherit the Composio toolkit's connection.
3757
+ */
3758
+ custom_tools?: Array<Experimental.CustomTool>;
3759
+ }
3760
+ namespace Experimental {
3761
+ interface CustomToolkit {
3762
+ /**
3763
+ * Used for BM25 search matching and shown in toolkit connection statuses.
3764
+ */
3765
+ description: string;
3766
+ /**
3767
+ * Display name shown to the LLM and in search results.
3768
+ */
3769
+ name: string;
3770
+ /**
3771
+ * Unique slug for the toolkit. Must not conflict with existing Composio toolkit
3772
+ * slugs. Alphanumeric, underscores, and hyphens only.
3773
+ */
3774
+ slug: string;
3775
+ /**
3776
+ * Tools in this custom toolkit
3777
+ */
3778
+ tools: Array<CustomToolkit.Tool>;
3779
+ }
3780
+ namespace CustomToolkit {
3781
+ interface Tool {
3782
+ /**
3783
+ * Used for BM25 search matching and shown to the LLM.
3784
+ */
3785
+ description: string;
3786
+ /**
3787
+ * Must have type: "object" and a properties field.
3788
+ */
3789
+ input_schema: {
3790
+ [key: string]: unknown;
3791
+ };
3792
+ /**
3793
+ * Human-readable display name
3794
+ */
3795
+ name: string;
3796
+ /**
3797
+ * Tool slug. Combined with toolkit slug to form LOCAL*<TOOLKIT>*<TOOL> (max 60
3798
+ * chars total).
3799
+ */
3800
+ slug: string;
3801
+ /**
3802
+ * Optional output schema for the tool response.
3803
+ */
3804
+ output_schema?: {
3805
+ [key: string]: unknown;
3806
+ };
3807
+ }
3808
+ }
3809
+ interface CustomTool {
3810
+ /**
3811
+ * Used for BM25 search matching and shown to the LLM.
3812
+ */
3813
+ description: string;
3814
+ /**
3815
+ * Must have type: "object" and a properties field.
3816
+ */
3817
+ input_schema: {
3818
+ [key: string]: unknown;
3819
+ };
3820
+ /**
3821
+ * Human-readable display name
3822
+ */
3823
+ name: string;
3824
+ /**
3825
+ * Tool slug. Forms LOCAL*<TOOL> (standalone) or LOCAL*<TOOLKIT>\_<TOOL>
3826
+ * (extending). Max 60 chars total.
3827
+ */
3828
+ slug: string;
3829
+ /**
3830
+ * If set, must be a valid Composio toolkit slug. The tool inherits that toolkit's
3831
+ * auth/connection status. If omitted, the tool is standalone (no-auth).
3832
+ */
3833
+ extends_toolkit?: string;
3834
+ /**
3835
+ * JSON Schema describing tool output (optional)
3836
+ */
3837
+ output_schema?: {
3838
+ [key: string]: unknown;
3839
+ };
3840
+ }
3841
+ }
2229
3842
  }
2230
3843
  export interface SessionToolkitsParams {
2231
3844
  /**
@@ -2255,9 +3868,20 @@ export interface SessionToolkitsParams {
2255
3868
  toolkits?: Array<string> | null;
2256
3869
  }
2257
3870
  export interface SessionToolsParams {
3871
+ /**
3872
+ * Cursor for pagination. The cursor is a base64 encoded string of the page and
3873
+ * limit. The page is the page number and the limit is the number of items per
3874
+ * page. The cursor is used to paginate through the items. The cursor is not
3875
+ * required for the first page.
3876
+ */
3877
+ cursor?: string;
3878
+ /**
3879
+ * Number of items per page, max allowed is 500
3880
+ */
3881
+ limit?: number;
2258
3882
  }
2259
3883
  export declare namespace Session {
2260
- export { type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionExecuteMetaResponse as SessionExecuteMetaResponse, type SessionLinkResponse as SessionLinkResponse, type SessionProxyExecuteResponse as SessionProxyExecuteResponse, type SessionSearchResponse as SessionSearchResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionToolsResponse as SessionToolsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionExecuteMetaParams as SessionExecuteMetaParams, type SessionLinkParams as SessionLinkParams, type SessionProxyExecuteParams as SessionProxyExecuteParams, type SessionSearchParams as SessionSearchParams, type SessionToolkitsParams as SessionToolkitsParams, type SessionToolsParams as SessionToolsParams, };
3884
+ export { type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionAttachResponse as SessionAttachResponse, type SessionConfigHistoryResponse as SessionConfigHistoryResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionExecuteMetaResponse as SessionExecuteMetaResponse, type SessionLinkResponse as SessionLinkResponse, type SessionPatchResponse as SessionPatchResponse, type SessionProxyExecuteResponse as SessionProxyExecuteResponse, type SessionSearchResponse as SessionSearchResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionToolsResponse as SessionToolsResponse, type SessionCreateParams as SessionCreateParams, type SessionAttachParams as SessionAttachParams, type SessionConfigHistoryParams as SessionConfigHistoryParams, type SessionExecuteParams as SessionExecuteParams, type SessionExecuteMetaParams as SessionExecuteMetaParams, type SessionLinkParams as SessionLinkParams, type SessionPatchParams as SessionPatchParams, type SessionProxyExecuteParams as SessionProxyExecuteParams, type SessionSearchParams as SessionSearchParams, type SessionToolkitsParams as SessionToolkitsParams, type SessionToolsParams as SessionToolsParams, };
2261
3885
  export { Files as Files, type FileListResponse as FileListResponse, type FileDeleteResponse as FileDeleteResponse, type FileCreateDownloadURLResponse as FileCreateDownloadURLResponse, type FileCreateUploadURLResponse as FileCreateUploadURLResponse, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileCreateDownloadURLParams as FileCreateDownloadURLParams, type FileCreateUploadURLParams as FileCreateUploadURLParams, };
2262
3886
  }
2263
3887
  //# sourceMappingURL=session.d.ts.map