Skip to contents

Discovers exported functions from a package and registers them as LLM-callable tools.

Usage

hal_register_package_tools(pkg, fns = NULL, exclude = NULL, prefix = NULL)

Arguments

pkg

Character; package name.

fns

Character vector of function names. If NULL, registers all exported functions.

exclude

Character vector of function names to skip.

prefix

Optional prefix for tool names (e.g., "dplyr_").

Value

Invisibly returns a list of registered tool definitions.

Examples

if (FALSE) { # \dontrun{
# expose a few dplyr verbs to the model
hal_register_package_tools("dplyr",
  fns = c("filter", "select", "arrange"), prefix = "dplyr_"
)
} # }