https://linen.dev logo
Fetching toolkits with default limit
# 🖥│support-forum
l
Hi team, I’m a bit confused about how
composio.tools.get(userId, { toolkits })
works. When I pass an array of toolkits , for example,
["TRELLO", "GOOGLEDRIVE", "NOTION"]
, I only get the first 20 tools from the first toolkit
(TRELLO)
, which seems to match the default limit. I tried increasing the limit, but that caused token rate-limit issues with the LLM I’m using and als`o led to hallucinations due to the large number of tools being loaded. My question is: How can I retrieve the relevant tools from all the specified toolkits without hitting the default limit or overwhelming the model?
a
Hey, increase in the number of tools will affect the LLMs accuracy in choosing the right tool. You should ideally use limited tools. You can get specific tools by specifying the tool slug (ideal way), or you can use Composio's [search tool](https://docs.composio.dev/toolkits/composio#composio_search_tools) to get tools based on use-case (might add an additional few ms).
l
Using the ideal way , how can I dynamically get the tool slug based on what the user is inputting? Ideally, users select one or more toolkits (e.g., Trello, Google Drive, Notion), and then the backend should determine which specific tool slug to use depending on their input or intent. How would you recommend mapping the user’s query or input to the correct tool slug?
a
Do checkout . This is still in beta. But this is exactly what you need for this use case.
l
seems to be blowing over the 30k limit
Thanks! That helped. Quick one ,how do you usually avoid token rate-limit issues with Anthropic when the agent executes multiple tools via LangChain/Composio?