Skip to content
Using tool output a...
 
Notifications
Clear all

Using tool output as input for another tool

4 Posts
3 Users
0 Reactions
6 Views
Prince_Mathew
(@prince_mathew)
Posts: 1
New Member
Topic starter
 

Hi there, I'm working with an Agent that has several tools integrated.

I'm currently managing the tool execution flow through the Agent's prompt.

My goal is to use the output from one tool as the input for another. Is this achievable?

Thanks,
Prince

 
Posted : 06/03/2025 10:24 am
solomon
(@solomon)
Posts: 78
Trusted Member
 

Yes, you can instruct the AI agent to do that. It will retrieve the output and utilize it as input.

Configuring your tools with suitable descriptions and employing the $fromAI function should suffice.


An alternative approach would be to use a sub-workflow and the “Call subworkflow” tool to execute everything within a single invocation.

In this scenario, you would use standard nodes to manage the process and simply return the final output to the AI.

If this response addresses your question, kindly consider marking it as the solution.

 
Posted : 06/03/2025 1:49 pm
solomon
(@solomon)
Posts: 78
Trusted Member
 

Hello! I believe I've found the solution you're looking for:

It seems there isn't a direct way to accomplish this, unfortunately.

However, there is a workaround:

Add this option to your Agent:

Enable it:

When this tool executes:

You will observe its outcome in the output:

To filter by the tool name, you can implement it like this:

{{ $json.intermediateSteps
    .filter(item => item.action.tool === "get_pokemon_info")
    .map(item => JSON.parse(item.observation)) }}

:point_right:

If this response resolves your query, please consider marking it as the solution.

 
Posted : 07/03/2025 12:11 am
system
(@system)
Posts: 332
Reputable Member
 

This discussion was automatically closed 90 days following the last response. New responses are no longer permitted.

 
Posted : 05/06/2025 12:11 am
Share: