Skip to main content

jsonschema

函数名函数描述/介绍
jsonschema.ActionObject
jsonschema.NewObjectArraySchema
jsonschema.NewObjectSchema
jsonschema.Object
jsonschema.ObjectArray
jsonschema.action
jsonschema.constWithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values.
jsonschema.descriptionWithParam_Description adds a description to a property in the JSON Schema. The description should explain the purpose and expected values of the prope...
jsonschema.enumWithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values.
jsonschema.exampleWithParam_Example adds an example value for a property in the JSON Schema.
jsonschema.maxWithParam_Max sets the maximum value for a number property. The number value must not exceed this maximum.
jsonschema.maxLengthWithParam_MaxLength sets the maximum length for a string property. The string value must not exceed this length.
jsonschema.minWithParam_Min sets the minimum value for a number property. The number value must not be less than this minimum.
jsonschema.minLengthWithParam_MinLength sets the minimum length for a string property. The string value must be at least this length.
jsonschema.paramBoolWithBoolParam adds a boolean property to the tool schema. It accepts property options to configure the boolean property's behavior and constraints...
jsonschema.paramIntWithIntegerParam adds a integer property to the tool schema. It accepts property options to configure the integer property's behavior and constrai...
jsonschema.paramKeyValuePairsArray
jsonschema.paramNumberWithNumberParam adds a number property to the tool schema. It accepts property options to configure the number property's behavior and constraints...
jsonschema.paramNumberArrayWithNumberArrayParam adds a number array property to the tool schema. It accepts property options to configure the number-array property's behavio...
jsonschema.paramObject
jsonschema.paramObjectArray
jsonschema.paramObjectArrayEx
jsonschema.paramRawWithRawParam adds a custom object property to the tool schema. It accepts property options to configure the object property's behavior and constra...
jsonschema.paramStringWithStringParam adds a string property to the tool schema. It accepts property options to configure the string property's behavior and constraints...
jsonschema.paramStringArrayWithStringArrayParam adds a string array property to the tool schema. It accepts property options to configure the string-array property's behavio...
jsonschema.rawWithParam_Raw adds a raw JSON schema object to the tool's input schema.
jsonschema.requiredWithParam_Required marks a property as required in the tool's input schema. WithParam_Required properties must be provided when using the tool.
jsonschema.titleWithParam_Title adds a display-friendly title to a property in the JSON Schema. This title can be used by UI components to show a more readable proper...

函数定义#

ActionObject#

详细描述#

定义#

ActionObject(opts ...any) string

参数#

参数名参数类型参数解释
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1string

NewObjectArraySchema#

详细描述#

定义#

NewObjectArraySchema(opts ...any) string

参数#

参数名参数类型参数解释
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1string

NewObjectSchema#

详细描述#

定义#

NewObjectSchema(opts ...any) string

参数#

参数名参数类型参数解释
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1string

Object#

详细描述#

定义#

Object(opts ...any) string

参数#

参数名参数类型参数解释
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1string

ObjectArray#

详细描述#

定义#

ObjectArray(opts ...any) string

参数#

参数名参数类型参数解释
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1string

action#

详细描述#

定义#

action(action string) ToolOption

参数#

参数名参数类型参数解释
actionstring

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

const#

详细描述#

WithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values.

定义#

const(values ...any) PropertyOption

参数#

参数名参数类型参数解释
values...any

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

description#

详细描述#

WithParam_Description adds a description to a property in the JSON Schema. The description should explain the purpose and expected values of the property.

定义#

description(desc string) PropertyOption

参数#

参数名参数类型参数解释
descstring

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

enum#

详细描述#

WithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values.

定义#

enum(values ...any) PropertyOption

参数#

参数名参数类型参数解释
values...any

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

example#

详细描述#

WithParam_Example adds an example value for a property in the JSON Schema.

定义#

example(i any) PropertyOption

参数#

参数名参数类型参数解释
iany

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

max#

详细描述#

WithParam_Max sets the maximum value for a number property. The number value must not exceed this maximum.

定义#

max(max float64) PropertyOption

参数#

参数名参数类型参数解释
maxfloat64

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

maxLength#

详细描述#

WithParam_MaxLength sets the maximum length for a string property. The string value must not exceed this length.

定义#

maxLength(max int) PropertyOption

参数#

参数名参数类型参数解释
maxint

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

min#

详细描述#

WithParam_Min sets the minimum value for a number property. The number value must not be less than this minimum.

定义#

min(min float64) PropertyOption

参数#

参数名参数类型参数解释
minfloat64

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

minLength#

详细描述#

WithParam_MinLength sets the minimum length for a string property. The string value must be at least this length.

定义#

minLength(min int) PropertyOption

参数#

参数名参数类型参数解释
minint

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

paramBool#

详细描述#

WithBoolParam adds a boolean property to the tool schema. It accepts property options to configure the boolean property's behavior and constraints.

定义#

paramBool(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramInt#

详细描述#

WithIntegerParam adds a integer property to the tool schema. It accepts property options to configure the integer property's behavior and constraints.

定义#

paramInt(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramKeyValuePairsArray#

详细描述#

定义#

paramKeyValuePairsArray(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramNumber#

详细描述#

WithNumberParam adds a number property to the tool schema. It accepts property options to configure the number property's behavior and constraints.

定义#

paramNumber(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramNumberArray#

详细描述#

WithNumberArrayParam adds a number array property to the tool schema. It accepts property options to configure the number-array property's behavior and constraints.

定义#

paramNumberArray(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramObject#

详细描述#

定义#

paramObject(objectName string, opts ...any) ToolOption

参数#

参数名参数类型参数解释
objectNamestring
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramObjectArray#

详细描述#

定义#

paramObjectArray(name string, opts ...any) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramObjectArrayEx#

详细描述#

定义#

paramObjectArrayEx(name string, arrayPropsRaw []any, opts ...any) ToolOption

参数#

参数名参数类型参数解释
namestring
arrayPropsRaw[]any
opts...any

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramRaw#

详细描述#

WithRawParam adds a custom object property to the tool schema. It accepts property options to configure the object property's behavior and constraints.

定义#

paramRaw(name string, object map[string]any, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
objectmap[string]any
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramString#

详细描述#

WithStringParam adds a string property to the tool schema. It accepts property options to configure the string property's behavior and constraints.

定义#

paramString(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

paramStringArray#

详细描述#

WithStringArrayParam adds a string array property to the tool schema. It accepts property options to configure the string-array property's behavior and constraints.

定义#

paramStringArray(name string, opts ...PropertyOption) ToolOption

参数#

参数名参数类型参数解释
namestring
opts...PropertyOption

返回值#

返回值(顺序)返回值类型返回值解释
r1ToolOption

raw#

详细描述#

WithParam_Raw adds a raw JSON schema object to the tool's input schema.

定义#

raw(name string, v any) PropertyOption

参数#

参数名参数类型参数解释
namestring
vany

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

required#

详细描述#

WithParam_Required marks a property as required in the tool's input schema. WithParam_Required properties must be provided when using the tool.

定义#

required(required ...bool) PropertyOption

参数#

参数名参数类型参数解释
required...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption

title#

详细描述#

WithParam_Title adds a display-friendly title to a property in the JSON Schema. This title can be used by UI components to show a more readable property name.

定义#

title(title string) PropertyOption

参数#

参数名参数类型参数解释
titlestring

返回值#

返回值(顺序)返回值类型返回值解释
r1PropertyOption