toolschema

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package toolschema turns a use case of the op catalog into the JSON Schema of a model tool. The MCP server and the in-app assistant share it, so both describe every tool the same way (ADR 0018).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorText

func ErrorText(err error) string

ErrorText is what a model is told when a tool fails: the error, plus a hint that helps it recover instead of repeating the call.

func HasField

func HasField(b app.Binding, name string) bool

HasField reports whether the input of b has a JSON field called name (looking into embedded structs).

func Input

func Input(b app.Binding) (*jsonschema.Schema, error)

Input returns the JSON Schema of a use case's input, with the constraints declared as struct tags for the REST API copied in.

func Output

func Output(b app.Binding) (*jsonschema.Schema, error)

Output returns the JSON Schema of a use case's result.

Types

This section is empty.

Jump to

Keyboard shortcuts

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