Fetching tools and schemas

Fetch and filter tools, and inspect schemas

Fetch specific tools, filter by permissions or search, and inspect schemas for type information. Tools are automatically formatted for your provider.

Basic usage

1tools = composio.tools.get(
2 user_id,
3 toolkits=["GITHUB"]
4)

Returns top 20 tools by default. Tools require a user_id because they’re scoped to authenticated accounts. See User management and Authentication.

Tool schemas

Inspect tool parameters and types without a user_id:

1tool = composio.tools.get_raw_composio_tool_by_slug("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.

Filtering tools

By toolkit

Get tools from specific apps. Returns top 20 tools by default.

1tools = composio.tools.get(
2 user_id,
3 toolkits=["GITHUB"],
4 limit=5 # Get top 5 tools
5)
6
7# Same filter but without user_id (for schemas)
8raw_tools = composio.tools.get_raw_composio_tools(
9 toolkits=["GITHUB"],
10 limit=5
11)

By name

Fetch specific tools when you know their names.

1tools = composio.tools.get(
2 user_id,
3 tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"]
4)
5
6# Get schemas without user_id
7raw_tools = composio.tools.get_raw_composio_tools(
8 tools=["GITHUB_CREATE_ISSUE", "GITHUB_CREATE_PULL_REQUEST"]
9)

By scopes

Filter OAuth tools by permission level. Only works with a single toolkit.

1tools = composio.tools.get(
2 user_id,
3 toolkits=["GITHUB"],
4 scopes=["write:org"]
5)

By search (experimental)

Find tools semantically.

1tools = composio.tools.get(
2 user_id,
3 search="create calendar event"
4)
5
6# Search schemas without user_id
7raw_tools = composio.tools.get_raw_composio_tools(
8 search="create calendar event"
9)
10
11# Search within a specific toolkit
12tools = composio.tools.get(
13 user_id,
14 search="issues",
15 toolkits=["GITHUB"],
16)
17
18# Search toolkit schemas without user_id
19raw_tools = composio.tools.get_raw_composio_tools(
20 search="issues",
21 toolkits=["GITHUB"]
22)

Use specific toolkit versions in production to prevent breaking changes. See toolkit versioning.