toolCallSignature

Generates a signature object for a given tool and its arguments.

This utility function creates a tool call signature that can be used for testing tool execution nodes. It's similar to toolCallMessage but is used specifically in the context of testing tool execution.

Return

A signature that encapsulates the tool's name and its encoded arguments.

Example usage:

// Create a tool call signature for testing
val signature = toolCallSignature(SolveTool, SolveTool.Args("solve"))

// Use in node input assertions
assertNodes {
callTool withInput toolCallSignature(SolveTool, SolveTool.Args("solve")) outputs toolResult(SolveTool, "solved")
}

Parameters

tool

The tool for which the signature is being generated. This parameter must be an instance of Tool with the specified argument type.

args

The arguments to be passed to the tool. These arguments must comply with the requirements specified by the tool.