Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
Retrieves a specific tool by its slug from the Composio API.
This method fetches a single tool in raw format without provider-specific wrapping,
providing direct access to the tool's schema and metadata. Tool versions are controlled
at the Composio SDK initialization level through the `toolkitVersions` configuration.
@paramslug - The unique identifier of the tool (e.g., 'GITHUB_GET_REPOS')@paramoptions - Optional configuration for tool retrieval@paramoptions.modifySchema - Function to transform the tool schema@returnsThe requested tool with its complete schema and metadata@example```typescript
// Get a tool by slug
const tool = await composio.tools.getRawComposioToolBySlug('GITHUB_GET_REPOS');
console.log(tool.name, tool.description);
// Get a tool with schema transformation
const customizedTool = await composio.tools.getRawComposioToolBySlug(
'SLACK_SEND_MESSAGE',
{
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
return {
...schema,
description: `Enhanced ${schema.description} with custom modifications`,
customMetadata: {
lastModified: new Date().toISOString(),
toolkit: toolkitSlug
}
};
}
}
);
// Get a custom tool (will check custom tools first)
const customTool = await composio.tools.getRawComposioToolBySlug('MY_CUSTOM_TOOL');
// Access tool properties
const githubTool = await composio.tools.getRawComposioToolBySlug('GITHUB_CREATE_ISSUE');
console.log({
slug: githubTool.slug,
name: githubTool.name,
toolkit: githubTool.toolkit?.name,
version: githubTool.version,
availableVersions: githubTool.availableVersions,
inputParameters: githubTool.inputParameters
});
```
getRawComposioToolBySlug("GMAIL_SEND_EMAIL");
Generate type-safe code for direct SDK execution with composio generate. This creates TypeScript or Python types from tool schemas.
View tool parameters and schemas visually in the Composio platform. Navigate to any toolkit and select a tool to see its input/output parameters.
Get tools from specific apps. Returns top 20 tools by default.
# Fetch with limit for a specific usertools = composio.tools.get( user_id, toolkits=["GITHUB"], limit=5 # Get top 5 tools)# Same filter but without user_id (for schemas)raw_tools = composio.tools.get_raw_composio_tools( toolkits=["GITHUB"], limit=5)
// Fetch with limit for a specific userconstconst limitedTools: OpenAiToolCollectionlimitedTools = awaitconst composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.tools: Tools<unknown, unknown, OpenAIProvider>
Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
get(const userId: "user-123"userId, {toolkits: [string]toolkits: ["GITHUB"],limit: numberlimit: 5 // Get top 5 tools});// Same filter but without userId (for schemas)constconst rawTools: ToolListrawTools = awaitconst composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.tools: Tools<unknown, unknown, OpenAIProvider>
Lists all tools available in the Composio SDK including custom tools.
This method fetches tools from the Composio API in raw format and combines them with
any registered custom tools. The response can be filtered and modified as needed.
It provides access to the underlying tool data without provider-specific wrapping.
@paramquery - Query parameters to filter the tools (required)@paramoptions - Optional configuration for tool retrieval@paramoptions.modifySchema - Function to transform tool schemas@returnsList of tools matching the query criteria@example```typescript
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get specific tools by slug
const specificTools = await composio.tools.getRawComposioTools({
tools: ['GITHUB_GET_REPOS', 'HACKERNEWS_GET_USER']
});
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get tools with schema transformation
const customizedTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 5
}, {
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
// Add custom properties to tool schema
return {
...schema,
customProperty: `Modified ${toolSlug} from ${toolkitSlug}`,
tags: [...(schema.tags || []), 'customized']
};
}
});
// Search for tools
const searchResults = await composio.tools.getRawComposioTools({
search: 'user management'
});
// Get tools by authentication config
const authSpecificTools = await composio.tools.getRawComposioTools({
authConfigIds: ['auth_config_123']
});
```
# Fetch specific tools by nametools = composio.tools.get( user_id, tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"])# Get schemas without user_idraw_tools = composio.tools.get_raw_composio_tools( tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"])
// Fetch specific tools by nameconstconst specificTools: OpenAiToolCollectionspecificTools = awaitconst composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.tools: Tools<unknown, unknown, OpenAIProvider>
Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
get(const userId: "user-123"userId, {tools: string[]tools: ["GITHUB_LIST_STARGAZERS", "GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"]});// Get schemas without userIdconstconst specificRawTools: ToolListspecificRawTools = awaitconst composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.tools: Tools<unknown, unknown, OpenAIProvider>
Lists all tools available in the Composio SDK including custom tools.
This method fetches tools from the Composio API in raw format and combines them with
any registered custom tools. The response can be filtered and modified as needed.
It provides access to the underlying tool data without provider-specific wrapping.
@paramquery - Query parameters to filter the tools (required)@paramoptions - Optional configuration for tool retrieval@paramoptions.modifySchema - Function to transform tool schemas@returnsList of tools matching the query criteria@example```typescript
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get specific tools by slug
const specificTools = await composio.tools.getRawComposioTools({
tools: ['GITHUB_GET_REPOS', 'HACKERNEWS_GET_USER']
});
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get tools with schema transformation
const customizedTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 5
}, {
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
// Add custom properties to tool schema
return {
...schema,
customProperty: `Modified ${toolSlug} from ${toolkitSlug}`,
tags: [...(schema.tags || []), 'customized']
};
}
});
// Search for tools
const searchResults = await composio.tools.getRawComposioTools({
search: 'user management'
});
// Get tools by authentication config
const authSpecificTools = await composio.tools.getRawComposioTools({
authConfigIds: ['auth_config_123']
});
```
Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
Lists all tools available in the Composio SDK including custom tools.
This method fetches tools from the Composio API in raw format and combines them with
any registered custom tools. The response can be filtered and modified as needed.
It provides access to the underlying tool data without provider-specific wrapping.
@paramquery - Query parameters to filter the tools (required)@paramoptions - Optional configuration for tool retrieval@paramoptions.modifySchema - Function to transform tool schemas@returnsList of tools matching the query criteria@example```typescript
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get specific tools by slug
const specificTools = await composio.tools.getRawComposioTools({
tools: ['GITHUB_GET_REPOS', 'HACKERNEWS_GET_USER']
});
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get tools with schema transformation
const customizedTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 5
}, {
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
// Add custom properties to tool schema
return {
...schema,
customProperty: `Modified ${toolSlug} from ${toolkitSlug}`,
tags: [...(schema.tags || []), 'customized']
};
}
});
// Search for tools
const searchResults = await composio.tools.getRawComposioTools({
search: 'user management'
});
// Get tools by authentication config
const authSpecificTools = await composio.tools.getRawComposioTools({
authConfigIds: ['auth_config_123']
});
```
getRawComposioTools({search: stringsearch: "create google calendar event"});// Search within a specific toolkitconstconst toolkitSearch: OpenAiToolCollectiontoolkitSearch = awaitconst composio: Composio<OpenAIProvider>composio.Composio<OpenAIProvider>.tools: Tools<unknown, unknown, OpenAIProvider>
Get a list of tools from Composio based on filters.
This method fetches the tools from the Composio API and wraps them using the provider.
@paramuserId - The user id to get the tools for@paramfilters - The filters to apply when fetching tools@paramoptions - Optional provider options including modifiers@returnsThe wrapped tools collection@example```typescript
// Get tools from the GitHub toolkit
const tools = await composio.tools.get('default', {
toolkits: ['github'],
limit: 10
});
// Get tools with search
const searchTools = await composio.tools.get('default', {
search: 'user',
limit: 10
});
// Get a specific tool by slug
const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER');
// Get a tool with schema modifications
const tool = await composio.tools.get('default', 'GITHUB_GET_REPOS', {
modifySchema: (toolSlug, toolkitSlug, schema) => {
// Customize the tool schema
return {...schema, description: 'Custom description'};
}
});
```
Lists all tools available in the Composio SDK including custom tools.
This method fetches tools from the Composio API in raw format and combines them with
any registered custom tools. The response can be filtered and modified as needed.
It provides access to the underlying tool data without provider-specific wrapping.
@paramquery - Query parameters to filter the tools (required)@paramoptions - Optional configuration for tool retrieval@paramoptions.modifySchema - Function to transform tool schemas@returnsList of tools matching the query criteria@example```typescript
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get specific tools by slug
const specificTools = await composio.tools.getRawComposioTools({
tools: ['GITHUB_GET_REPOS', 'HACKERNEWS_GET_USER']
});
// Get tools from specific toolkits
const githubTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 10
});
// Get tools with schema transformation
const customizedTools = await composio.tools.getRawComposioTools({
toolkits: ['github'],
limit: 5
}, {
modifySchema: ({ toolSlug, toolkitSlug, schema }) => {
// Add custom properties to tool schema
return {
...schema,
customProperty: `Modified ${toolSlug} from ${toolkitSlug}`,
tags: [...(schema.tags || []), 'customized']
};
}
});
// Search for tools
const searchResults = await composio.tools.getRawComposioTools({
search: 'user management'
});
// Get tools by authentication config
const authSpecificTools = await composio.tools.getRawComposioTools({
authConfigIds: ['auth_config_123']
});
```
getRawComposioTools({search?: string | undefinedsearch: "star a repository",toolkits: [string]toolkits: ["GITHUB"]});
Use specific toolkit versions in production to prevent breaking changes. See toolkit versioning.