Tools
Tools are the fundamental building blocks of the Composio SDK. They represent individual actions that can be executed on third-party services, such as creating a GitHub repository, sending a Slack message, or retrieving Hacker News data.Overview
TheTools class manages tool operations in the Composio SDK. It provides methods to list, retrieve, and execute tools, along with support for custom tools and execution modifiers.
Source: ts/packages/core/src/models/Tools.ts
Listing Tools
Get Tools from Toolkits
Retrieve tools from specific toolkits with optional filtering:When fetching tools by toolkit without specifying
tools, tags, search, or limit parameters, the SDK automatically sets important: true to return only the most commonly used tools.Get Specific Tools
Search for Tools
Filter by Authentication
Retrieving a Single Tool
Fetch a specific tool by its slug:Getting Provider-Wrapped Tools
Theget method fetches tools and wraps them in provider-specific format:
Executing Tools
Basic Execution
By default, manual tool execution requires a specific toolkit version. If the version resolves to “latest”, execution will throw a
ComposioToolVersionRequiredError unless dangerouslySkipVersionCheck is set to true.Version Control Options
Execution with Modifiers
Modifiers allow you to transform inputs and outputs during tool execution:Tool Schema Modification
Transform tool schemas before using them:Tool Properties
Every tool has the following key properties:slug- Unique identifier (e.g., ‘GITHUB_GET_REPOS’)name- Human-readable namedescription- Tool descriptioninputParameters- JSON Schema for input parametersoutputParameters- JSON Schema for output responsetoolkit- Associated toolkit informationversion- Current tool versionavailableVersions- List of available versionsisDeprecated- Whether the tool is deprecatedisNoAuth- Whether authentication is requiredtags- Categorization tags
Advanced Features
Tool Router Meta Tools
Fetch meta tools for tool router sessions:Execute Meta Tools
Proxy Execute
Send custom requests to toolkits:Get Tool Input Parameters
Get All Available Tools
Auto File Upload/Download
The SDK supports automatic file handling for tools that work with files:Error Handling
Common errors when working with tools:ComposioToolNotFoundError- Tool with the given slug doesn’t existComposioToolVersionRequiredError- Version resolves to “latest” anddangerouslySkipVersionCheckis not trueComposioToolExecutionError- Error during tool executionValidationError- Invalid parameters passed to tool methodsComposioProviderNotDefinedError- Provider not configured when initializing Tools
Related Resources
- Toolkits - Collections of related tools
- Custom Tools - Create your own tools
- Connected Accounts - Authenticate with external services
- Providers - AI framework integrations