https://linen.dev logo
GOOGLEDRIVE_UPLOAD_FILE S3 Key
# 🖥│support-forum
s
I am trying to use the Google Drive's MCP and I do not understand what S3 Key is required as a parameter when using the tool
GOOGLEDRIVE_UPLOAD_FILE
It asks only for an S3 Key but no name of any bucket. What S3 Key is expected here?
u
Hey @Sebas, you can use this guide to make request with s3 Keys: https://composio.notion.site/file-upload-guide If you’re using MCPs via SDKs(providers), you can directly pass the file path as a string instead of passing it as a
FileUploadable
object(s3Key, name, type). Let me know if this works for you.
s
Ah, it's the S3 key of the upload to Composio's own S3 Got it, I'll se how to integrate this
u
Sure, lmk if you face any issues. Also, you can pass the complete file path as a str instead of
FileUploadable
object(s3Key, name, type) and we'll automatically handle the file.
s
Hey @Uday the thing is I'm not the one passing in the parameters to the tool, it's the LLM's choice. On our system, we are using the toolkit as part of MCP servers exposed to our Agno agents. What is the usual preferred method for handling this?? The LLM sees this schema as the tool schema for this tool: `file_to_upload`: Object containing the details of the file to upload: - `mimetype`: The MIME type of the file (e.g., "application/pdf", "image/jpeg"). - `name`: The filename that will be used when uploading the file to the destination service (e.g., "document.pdf"). - `s3key`: The S3 key of a publicly accessible file, referencing an existing file that can be uploaded to another service (e.g., "44137/gmail/GET_ATTACHMENT/response/12345").
folder_to_upload_to
(Optional) On our system, the files will exist in our own S3 bucket so I need to find a way to get the file from my S3 bucket to Composio's S3 bucket and then build the tool arguments with the information from that file. I can intercept the MCP call and tweak the arguments but the MCP tool will not accept a local file path as a parameter. We get back this error:
Copy code
'Error from MCP tool \'GOOGLEDRIVE_UPLOAD_FILE\': [TextContent(type=\'text\', text=\'{"successfull":false,"error":"Invalid request data provided\\\\n- Input should be a valid dictionary or instance of FileUploadable on parameter `file_to_upload`","data":{"message":"Invalid request data provided\\\\n- Input should be a valid dictionary or instance of FileUploadable on parameter `file_to_upload`","status_code":null}...
How do you suggest one handles this limitation for using this Composio tool in an agentic AI scenario?
Also, I tried intercepting the MCP tool call and then call the SDK
tools.execute
method like you see in the screenshot with
file_path='/var/folders/s8/cmh2lfzs0t90zlkkt0tr21jh0000gn/T/tmpo02ql4ah.pdf'
and I also get this error:
Copy code
'Invalid request data provided\n- Input should be a valid dictionary or instance of FileUploadable on parameter `file_to_upload`'
https://cdn.discordapp.com/attachments/1458489998012580003/1458798285379604482/image.png?ex=6960f346&is=695fa1c6&hm=680d61732f83ba1a11d8bceba66306d1d911a61a3ec99cc10fd308a039f26293&
@Uday I noticed this might have to do with the fact I'm using the
composio_core
package with an older version. However, the most recent SDKs do not have an Async Version which makes them not fit for our application I'd love to hear your feedback on what would be the best way to correctly allow my AI Agents to use the
upload_file
tool
u
Hey @Sebas, It should work fine on moderately recent SDK versions. I recently tried using
GOOGLEDRIVE_UPLOAD_FILE
with the SDK and it appears to be functioning correctly. Ideally, LLMs should be able to handle files automatically. I’ll check with the team and get back to you. https://cdn.discordapp.com/attachments/1458489998012580003/1459107760158539796/Screenshot_2026-01-08_at_20.10.21.png?ex=6962137e&is=6960c1fe&hm=b7b165d33363da69a90aba221697a19a38196dee6bbcbf4369848a35765c7e50&
2 Views