https://linen.dev logo
API: Get Tools for user?
# 🖥│support-forum
m
What's the equivalent of this SDK method on the api endpoints? const tools = await composio.tools.get(userId, { tools: ['COMPOSIO_SEARCH_DUCK_DUCK_GO_SEARCH'], }); looking at the https://docs.composio.dev/api-reference/tools/get-tools i can't see a way to pass the user id thanks
c
Hi there, you can get the Tool
COMPOSIO_SEARCH_DUCK_DUCK_GO_SEARCH
using the API without using the
user_id
. Also, you can use [Get Toolkit by Slug](https://docs.composio.dev/api-reference/tools/get-tools-by-tool-slug?explorer=true) if you are trying to fetch a specific Tool.
m
Thanks. In this context, COMPOSIO_SEARCH_DUCK_DUCK_GO_SEARCH was just an example. In general I'm looking to retrieve all the tools for a given user given a big list of them
Example... imagine I've into tools a big list like, GMAIL_xxx, NOTION, OUTLOOK, etc. and want to retrieve a list of all the tools available for one user (ie, tools available that the user already connected it)
so in this case i want something like 'list available tools for user id'
c
Got it, currently we do not support it but it is a good feature to have. I'll let you know if we can add this!
m
Thanks. So what's the current best approach to deal with it? I don't want the LLM to say it can send emails, for example, if a user haven't yet connected any email app
c
As a walkaround, you can fetch all the Auth Configs of the user and [list available tools](https://docs.composio.dev/api-reference/tools/get-tools) with
Auth Configs
as param.
m
Cool, that will do. Ty