Interface ToolFunction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ToolFunction
Functional interface representing a tool callable by a provider during a run.

Implementations typically receive structured arguments parsed from a model tool invocation request together with the provider working directory context.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(com.fasterxml.jackson.databind.JsonNode params, File workingDir)
    Executes the tool.
  • Method Details

    • apply

      Object apply(com.fasterxml.jackson.databind.JsonNode params, File workingDir) throws IOException
      Executes the tool.
      Parameters:
      params - provider-specific parameters, typically parsed from JSON
      workingDir - provider working directory context; may be null
      Returns:
      tool result (provider-specific; commonly serialized to JSON)
      Throws:
      IOException - if tool execution fails