@devries-cameron20 / composio-1 / commits / de6db6b74
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(cli): decode tools_count/triggers_count from API instead of hardcoding zeros

ToolkitRetrieveResponse.meta was missing these fields, so the retrieve method overwrote real API counts with 0. Add the fields to the schema (with optionalWith defaults matching ToolkitDetailed) and remove the hardcoded overrides.

jkomyno committed Feb 19, 2026 at 02:50 UTC de6db6b74bbd28c258467468bbed19089da1b50e
1 file changed +3 -5
ts/packages/cli/src/services/composio-clients.ts
+3 -5
@@ -246,6 +246,8 @@ export const ToolkitRetrieveResponse = Schema.Struct({
246 created_at: Schema.DateTimeUtc,
247 updated_at: Schema.DateTimeUtc,
248 available_versions: Schema.optionalWith(Schema.Array(Schema.String), { default: () => [] }),
249 + tools_count: Schema.optionalWith(Schema.Int, { default: () => 0 }),
250 + triggers_count: Schema.optionalWith(Schema.Int, { default: () => 0 }),
251 }),
252 }).annotations({ identifier: 'ToolkitRetrieveResponse' });
253 export type ToolkitRetrieveResponse = Schema.Schema.Type<typeof ToolkitRetrieveResponse>;
@@ -682,11 +684,7 @@ export class ComposioClientLive extends Effect.Service<ComposioClientLive>()(
684 composio_managed_auth_schemes: retrieved.composio_managed_auth_schemes,
685 is_local_toolkit: retrieved.is_local_toolkit,
686 no_auth: retrieved.no_auth,
685 - meta: {
686 - ...retrieved.meta,
687 - tools_count: 0,
688 - triggers_count: 0,
689 - },
687 + meta: retrieved.meta,
688 }) satisfies Toolkit
689 )
690 ),