Package com.google.adk.workflow
Class ToolNodes
java.lang.Object
com.google.adk.workflow.ToolNodes
Static factories for workflow nodes that run a
BaseTool, such as an MCP tool or an agent
wrapped as a tool. A node calls its tool between the plugins' tool callbacks and keeps only the
tool's state and artifact changes; a tool declared to return nothing gives no output. A tool that
asks for confirmation does not pause the workflow: the node outputs the tool's placeholder error.-
Method Summary
Modifier and TypeMethodDescriptionstatic NodeReturns a node named aftertool, with the defaultNodeConfig.static Nodestatic NodeasNode(BaseTool tool, String name, NodeConfig config) Returns a node namednamethat runstoolwithconfig; session state supplies any required parameter that the input lacks.
-
Method Details
-
asNode
Returns a node named aftertool, with the defaultNodeConfig. Otherwise it behaves asasNode(BaseTool, String, NodeConfig)describes. -
asNode
Returns a node namednamethat runstool, with the defaultNodeConfig. Otherwise it behaves asasNode(BaseTool, String, NodeConfig)describes. -
asNode
Returns a node namednamethat runstoolwithconfig; session state supplies any required parameter that the input lacks. The input may be a map of arguments; an object the JSON mapper writes as a JSON object, such as a record; a JSON object as text or as aContent; or null or blank text for none. A tool with one parameter, or one required parameter, takes any other input as that parameter; other tools fail.
-