schema

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoShapeFromSchemaMap added in v0.1.7

func GoShapeFromSchemaMap(schemaMap map[string]interface{}) (string, error)

GoShapeFromSchemaMap renders a schema map as a Go-like type shape by first converting it into a dynamic reflect.Type.

func TypeFromInputSchema added in v0.1.7

func TypeFromInputSchema(inputSchema mcpschema.ToolInputSchema) (reflect.Type, error)

TypeFromInputSchema converts an MCP ToolInputSchema into a dynamic Go type.

func TypeFromOutputSchema added in v0.1.7

func TypeFromOutputSchema(outputSchema mcpschema.ToolOutputSchema) (reflect.Type, error)

TypeFromOutputSchema converts an MCP ToolOutputSchema into a dynamic Go type.

Types

type ContinuationShape

type ContinuationShape struct {
	HasBytes bool
	HasLines bool
}

ContinuationShape reports whether an output schema exposes continuation hints via nextRange with bytes and/or lines support.

func HasOutputContinuation

func HasOutputContinuation(s any) (bool, ContinuationShape)

HasOutputContinuation returns true when the output schema contains a continuation object with a nextRange that includes either bytes or lines sub-objects having integer-typed fields.

type RangeInputs

type RangeInputs struct {
	HasBytes bool
	HasLines bool
}

RangeInputs reports whether an input schema accepts byte or line ranges.

func HasInputRanges

func HasInputRanges(s any) (bool, RangeInputs)

HasInputRanges returns true when the input schema exposes any range selectors to request specific content windows. It checks common shapes: byteRange (from/to), bytesRange (offsetBytes/lengthBytes) and lineRange (startLine/lineCount).

Jump to

Keyboard shortcuts

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