Accessing messages inside a tool callback
Hey everyone,
I’m new to Mastra and have a quick question.
From what I understand, Mastra automatically passes messages to the agent (like in the config below). What I’m trying to figure out is: can I access those messages from within a tool callback?
Here’s a simplified example:
Any hints on how to tap into the messages inside the tool context would be appreciated!
I’m new to Mastra and have a quick question.
From what I understand, Mastra automatically passes messages to the agent (like in the config below). What I’m trying to figure out is: can I access those messages from within a tool callback?
Here’s a simplified example:
Any hints on how to tap into the messages inside the tool context would be appreciated!