Documentation
¶
Overview ¶
Package schema provides utilities for generating MCP tool input schemas from Go structs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromStruct ¶
func FromStruct(v interface{}) protocol.ToolInputSchema
FromStruct generates a protocol.ToolInputSchema from struct tags. It examines the struct fields and their tags to create a schema that describes the expected input format for an MCP tool.
func HandleArgs ¶
HandleArgs is a helper function that handles the common pattern of parsing and validating tool arguments into a strongly-typed struct. HandleArgs is a helper function that handles the common pattern of parsing and validating tool arguments (typically map[string]interface{}) into a strongly-typed struct T. It now uses mapstructure for more robust decoding.
Types ¶
This section is empty.