Skip to content

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

Remove picking from schema modifiers

haxzie604299420f1c
diff --git a/packages/core/src/toolset/BaseToolset.ts b/packages/core/src/toolset/BaseToolset.ts
index d696a018f..7f1093caa 100644
--- a/packages/core/src/toolset/BaseToolset.ts
+++ b/packages/core/src/toolset/BaseToolset.ts
@@ -1,12 +1,12 @@
import type { Toolset } from '../types/toolset.types';
import type { Tool, ToolListParams } from '../types/tool.types';
import type { Composio } from '../composio';
-import { ModifiersParams } from '../types/modifiers.types';
+import { ModifiersParams, SchemaModifiersParams } from '../types/modifiers.types';
/**
* Base class for non-agentic toolsets that only support schema modifiers
* This is used for toolsets that don't need to handle tool execution modifiers
- * eg: OpenAI, Langchain, etc.
+ * eg: OpenAI, Anthropic, etc.
*/
export abstract class BaseNonAgenticToolset<TToolCollection, TTool>
implements Toolset<TTool, TToolCollection>
@@ -20,10 +20,10 @@ export abstract class BaseNonAgenticToolset<TToolCollection, TTool>
abstract getTools(
params?: ToolListParams,
- modifiers?: Pick<ModifiersParams, 'schema'>
+ modifiers?: SchemaModifiersParams
): Promise<TToolCollection>;
- abstract getToolBySlug(slug: string, modifiers?: Pick<ModifiersParams, 'schema'>): Promise<TTool>;
+ abstract getToolBySlug(slug: string, modifiers?: SchemaModifiersParams): Promise<TTool>;
abstract wrapTool(tool: Tool): TTool;
diff --git a/packages/core/src/toolset/ComposioToolset.ts b/packages/core/src/toolset/ComposioToolset.ts
index 0d83436c7..6c6c4ccf4 100644
--- a/packages/core/src/toolset/ComposioToolset.ts
+++ b/packages/core/src/toolset/ComposioToolset.ts
@@ -1,4 +1,4 @@
-import { ModifiersParams } from '../types/modifiers.types';
+import { ModifiersParams, SchemaModifiersParams } from '../types/modifiers.types';
import { Tool, ToolListParams } from '../types/tool.types';
import { BaseNonAgenticToolset } from './BaseToolset';
@@ -28,10 +28,7 @@ export class ComposioToolset extends BaseNonAgenticToolset<Array<CustomTool>, Cu
return tools?.map(tool => this.wrapTool(tool as Tool)) ?? [];
}
- async getToolBySlug(
- slug: string,
- modifiers?: Pick<ModifiersParams, 'schema'>
- ): Promise<CustomTool> {
+ async getToolBySlug(slug: string, modifiers?: SchemaModifiersParams): Promise<CustomTool> {
const tool = await this.getComposio().tools.getToolBySlug(slug, modifiers?.schema);
return this.wrapTool(tool as Tool);
}