Class: Protege::Tool

Inherits:
Object
  • Object
show all
Includes:
ToolMixin
Defined in:
lib/protege/extensions/tool.rb

Overview

Base class for harness tools — the surface the agent uses to take action. Host apps subclass Protege::Tool, declare +description+/+input_schema+ via the class DSL, and implement #use(context:, **input) returning a Protege::Result. The tool contract (registry, dispatch, the DSL, and the +#success+/+#failure+ helpers) lives in ToolMixin, which this includes; every subclass is auto-discovered via Tool.descendants (see ToolMixin.registered).

Method Summary

Methods included from ToolMixin

#failure, find!, included, invoke, registered, #success, #use