toolschema

package
v2.37.14 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package toolschema rejects tool inputs whose object keys the Go decoder and a case-sensitive reader resolve differently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateUnambiguous

func ValidateUnambiguous(properties map[string]any, input []byte) error

ValidateUnambiguous reports an error when input holds an object key that encoding/json folds into a declared property but a case-sensitive reader treats as distinct, or when one object repeats a key. Either lets code inspecting the raw input read one value while the tool executes another.

properties is a fantasy ToolInfo.Parameters map, keyed by property name. Keys matching no property are ignored because a generated struct decoder drops them. A tool with a hand-written decoder that reads undeclared keys has to reject ambiguous spellings of those keys itself.

Types

This section is empty.

Jump to

Keyboard shortcuts

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