Documentation
¶
Overview ¶
Code generated by mcp-codegen. DO NOT EDIT.
Index ¶
- Variables
- func NewHandler(toolHandler ServerToolHandler) *mcp.Handler
- type ServerPromptHandler
- type ServerToolHandler
- type ToolGolangGetConstAndVarDocRequest
- type ToolGolangGetFuncDocRequest
- type ToolGolangGetMethodDocRequest
- type ToolGolangGetStructDocRequest
- type ToolGolangInspectPackageRequest
- type ToolGolangListPackagesRequest
Constants ¶
This section is empty.
Variables ¶
var ( ToolGolangListPackagesInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{},"additionalProperties":false,"type":"object"}`) ToolGolangInspectPackageInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"package_name":{"type":"string","description":"Package name"},"include_comments":{"type":"boolean","description":"Whether to include comments","default":true}},"additionalProperties":false,"type":"object","required":["package_name"]}`) ToolGolangGetStructDocInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"package_name":{"type":"string","description":"Package name where the struct is defined"},"struct_name":{"type":"string","description":"Name of the struct"}},"additionalProperties":false,"type":"object","required":["package_name","struct_name"]}`) ToolGolangGetFuncDocInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"package_name":{"type":"string","description":"Package name where the function is defined"},"func_name":{"type":"string","description":"Name of the function"}},"additionalProperties":false,"type":"object","required":["package_name","func_name"]}`) ToolGolangGetMethodDocInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"package_name":{"type":"string","description":"Package name where the method is defined"},"struct_name":{"type":"string","description":"Name of the struct that owns the method"},"method_name":{"type":"string","description":"Name of the method"}},"additionalProperties":false,"type":"object","required":["package_name","struct_name","method_name"]}`) ToolGolangGetConstAndVarDocInputSchema = json.RawMessage(`{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"package_name":{"type":"string","description":"Package name"}},"additionalProperties":false,"type":"object","required":["package_name"]}`) )
JSON Schema type definitions generated from inputSchema
var PromptList = []protocol.Prompt{}
PromptList contains all available prompts.
var ToolList = []protocol.Tool{ { Name: "golang_list_packages", Description: "Display a list of Go packages and their package comments. You can check the description and purpose of each package.", InputSchema: ToolGolangListPackagesInputSchema, }, { Name: "golang_inspect_package", Description: "List publicly available structs, methods, and functions in the specified Go package. You can check comments for each element.", InputSchema: ToolGolangInspectPackageInputSchema, }, { Name: "golang_get_struct_doc", Description: "Display detailed information about the specified Go struct. You can check the struct's comments, fields, methods, and their comments.", InputSchema: ToolGolangGetStructDocInputSchema, }, { Name: "golang_get_func_doc", Description: "Display detailed information about the specified Go function. You can check the function's signature, comments, and usage examples.", InputSchema: ToolGolangGetFuncDocInputSchema, }, { Name: "golang_get_method_doc", Description: "Display detailed information about the specified Go struct method. You can check the method's signature, comments, and usage examples.", InputSchema: ToolGolangGetMethodDocInputSchema, }, { Name: "golang_get_const_and_var_doc", Description: "Display detailed information about constants and variables in the specified Go package. You can check the type, value, and comments for each constant and variable.", InputSchema: ToolGolangGetConstAndVarDocInputSchema, }, }
ToolList contains all available tools.
Functions ¶
func NewHandler ¶
func NewHandler(toolHandler ServerToolHandler) *mcp.Handler
NewHandler creates a new MCP handler.
Types ¶
type ServerPromptHandler ¶
type ServerPromptHandler interface {
}
ServerPromptHandler is the interface for prompt handlers.
type ServerToolHandler ¶
type ServerToolHandler interface {
HandleToolGolangListPackages(ctx context.Context, req *ToolGolangListPackagesRequest) (*mcp.CallToolResult, error)
HandleToolGolangInspectPackage(ctx context.Context, req *ToolGolangInspectPackageRequest) (*mcp.CallToolResult, error)
HandleToolGolangGetStructDoc(ctx context.Context, req *ToolGolangGetStructDocRequest) (*mcp.CallToolResult, error)
HandleToolGolangGetFuncDoc(ctx context.Context, req *ToolGolangGetFuncDocRequest) (*mcp.CallToolResult, error)
HandleToolGolangGetMethodDoc(ctx context.Context, req *ToolGolangGetMethodDocRequest) (*mcp.CallToolResult, error)
HandleToolGolangGetConstAndVarDoc(ctx context.Context, req *ToolGolangGetConstAndVarDocRequest) (*mcp.CallToolResult, error)
}
ServerToolHandler is the interface for tool handlers.
type ToolGolangGetConstAndVarDocRequest ¶
type ToolGolangGetConstAndVarDocRequest struct {
PackageName string `json:"package_name"`
}
ToolGolangGetConstAndVarDocRequest contains input parameters for the golang_get_const_and_var_doc tool.
type ToolGolangGetFuncDocRequest ¶
type ToolGolangGetFuncDocRequest struct {
PackageName string `json:"package_name"`
FuncName string `json:"func_name"`
}
ToolGolangGetFuncDocRequest contains input parameters for the golang_get_func_doc tool.
type ToolGolangGetMethodDocRequest ¶
type ToolGolangGetMethodDocRequest struct {
PackageName string `json:"package_name"`
StructName string `json:"struct_name"`
MethodName string `json:"method_name"`
}
ToolGolangGetMethodDocRequest contains input parameters for the golang_get_method_doc tool.
type ToolGolangGetStructDocRequest ¶
type ToolGolangGetStructDocRequest struct {
PackageName string `json:"package_name"`
StructName string `json:"struct_name"`
}
ToolGolangGetStructDocRequest contains input parameters for the golang_get_struct_doc tool.
type ToolGolangInspectPackageRequest ¶
type ToolGolangInspectPackageRequest struct {
PackageName string `json:"package_name"`
IncludeComments bool `json:"include_comments,omitempty"`
}
ToolGolangInspectPackageRequest contains input parameters for the golang_inspect_package tool.
type ToolGolangListPackagesRequest ¶
type ToolGolangListPackagesRequest struct {
}
ToolGolangListPackagesRequest contains input parameters for the golang_list_packages tool.