Fetching and Filtering Tools
To effectively use tools, it is recommended to fetch, inspect, and filter them based on your criteria.
This process returns a union of all tools that match the specified criteria, ensuring you provide the most relevant tools to the agents.
When fetching tools, they are automatically formatted to match the requirements of the provider you are using. This means you do not need to manually convert or adapt the tool format.
Filtering by toolkit
Toolkits are collections of tools that from a specific app!
Fetching tools from a toolkit is a good way to get a sense of the tools available.
Tools are ordered by importance
When you fetch tools from a toolkit, the most important tools are returned first.
Composio determines the importance of a tool based on the usage and relevance of the tool.
Limiting the results
Multiple toolkits have 100s of tools. These can easily overwhelm the LLM. Hence, the SDK allows you to limit the number of tools returned.
The default limit
is 20 — meaning you get the top 20 important tools from the toolkit.
Filtering by tool
You may specify the list of tools to fetch by directly providing the tool names. Browse the list of tools here to view and inspect the tools for each toolkit.
Fetching raw tools
To examine the raw schema definitition of a tool to understand the input/output parameters or to build custom logic around tool definitions, you can use the following methods. This can be useful for:
- Understanding exact input parameters and output structures.
- Building custom logic around tool definitions.
- Debugging tool interactions.
- Research and experimentation.
Filtering by search (Experimental)
You may also filter tools by searching for them. This is a good way to find tools that are relevant to a given use case.
This step runs a semantic search on the tool names and descriptions and returns the most relevant tools.