函数名 | 函数描述/介绍 |
---|
jsonschema.ActionObject | |
jsonschema.NewObjectArraySchema | |
jsonschema.NewObjectSchema | |
jsonschema.Object | |
jsonschema.ObjectArray | |
jsonschema.action | |
jsonschema.const | WithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values. |
jsonschema.description | WithParam_Description adds a description to a property in the JSON Schema. The description should explain the purpose and expected values of the prope... |
jsonschema.enum | WithParam_Enum specifies a list of allowed values for a string property. The property value must be one of the specified enum values. |
jsonschema.example | WithParam_Example adds an example value for a property in the JSON Schema. |
jsonschema.max | WithParam_Max sets the maximum value for a number property. The number value must not exceed this maximum. |
jsonschema.maxLength | WithParam_MaxLength sets the maximum length for a string property. The string value must not exceed this length. |
jsonschema.min | WithParam_Min sets the minimum value for a number property. The number value must not be less than this minimum. |
jsonschema.minLength | WithParam_MinLength sets the minimum length for a string property. The string value must be at least this length. |
jsonschema.paramBool | WithBoolParam adds a boolean property to the tool schema. It accepts property options to configure the boolean property's behavior and constraints... |
jsonschema.paramInt | WithIntegerParam adds a integer property to the tool schema. It accepts property options to configure the integer property's behavior and constrai... |
jsonschema.paramKeyValuePairsArray | |
jsonschema.paramNumber | WithNumberParam adds a number property to the tool schema. It accepts property options to configure the number property's behavior and constraints... |
jsonschema.paramNumberArray | WithNumberArrayParam 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.paramRaw | WithRawParam adds a custom object property to the tool schema. It accepts property options to configure the object property's behavior and constra... |
jsonschema.paramString | WithStringParam adds a string property to the tool schema. It accepts property options to configure the string property's behavior and constraints... |
jsonschema.paramStringArray | WithStringArrayParam adds a string array property to the tool schema. It accepts property options to configure the string-array property's behavio... |
jsonschema.raw | WithParam_Raw adds a raw JSON schema object to the tool's input schema. |
jsonschema.required | WithParam_Required marks a property as required in the tool's input schema. WithParam_Required properties must be provided when using the tool. |
jsonschema.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 proper... |
函数定义#
ActionObject#
详细描述#
ActionObject(opts ...any) string
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | string | |
NewObjectArraySchema#
详细描述#
NewObjectArraySchema(opts ...any) string
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | string | |
NewObjectSchema#
详细描述#
NewObjectSchema(opts ...any) string
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | string | |
Object#
详细描述#
Object(opts ...any) string
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | string | |
ObjectArray#
详细描述#
ObjectArray(opts ...any) string
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | string | |
action#
详细描述#
action(action string) ToolOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
example#
详细描述#
WithParam_Example adds an example value for a property in the JSON Schema.
example(i any) PropertyOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
max#
详细描述#
WithParam_Max sets the maximum value for a number property.
The number value must not exceed this maximum.
max(max float64) PropertyOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
maxLength#
详细描述#
WithParam_MaxLength sets the maximum length for a string property.
The string value must not exceed this length.
maxLength(max int) PropertyOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
minLength#
详细描述#
WithParam_MinLength sets the minimum length for a string property.
The string value must be at least this length.
minLength(min int) PropertyOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
paramKeyValuePairsArray#
详细描述#
paramKeyValuePairsArray(name string, opts ...PropertyOption) ToolOption
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
paramObject#
详细描述#
paramObject(objectName string, opts ...any) ToolOption
参数名 | 参数类型 | 参数解释 |
---|
objectName | string | |
opts | ...any | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
paramObjectArray#
详细描述#
paramObjectArray(name string, opts ...any) ToolOption
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...any | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
paramObjectArrayEx#
详细描述#
paramObjectArrayEx(name string, arrayPropsRaw []any, opts ...any) ToolOption
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
arrayPropsRaw | []any | |
opts | ...any | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
object | map[string]any | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
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
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
opts | ...PropertyOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | ToolOption | |
raw#
详细描述#
WithParam_Raw adds a raw JSON schema object to the tool's input schema.
raw(name string, v any) PropertyOption
参数名 | 参数类型 | 参数解释 |
---|
name | string | |
v | any | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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 | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |
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
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | PropertyOption | |