Documentation
¶
Index ¶
- Variables
- type ToolInput
- type ToolInputSchema
- type ToolInputSchemaOption
- func WithArray(name string, description string, items map[string]interface{}) ToolInputSchemaOption
- func WithBoolean(name string, description string) ToolInputSchemaOption
- func WithNumber(name string, description string) ToolInputSchemaOption
- func WithObject(name string, description string, properties map[string]map[string]interface{}) ToolInputSchemaOption
- func WithRequiredBoolean(name string, description string) ToolInputSchemaOption
- func WithRequiredNumber(name string, description string) ToolInputSchemaOption
- func WithRequiredObject(name string, description string, properties map[string]map[string]interface{}) ToolInputSchemaOption
- func WithRequiredString(name string, description string) ToolInputSchemaOption
- func WithString(name string, description string) ToolInputSchemaOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTypeMissingRequiredProperty = errors.New("missing required property") ErrMissingRequestedProperty = errors.New("missing requested property") ErrCouldNotParseProperty = errors.New("could not parse property") ErrUnknownProperty = errors.New("unknown property") ErrUnknownPropertyType = errors.New("unknown property type") )
Functions ¶
This section is empty.
Types ¶
type ToolInput ¶
type ToolInput interface { Boolean(name string) (bool, error) BooleanOr(name string, defaultValue bool) bool String(name string) (string, error) StringOr(name string, defaultValue string) string Number(name string) (float64, error) NumberOr(name string, defaultValue float64) float64 Object(name string) (map[string]interface{}, error) ObjectOr(name string, defaultValue map[string]interface{}) map[string]interface{} Array(name string) ([]interface{}, error) ArrayOr(name string, defaultValue []interface{}) []interface{} }
type ToolInputSchema ¶
type ToolInputSchema interface { GetMcpToolInputSchema() mcp.ToolInputSchema Validate(args map[string]interface{}) (ToolInput, error) }
func NewToolInputSchema ¶
func NewToolInputSchema(opts ...ToolInputSchemaOption) ToolInputSchema
type ToolInputSchemaOption ¶
type ToolInputSchemaOption func(*toolInputSchema)
func WithArray ¶
func WithArray(name string, description string, items map[string]interface{}) ToolInputSchemaOption
func WithBoolean ¶
func WithBoolean(name string, description string) ToolInputSchemaOption
func WithNumber ¶
func WithNumber(name string, description string) ToolInputSchemaOption
func WithObject ¶
func WithObject(name string, description string, properties map[string]map[string]interface{}) ToolInputSchemaOption
func WithRequiredBoolean ¶
func WithRequiredBoolean(name string, description string) ToolInputSchemaOption
func WithRequiredNumber ¶
func WithRequiredNumber(name string, description string) ToolInputSchemaOption
func WithRequiredObject ¶
func WithRequiredObject(name string, description string, properties map[string]map[string]interface{}) ToolInputSchemaOption
func WithRequiredString ¶
func WithRequiredString(name string, description string) ToolInputSchemaOption
func WithString ¶
func WithString(name string, description string) ToolInputSchemaOption
Click to show internal directories.
Click to hide internal directories.