Skip to main content
The Tools class provides methods to retrieve, execute, and manage tools. Tools are individual functions like GITHUB_CREATE_ISSUE, GMAIL_SEND_EMAIL, etc.

Accessing Tools

Methods

get

Retrieve tools based on various filters. Returns provider-specific tool collection (type automatically inferred).
str
required
The user ID to get tools for. Used for user-specific authentication.
str
Get a single tool by slug (e.g., "GITHUB_CREATE_ISSUE").
list[str]
List of specific tool slugs to retrieve.
Search term to filter tools by name or description.
list[str]
Filter tools by toolkit slugs.
list[str]
Filter by required OAuth scopes.
list[Modifier]
Apply schema or execution modifiers to tools. See Decorators.
int
Maximum number of tools to return.
TToolCollection
Provider-specific tool collection. The type is automatically inferred:
  • OpenAIProviderlist[ChatCompletionToolParam]
  • AnthropicProviderlist[ToolParam]
  • Other providers → respective tool types

execute

Execute a tool with the provided parameters.
str
required
The tool slug to execute (e.g., "GITHUB_CREATE_ISSUE").
dict[str, Any]
required
The arguments to pass to the tool. Must match the tool’s input schema.
str
The user ID to execute the tool for. Used to select the connected account.
str
Specific connected account ID to use for execution.
dict
Custom authentication parameters for the tool execution.
dict
Custom connection data (takes priority over custom_auth_params).
str
Additional text context for the tool execution.
str
Specific tool version to execute. Overrides SDK-level toolkit versions.
bool
default:"False"
Skip version check for ‘latest’ version. May cause unexpected behavior.
list[Modifier]
Apply before/after execution modifiers.
ToolExecutionResponse
Execution result with the following structure:

proxy

Make direct API calls through connected accounts.
str
required
API endpoint path (e.g., /repos/owner/repo/issues).
Literal['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD']
required
HTTP method for the request.
object
Request body for POST/PUT/PATCH requests.
str
Connected account ID to use for authentication.
list[Parameter]
Additional parameters (headers, query params, etc.).Each parameter has:
  • name: Parameter name
  • value: Parameter value
  • type: "header", "query", or "path"
dict
Custom connection data for the request.

custom_tool

Register a custom tool. This is an alias for composio.tools.custom_tool. See Custom Tools for detailed documentation.

get_raw_composio_tool_by_slug

Get raw tool schema without provider wrapping (advanced usage).

get_raw_composio_tools

Get raw tool schemas without provider wrapping (advanced usage).

Examples

Get Tools by Toolkit

Get Specific Tools

Search Tools

Execute Tools

Execute with Specific Account

Execute with Custom Auth

Proxy Call

Type Safety

The Tools class is generic and provides full type safety:

Next Steps

Decorators

Learn about tool modifiers

Custom Tools

Create your own tools

Connected Accounts

Manage authentication

Providers

Use tools with AI frameworks