BuiltinTools

org.llm4s.toolapi.builtin.BuiltinTools
object BuiltinTools

Aggregator for built-in tools with convenient factory methods.

Provides pre-configured tool sets for common use cases:

  • safe(): Core utilities, web search, and read-only HTTP (no file or shell access)
  • withFiles(): Safe tools plus read-only file system access
  • development(): All tools including shell with common dev commands

Attributes

Example
import org.llm4s.toolapi.ToolRegistry
import org.llm4s.toolapi.builtin.BuiltinTools
// Safe tools for production use
val safeRegistry = new ToolRegistry(BuiltinTools.safe())
// Development tools with file and shell access
val devRegistry = new ToolRegistry(BuiltinTools.development(
 workingDirectory = Some("/home/user/project")
))
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def core: Seq[ToolFunction[_, _]]

Core utility tools (always safe, no external dependencies).

Core utility tools (always safe, no external dependencies).

Includes:

  • DateTimeTool: Get current date/time
  • CalculatorTool: Math operations
  • UUIDTool: Generate UUIDs
  • JSONTool: Parse/format/query JSON

Attributes

def custom(fileConfig: Option[FileConfig], writeConfig: Option[WriteConfig], httpConfig: Option[HttpConfig], shellConfig: Option[ShellConfig], includeSearch: Boolean): Seq[ToolFunction[_, _]]

Custom tool set with full configuration control.

Custom tool set with full configuration control.

Value parameters

fileConfig

Configuration for read operations

httpConfig

HTTP configuration

includeSearch

Whether to include web search

shellConfig

Optional shell configuration (if None, shell tool is not included)

writeConfig

Optional write configuration (if None, write tool is not included)

Attributes

def development(workingDirectory: Option[String], fileAllowedPaths: Seq[String]): Seq[ToolFunction[_, _]]

Development tools with full read/write and shell access.

Development tools with full read/write and shell access.

Includes:

  • All core utilities
  • Web search
  • Full HTTP access
  • File system read/write
  • Shell with common dev commands

WARNING: These tools have significant access to the system. Use only in trusted development environments.

Value parameters

fileAllowedPaths

Allowed paths for file write operations

workingDirectory

Optional working directory for file/shell operations

Attributes

def safe(httpConfig: HttpConfig): Seq[ToolFunction[_, _]]

Safe tools for production use.

Safe tools for production use.

Includes:

  • All core utilities
  • Web search (DuckDuckGo, no API key required)
  • Read-only HTTP with localhost blocked

Does NOT include:

  • File system access
  • Shell access

Attributes

def withFiles(fileConfig: FileConfig, httpConfig: HttpConfig): Seq[ToolFunction[_, _]]

Safe tools plus read-only file system access.

Safe tools plus read-only file system access.

Includes:

  • All safe tools
  • Read-only file system tools (read, list, info)

Does NOT include:

  • File writing
  • Shell access

Attributes