Documentation
¶
Index ¶
- func ToOutputSchemaSchema(valueType reflect.Type) (*jsonschema.Schema, error)
- func ToOutputSchemaSchemaMust(valueType reflect.Type) *jsonschema.Schema
- type ElicitationHandler
- type ElicitationResult
- type FunctionCall
- type FunctionParameters
- type Tool
- type ToolAnnotations
- type ToolCall
- type ToolCallResult
- type ToolHandler
- type ToolSet
- type ToolType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToOutputSchemaSchema ¶ added in v1.5.14
func ToOutputSchemaSchema(valueType reflect.Type) (*jsonschema.Schema, error)
func ToOutputSchemaSchemaMust ¶ added in v1.7.0
func ToOutputSchemaSchemaMust(valueType reflect.Type) *jsonschema.Schema
Types ¶
type ElicitationHandler ¶ added in v1.7.0
type ElicitationHandler func(ctx context.Context, req *mcp.ElicitParams) (ElicitationResult, error)
ElicitationHandler is a function type that handles elicitation requests from the MCP server This allows the runtime to handle elicitation requests and propagate them to its own client
type ElicitationResult ¶ added in v1.7.0
type FunctionCall ¶
type FunctionParameters ¶ added in v1.5.2
type FunctionParameters struct {
Type string `json:"type"`
Properties map[string]any `json:"properties"`
Required []string `json:"required,omitempty"`
}
func (FunctionParameters) MarshalJSON ¶ added in v1.5.2
func (fp FunctionParameters) MarshalJSON() ([]byte, error)
type Tool ¶
type Tool struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Parameters FunctionParameters `json:"parameters"`
Annotations ToolAnnotations `json:"annotations"`
OutputSchema any `json:"outputSchema"`
Handler ToolHandler `json:"-"`
}
func (*Tool) DisplayName ¶ added in v0.7.0
type ToolAnnotations ¶ added in v1.7.0
type ToolAnnotations mcp.ToolAnnotations
type ToolCall ¶
type ToolCall struct {
ID string `json:"id,omitempty"`
Type ToolType `json:"type"`
Function FunctionCall `json:"function"`
}
type ToolCallResult ¶
type ToolCallResult struct {
Output string `json:"output"`
}
type ToolHandler ¶
type ToolHandler = func(ctx context.Context, toolCall ToolCall) (*ToolCallResult, error)
Click to show internal directories.
Click to hide internal directories.