toolvalidator

package
v1.0.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package toolvalidator provides validation utilities for tool definitions and tool calls. It includes functionality to validate tool schemas, arguments, and ensure compliance with expected formats and constraints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator validates tool definitions and tool calls

func New

func New(strictMode bool) *Validator

New creates a new Validator strictMode: if true, extra fields in tool call arguments are rejected

func (*Validator) ValidateToolCall

func (v *Validator) ValidateToolCall(tool types.Tool, call types.ToolCall) error

ValidateToolCall validates a tool call against its definition

func (*Validator) ValidateToolDefinition

func (v *Validator) ValidateToolDefinition(tool types.Tool) error

ValidateToolDefinition validates a tool definition

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL