hal_register_package_tools: Register Functions from an R Package as Tools

View source: R/tool-builder.R

hal_register_package_toolsR Documentation

Register Functions from an R Package as Tools

Description

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

## Not run: 
# expose a few dplyr verbs to the model
hal_register_package_tools("dplyr",
  fns = c("filter", "select", "arrange"), prefix = "dplyr_"
)

## End(Not run)

hal documentation built on Oct. 6, 2026, 5:07 p.m.