https://linen.dev logo
s
Hi Composio Team, We are using your composio-client Python SDK and need to programmatically list all available tools (integrations) to build a dynamic marketplace for our users. We are calling client.tools.list(), which seems to be successful, but we are having trouble processing the response. The latest error we are seeing is AttributeError: 'Item' object has no attribute 'unique_id'. Could you please provide the correct code snippet for the following: 1. Calling the endpoint to get the list of all available tools. 2. Iterating through the response. For each tool in the list, getting its unique slug (e.g., "gmail"), its display name (e.g., "Gmail"), and its description. Thank you!
a
Can you share a snippet to reproduce the this issue?
s
Here is a minimal, self-contained Python script that reproduces our situation. Explanation: The script successfully calls client.tools.list() and gets a list of all available actions. As you can see from the printed structure of the first action object, the application-level information (like the app's slug and name) is nested inside the .toolkit attribute. Our code then iterates through all these actions to build a de-duplicated dictionary of unique applications. This works, but it feels indirect. the question: Is this the intended method for getting a list of all supported applications (toolkits)? Or is there a more direct endpoint or SDK method available, like client.toolkits.list() or client.applications.list(), that would return a clean list of the parent applications ("gmail", "slack", etc.) directly, perhaps including an official description for each application? The current method requires us to process a very large list of actions just to derive the list of parent applications. We want to make sure we're not missing a simpler, more direct API call. https://cdn.discordapp.com/attachments/1407701088307515495/1407732083027087411/composio_inspector.py?ex=68a72c2a&is=68a5daaa&hm=02fed5259944267aa875a360c47f4acead6f1e444502748b1084908feec5bbec&
a
Yes, you can use
.toolkits.list()
Copy code
from composio import Composio

composio = Composio(api_key="{{composio_api_key}}")

toolkits = composio.client.toolkits.list()

print(toolkits)
Any specific reason to use
composio_client
instead of [composio](https://pypi.org/project/composio/)?