The tools API provides methods to discover and execute tools across 250+ integrations. Tools are individual actions like GITHUB_CREATE_ISSUE or GMAIL_SEND_EMAIL.
Methods
get()
Fetch tools wrapped in your provider’s format.
// Get tools by filters
async get < T extends TProvider > (
userId : string ,
filters : ToolListParams ,
options ?: ProviderOptions < TProvider >
): Promise < ReturnType < T [ 'wrapTools' ] >>
// Get a single tool by slug
async get < T extends TProvider > (
userId : string ,
slug : string ,
options ?: ProviderOptions < TProvider >
): Promise < ReturnType < T [ 'wrapTools' ] >>
User ID for authentication and tracking
Filter by toolkit slugs (e.g., ['github', 'slack'])
Specific tool slugs to fetch
Filter by tags (e.g., ['important'])
Search tools by name or description
Filter by auth config IDs
Maximum number of tools to return
Auto-set to true when fetching by toolkit. Set to false to get all tools.
modifySchema
TransformToolSchemaModifier
Transform tool schemas before wrapping
execute()
Execute a tool directly.
async execute (
slug : string ,
body : ToolExecuteParams ,
modifiers ?: ExecuteToolModifiers
): Promise < ToolExecuteResponse >
Tool slug to execute (e.g., GITHUB_CREATE_ISSUE)
body
ToolExecuteParams
required
User ID for authentication
Specific connected account to use
arguments
Record<string, unknown>
required
Tool input parameters
Specific toolkit version (e.g., 20250909_00)
dangerouslySkipVersionCheck
Skip version validation for “latest”. Not recommended for production.
Transform parameters before execution
Transform results after execution
Basic execution
With version
With modifiers
const result = await composio . tools . execute ( 'GITHUB_CREATE_ISSUE' , {
userId: 'default' ,
arguments: {
owner: 'composio' ,
repo: 'sdk' ,
title: 'Bug report' ,
body: 'Description of the bug'
}
});
console . log ( result . data ); // Created issue
console . log ( result . successful ); // true
const result = await composio . tools . execute ( 'GITHUB_CREATE_ISSUE' , {
userId: 'default' ,
version: '20250909_00' ,
arguments: { owner: 'composio' , repo: 'sdk' , title: 'Issue' }
});
const result = await composio . tools . execute ( 'GITHUB_GET_REPOS' , {
userId: 'default' ,
arguments: { owner: 'composio' }
}, {
beforeExecute : ({ params }) => {
console . log ( 'Executing with:' , params . arguments );
return params ;
},
afterExecute : ({ result }) => {
console . log ( 'Got:' , result . data );
return result ;
}
});
Fetch tools in raw Composio format without provider wrapping.
async getRawComposioTools (
query : ToolListParams ,
options ?: SchemaModifierOptions
): Promise < ToolList >
Example:
const tools = await composio . tools . getRawComposioTools ({
toolkits: [ 'github' ],
limit: 5
});
console . log ( tools [ 0 ]. slug ); // GITHUB_CREATE_ISSUE
console . log ( tools [ 0 ]. inputParameters ); // JSON Schema
Fetch a single tool in raw format.
async getRawComposioToolBySlug (
slug : string ,
options ?: ToolRetrievalOptions
): Promise < Tool >
Example:
const tool = await composio . tools . getRawComposioToolBySlug ( 'GITHUB_CREATE_ISSUE' );
console . log ( tool . name ); // "Create Issue"
console . log ( tool . version ); // "20250909_00"
console . log ( tool . inputParameters ); // JSON Schema
Create a custom tool with your own logic.
async createCustomTool < T extends CustomToolInputParameter > (
body : CustomToolOptions < T >
): Promise < Tool >
body
CustomToolOptions
required
Unique tool identifier (uppercase snake_case)
Zod schema for input validation
Async function that executes the tool
Associate with a toolkit for auth
Get a list of all available tool slugs.
async getToolsEnum (): Promise < ToolRetrieveEnumResponse >
Example:
const allTools = await composio . tools . getToolsEnum ();
console . log ( allTools . items ); // ['GITHUB_CREATE_ISSUE', 'SLACK_SEND_MESSAGE', ...]
Types
Result from tool execution.
interface ToolExecuteResponse {
data : Record < string , unknown >; // Tool output
error : string | null ; // Error message if failed
successful : boolean ; // Whether execution succeeded
logId ?: string ; // Log ID for debugging
sessionInfo ?: Record < string , unknown >; // Session metadata
}
Raw tool schema.
interface Tool {
slug : string ; // Tool identifier
name : string ; // Human-readable name
description : string ; // What the tool does
inputParameters : JSONSchema ; // Input schema
outputParameters : JSONSchema ; // Output schema
toolkit ?: { // Associated toolkit
name : string ;
slug : string ;
};
version ?: string ; // Toolkit version
availableVersions ?: string []; // All available versions
isDeprecated ?: boolean ; // Deprecated status
isNoAuth ?: boolean ; // Requires no authentication
}
Next Steps
Toolkits API Discover available toolkits
Connected Accounts Manage user authentication
Custom Tools Create custom tools
Providers Choose your AI framework