tools

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCPToolBuilder

type MCPToolBuilder struct {
	// contains filtered or unexported fields
}

MCPToolBuilder builds MCP tools from gRPC service definitions and handles schema generation

func NewMCPToolBuilder

func NewMCPToolBuilder(logger *zap.Logger) *MCPToolBuilder

NewMCPToolBuilder creates a new MCP tool builder

func (*MCPToolBuilder) BuildTool

func (b *MCPToolBuilder) BuildTool(method types.MethodInfo) (mcp.Tool, error)

BuildTool builds an MCP tool from a gRPC method

func (*MCPToolBuilder) BuildTools

func (b *MCPToolBuilder) BuildTools(methods []types.MethodInfo) ([]mcp.Tool, error)

BuildTools builds MCP tools for all methods

func (*MCPToolBuilder) ExtractFieldComments

func (b *MCPToolBuilder) ExtractFieldComments(field protoreflect.FieldDescriptor) string

ExtractFieldComments extracts field description from comments (trimmed)

func (*MCPToolBuilder) ExtractMessageSchema

func (b *MCPToolBuilder) ExtractMessageSchema(msgDesc protoreflect.MessageDescriptor) (map[string]interface{}, error)

ExtractMessageSchema generates a JSON schema for a message with comments

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL