CustomTools
@composio/core / CustomTools / CustomTools
Class: CustomTools
Defined in: ts/packages/core/src/models/CustomTools.ts:37
Constructors
Constructor
new CustomTools(
client):CustomTools
Defined in: ts/packages/core/src/models/CustomTools.ts:41
Parameters
client
Composio
Returns
CustomTools
Methods
createTool()
createTool<
T>(toolOptions):Promise<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:76
Create a custom tool and registers it in the registry. This is just an in memory registry and is not persisted.
Type Parameters
T
T extends CustomToolInputParameter
Parameters
toolOptions
CustomToolOptions<T>
CustomToolOptions
Returns
Promise<{ }>
The tool created
Example
executeCustomTool()
executeCustomTool(
slug,body):Promise<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:241
Execute a custom tool
Parameters
slug
string
The slug of the tool to execute
body
Returns
Promise<{ }>
The response from the tool
Description
If a toolkit is used, the connected account id is used to execute the tool. If a connected account id is provided, it is used to execute the tool. If a connected account id is not provided, the first connected account for the toolkit is used.
getCustomToolBySlug()
getCustomToolBySlug(
slug):Promise<{ }>
Defined in: ts/packages/core/src/models/CustomTools.ts:169
Get a custom tool by slug from the registry.
Parameters
slug
string
The slug of the tool to get
Returns
Promise<{ }>
The tool
Example
getCustomTools()
getCustomTools(
__namedParameters):Promise<ToolList>
Defined in: ts/packages/core/src/models/CustomTools.ts:134
Get all the custom tools from the registry.
Parameters
__namedParameters
toolSlugs?
string[]
Returns
Promise<ToolList>
The list of tools