https://linen.dev logo
Some tools are missing from the toolkit
# 🖥│support-forum
r
From the documentation here: https://docs.composio.dev/toolkits/googledrive#googledrive_upload_file The toolkit to Upload File to google drive should be accessible, however with the python SDK version 0.8.20, GOOGLEDRIVE_UPLOAD_FILE isn't available. We've seen several os this kind of scenario severally on many apps, where the documentation says something inconsistent with the SDK.
a
Could you share how you tried to acess it and weren't able to?
t
We are using the
Composio().tools.get()
method with
toolkits="GOOGLEDRIVE"
as a parameter. We have tried logging the tools gotten from its toolset and
GOOGLEDRIVE_UPLOAD_FILE
is not one of them. Below is the full list output of looping through the toolset to get all tools available to us:
Copy code
py
['GOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCE', 'GOOGLEDRIVE_COPY_FILE', 'GOOGLEDRIVE_CREATE_COMMENT', 'GOOGLEDRIVE_CREATE_DRIVE', 'GOOGLEDRIVE_CREATE_FILE', 'GOOGLEDRIVE_CREATE_FILE_FROM_TEXT', 'GOOGLEDRIVE_CREATE_FOLDER', 'GOOGLEDRIVE_CREATE_REPLY', 'GOOGLEDRIVE_CREATE_SHORTCUT_TO_FILE', 'GOOGLEDRIVE_DELETE_COMMENT', 'GOOGLEDRIVE_DELETE_DRIVE', 'GOOGLEDRIVE_DELETE_PERMISSION', 'GOOGLEDRIVE_DELETE_REPLY', 'GOOGLEDRIVE_DOWNLOAD_FILE', 'GOOGLEDRIVE_EDIT_FILE', 'GOOGLEDRIVE_EMPTY_TRASH', 'GOOGLEDRIVE_FILES_MODIFY_LABELS', 'GOOGLEDRIVE_FIND_FILE', 'GOOGLEDRIVE_FIND_FOLDER', 'GOOGLEDRIVE_GENERATE_IDS']
b
Got it, this is expected. We return [20 tools by default](https://docs.composio.dev/docs/fetching-tools#basic-usage), since more tools reduce accuracy in tool selection. I'd recommend passing only the specific tools needed for your use case. Alternatively you can get tools based on use-case and pass those: . Also, if you haven't checked out [tool-router](https://docs.composio.dev/docs/tool-router/quick-start) yet, I'd highly recommend it. It automatically discovers, authenticates, and executes the right tools for any task. The SDK uses the old APIs atm (uprading soon), you can use the [APIs](https://docs.composio.dev/rest-api/tool-router/post-tool-router-session) in the meantime
t
This is very helpful @Abhishek Thanks for sharing, we will try those approaches instead.
r
Can you use tool router with langchain provider?
a
Yes, you should be able to use it in any MCP client.
r
We’re not using any Mcp client
We are using Composio python sdk
a
tool router is an MCP server, so its framework/provider agnostic. You should be able to use it in LangChain via MCP client: https://docs.langchain.com/oss/python/langchain/mcp
t
Thanks. We will look into it.
r
The main issue that’s making us to try to use upload file tool is that the tool to edit file isnt working as expected. While updating file, it requires us to supply the existing data in the file, alongside with the new data, which is unrealistic. For example, while updating a Google sheet with existing 100 rows, while trying to add 3 new rows, the update tool expects us to provide 103 rows to update it accurately … sometimes, that breaks the model context length
If we try to update the sheet with just the 3 new rows, all the existing 100 will be gone, and that doesn't seem very efficient. What we're trying to do with the upload is to locally manipulate the file to get it in the correct state and upload to GDrive, with the hope that it will replace the existing file... However, using the file update tool would have been the easiest
a
You should be able to use
GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND
, which lets you append rows instead of overwriting. Would this help with your use case?
2 Views