mcp

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(service *Service) protoserver.NewHandler

Types

type Config

type Config struct {
	Connector *connector.Config

	// UseData, when set to true, instructs SQLKit to put tool results in the
	// `data` field of CallToolResultContentElem.  When false (default) the
	// result JSON is carried in the `text` field.  This reverses the legacy
	// behaviour where `data` was the default.
	UseData bool `json:"useData,omitempty"`

	// Deprecated: kept for backwards-compatibility with earlier versions that
	// used `useText` (default false).  When both UseText and UseData are set
	// the latter wins.
	UseText bool `json:"useText,omitempty"`
}

func (*Config) Init

func (c *Config) Init(httpAddr string)

type Handler

type Handler struct {
	*protoserver.DefaultHandler
	// contains filtered or unexported fields
}

type Service

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

func NewService

func NewService(config *Config) *Service

func (*Service) Auth

func (s *Service) Auth() *auth.Service

Auth returns the underlying authentication service.

func (*Service) NewConnector

func (s *Service) NewConnector(operations client.Operations) *connector.Service

func (*Service) NewExecService

func (s *Service) NewExecService(operations client.Operations) *exec.Service

func (*Service) NewMetaService

func (s *Service) NewMetaService(operations client.Operations) *meta.Service

func (*Service) NewQueryService

func (s *Service) NewQueryService(operations client.Operations) *query.Service

func (*Service) RegisterHTTP

func (s *Service) RegisterHTTP(mux *http.ServeMux)

RegisterHTTP attaches all MCP auxiliary HTTP handlers (currently secret-elicitation callbacks).

func (*Service) UI

func (s *Service) UI() *interaction.Service

func (*Service) UseTextField

func (s *Service) UseTextField() bool

UseTextField indicates whether SQLKit should populate the `text` field (true – default) or the `data` field (false) when returning tool results.

Directories

Path Synopsis
ui

Jump to

Keyboard shortcuts

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