---
title: "🛠️ What are Tools & Actions?"
sidebarTitle: "What are Tools?"
icon: "question"
description: "Learn about tools in Composio"
---
### What are tools?

Large Language Models (LLMs) are like a highly intelligent person who can understand and reason about almost anything but is sitting in an empty room with no ability to interact with the outside world. They can think and talk about sending emails, creating a ticket on Jira, or cloning a repository from github, but can't actually DO these things. 

This is where tools come in. Tools give this intelligent being specific abilities to interact with the real world. Many AI models support tool calling (also called function calling).

<Note>
The term **tools** and **actions** are used interchangeably in the documentation 
</Note>

### How tool calling works
AI models with tool calling capabilities decide when and how to use specific tools to meet user requests. Developers create and provide these tools, equipping the AI with a toolbox to select the best tool for each task

For example, if a user asks an LLM to send an email to `john@example.com` with subject `Meeting Tomorrow`, the LLM can use the [Gmail](https://app.composio.dev/app/gmail) tool's `GMAIL_SEND_EMAIL` action to send the email.

LLM's thinking process:
1. Recognizes this requires email sending capability
2. Identifies the appropriate tool ([Gmail](https://app.composio.dev/app/gmail)) & action (`GMAIL_SEND_EMAIL`)
3. Structures the necessary parameters:
   - recipient: john@example.com
   - subject: "Meeting Tomorrow"
   - body: [drafts appropriate content]
4. Calls the action with these parameters


### Tool calling with Composio

At Composio, we offer tools for multiple platforms, accessible via Python and JavaScript SDKs. These platforms, referred to as **Apps** or **Tools**, include popular services like GitHub, Twitter, Salesforce, Jira, and Notion. Within each of these Apps, we provide **Actions**, which are essentially functions that can be executed. For example, you can send an email on Gmail, star a repository on GitHub, or create an issue on Jira. These tools can also be used directly, similar to function calls, without needing agents.

<CodeGroup>
```python Python 
from composio_langchain import ComposioToolSet, Action, App

tool_set = ComposioToolSet()

# Get all actions from a tool
tools = tool_set.get_tools(apps=[App.GITHUB])

# Get specific actions
tools = tool_set.get_tools(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```

```javascript JavaScript
import { LangchainToolSet } from "composio-core";

const composioToolset = new LangchainToolSet();

// Get all actions from a tool
const tools = await composioToolset.getTools({ apps: ["github"] });

// Get specific actions
const tools = await composioToolset.getTools({ actions: ["github_star_a_repository_for_the_authenticated_user"] });
```
</CodeGroup>

### Action Types

1. **External Tool Actions**: Pre-configured actions for specific tools, such as creating issues or changing issue status in Jira.
2. **System Management Actions**: Actions that interact with the execution environment, like file system operations, shell commands, and browser automation.
3. **Custom Actions**: User-defined actions in Python or JavaScript that extend Composio's capabilities to interact with new or existing tools.

### Action Limits

Empirical evidence indicates that agents perform optimally when limited to **fewer than 20 actions**. Providing LLMs with too many actions can lead to significant performance issues, such as **increased response time** and **decreased accuracy**.

To optimize agent performance, it's essential to limit the number of actions available. This can be achieved through effective action filtering strategies. Here are some recommended approaches:

1. Use specific actions from a tool
2. Use tags to filter actions
3. Use use cases to filter actions
4. Implement custom filtering logic

By carefully curating the action set, you can significantly improve agent efficiency and response quality.
