Documentation
¶
Index ¶
- func CreateServer(version string, cfg *config.File) (*mcp.Server, error)
- type ProfileShowInput
- type QueryInput
- type ToolHandler
- func (h *ToolHandler) ProfileList(ctx context.Context, req *mcp.CallToolRequest, input struct{}) (*mcp.CallToolResult, any, error)
- func (h *ToolHandler) ProfileShow(ctx context.Context, req *mcp.CallToolRequest, input ProfileShowInput) (*mcp.CallToolResult, any, error)
- func (h *ToolHandler) Query(ctx context.Context, req *mcp.CallToolRequest, input QueryInput) (*mcp.CallToolResult, any, error)
- func (h *ToolHandler) RegisterTools(server *mcp.Server)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProfileShowInput ¶
type ProfileShowInput struct {
Name string `json:"name" jsonschema:"Profile name"`
}
ProfileShowInput represents the input for the profile_show tool
type QueryInput ¶
type QueryInput struct {
SQL string `json:"sql" jsonschema:"SQL query to execute"`
Profile string `json:"profile" jsonschema:"Profile name to use"`
}
QueryInput represents the input for the query tool
type ToolHandler ¶
type ToolHandler struct {
// contains filtered or unexported fields
}
ToolHandler manages MCP tools
func NewToolHandler ¶
func NewToolHandler(cfg *config.File) *ToolHandler
NewToolHandler creates a new tool handler
func (*ToolHandler) ProfileList ¶
func (h *ToolHandler) ProfileList(ctx context.Context, req *mcp.CallToolRequest, input struct{}) (*mcp.CallToolResult, any, error)
ProfileList lists all profiles
func (*ToolHandler) ProfileShow ¶
func (h *ToolHandler) ProfileShow(ctx context.Context, req *mcp.CallToolRequest, input ProfileShowInput) (*mcp.CallToolResult, any, error)
ProfileShow shows profile details
func (*ToolHandler) Query ¶
func (h *ToolHandler) Query(ctx context.Context, req *mcp.CallToolRequest, input QueryInput) (*mcp.CallToolResult, any, error)
Query executes a SQL query
func (*ToolHandler) RegisterTools ¶
func (h *ToolHandler) RegisterTools(server *mcp.Server)
RegisterTools registers all tools with the MCP server
Click to show internal directories.
Click to hide internal directories.