Skip to main content

Module tools

Module tools 

Source
Expand description

Tool dispatch interface for external tool invocations.

This module provides two layers:

  • ToolDispatcher — the low-level dispatch trait used by the VM.
  • ToolProvider — the high-level pluggable provider trait for external integrations.

A ProviderRegistry collects named providers and implements ToolDispatcher, so it can be plugged directly into the VM’s tool_dispatcher slot.

Structs§

NullProvider
A sentinel provider that always returns ToolError::NotRegistered. Used as a placeholder when no real provider has been registered for a tool.
ProviderRegistry
A registry of named tool providers. Implements ToolDispatcher so it can be plugged directly into the VM.
RetryPolicy
Retry policy for tool calls.
StubDispatcher
Stub tool dispatcher for testing (returns configured responses).
ToolRequest
ToolResponse
ToolSchema
Schema describing a tool’s input/output types and declared effects.

Enums§

Capability
Capability supported by a provider.
ToolError

Traits§

ToolDispatcher
Tool dispatch trait — implementations handle HTTP, MCP, or built-in tool calls.
ToolProvider
A pluggable tool provider. Implementations live in separate crates (e.g. an HTTP provider, an MCP provider, a mock provider).

Type Aliases§

ToolFuture
Boxed async result used by tool dispatcher and provider async paths.