Module: OllamaAgent::Tools

Defined in:
lib/ollama_agent/tools/registry.rb,
lib/ollama_agent/tools/base.rb,
lib/ollama_agent/tools/git_tools.rb,
lib/ollama_agent/tools/http_tools.rb,
lib/ollama_agent/tools/shell_tools.rb,
lib/ollama_agent/tools/memory_tools.rb,
lib/ollama_agent/tools/safe_calculator.rb,
lib/ollama_agent/tools/built_in_schemas.rb,
lib/ollama_agent/tools/filesystem_explorer.rb

Overview

Provides tool registration and execution helpers for OllamaAgent.

Defined Under Namespace

Modules: BuiltInSchemas, HttpHostPattern, Registry Classes: Base, FilesystemExplorer, GitBase, GitBranch, GitCommit, GitDiff, GitLog, GitStatus, HttpGet, HttpPost, MemoryDelete, MemoryList, MemoryRecall, MemoryStore, RunShell, SafeCalculator

Class Method Summary collapse

Class Method Details

.custom_schemasObject



14
# File 'lib/ollama_agent/tools/registry.rb', line 14

def self.custom_schemas                 = Registry.custom_schemas

.custom_tool?(name) ⇒ Boolean

Returns:

  • (Boolean)


8
# File 'lib/ollama_agent/tools/registry.rb', line 8

def self.custom_tool?(name)             = Registry.custom_tool?(name)

.execute_custom(name, args, root:, read_only:) ⇒ Object



10
11
12
# File 'lib/ollama_agent/tools/registry.rb', line 10

def self.execute_custom(name, args, root:, read_only:)
  Registry.execute_custom(name, args, root: root, read_only: read_only)
end

.register(name, schema:) ⇒ Object

Delegate class-methods so consumers call OllamaAgent::Tools.register(…)



7
# File 'lib/ollama_agent/tools/registry.rb', line 7

def self.register(name, schema:, &)     = Registry.register(name, schema: schema, &)

.reset!Object



15
# File 'lib/ollama_agent/tools/registry.rb', line 15

def self.reset!                         = Registry.reset!