#Custom Tools

1 messages · Page 1 of 1 (latest)

dark roost
#

@action(toolname="shopify") def create_shopify_order( variables: OrderCreateVariablesInput, execute_request: t.Callable ) -> dict:

even though i am passing my own pydantic model , somehow composio alters this model while the tool is called . can someone please guide here?

#

@lethal fractal @lyric pond

late zodiacBOT
#

Hey there 👋,

Could you please provide some context for your query? It’ll help us understand your approach and resolve this faster.

dark roost
#

let me share some code snippets

#

I have shared some code snippets

#

do let me know if u need anything more

dark roost
#

@lethal fractal its kinda urgent .really appreciate your quick response

late zodiacBOT
#

Hey Zain,
I've seen your model, by altering you mean the "type" change of the fields?

#

Also, could you specify the use case?

dark roost
#

yes u can see that some fields are added by like currency , lineItems was changed to line_items . the descriptions are not same . overall the model is changed idk how

#

like its related to the order creation schema but its not what my model is

dark roost
#

am i understandable ? i can explain more if u want

late zodiacBOT
#

Hey Zain,
As I understand it, you're using your own model to validate and structure the schema in order to adjust it to match the tool calls expected by Composio. Please feel free to correct me if I’m wrong.

dark roost
#

yes in my custom tool

#

and when i try to pass that custom tool to my Agent , the model is changed somehow

#

as i have pasted the log of the model json schema

late zodiacBOT
#

Awesome! As I understand it, for Composio to make tool calls, it requires a specific schema. After the tool call, it sends a response payload in a predefined format.

Composio also provides processors that help modify the input schema, response, and other aspects: Composio Processors Documentation.

Let me know if this is what you're trying to achieve with your custom tool and model.