eastern-cyan
eastern-cyan3mo ago

[Solved ✅] Tool Customization: Wrap existing tool (GMAIL_SEND_EMAIL)

I'm wondering if it is possible to "wrap" an existing tool with some custom functionality? Here is my use-case: I want to use the GMAIL_SEND_EMAIL tool to send an email with an attachment. However, I don't want to pass the base64'd file through the LLM so it can generate the proper tool call. Seems like a waste of tokens. Instead, I'd like to wrap the Composio tool in my own tool that takes a file_id. In my tool implementation, I would do the work to convert the file_id into the base64 bytes to pass to the Composio tool. Is this possible?
4 Replies
eastern-cyan
eastern-cyanOP3mo ago
Actually, this other question posted here might help me answer. Looks like there are some parts of Composio I need to understand better. OK to ignore this for now while I research this. https://discord.com/channels/1170785031560646836/1314217352132300871/1314217352132300871
Soham
Soham3mo ago
Composio Docs
🛠️ How to modify Actions? - Composio
Composio enables your agents to connect with Various Tools and work with them
Soham
Soham3mo ago
this should be helpful!
eastern-cyan
eastern-cyanOP3mo ago
Got everything working. Need to RTFM next time! Great job with the schema/pre/post features. They were exactly what I needed

Did you find this page helpful?