Documentation
¶
Index ¶
- Constants
- func NewTextResult(content string, err error) *mcp.CallToolResult
- func ServerPromptToGoSdkPrompt(s *Server, serverPrompt api.ServerPrompt) (*mcp.Prompt, mcp.PromptHandler, error)
- func ServerToolToGoSdkTool(s *Server, tool api.ServerTool) (*mcp.Tool, mcp.ToolHandler, error)
- type Configuration
- type ContextKey
- type Server
- func (s *Server) Close()
- func (s *Server) GetEnabledPrompts() []string
- func (s *Server) GetEnabledTools() []string
- func (s *Server) GetTargetParameterName() string
- func (s *Server) ReloadConfiguration(newConfig *config.StaticConfig) error
- func (s *Server) ServeHTTP() *mcp.StreamableHTTPHandler
- func (s *Server) ServeSse() *mcp.SSEHandler
- func (s *Server) ServeStdio(ctx context.Context) error
- type ToolCallRequest
- type ToolFilter
- type ToolMutator
Constants ¶
View Source
const TokenScopesContextKey = ContextKey("TokenScopesContextKey")
Variables ¶
This section is empty.
Functions ¶
func NewTextResult ¶
func NewTextResult(content string, err error) *mcp.CallToolResult
func ServerPromptToGoSdkPrompt ¶ added in v0.0.56
func ServerPromptToGoSdkPrompt(s *Server, serverPrompt api.ServerPrompt) (*mcp.Prompt, mcp.PromptHandler, error)
ServerPromptToGoSdkPrompt converts an api.ServerPrompt to MCP SDK types
func ServerToolToGoSdkTool ¶ added in v0.0.55
func ServerToolToGoSdkTool(s *Server, tool api.ServerTool) (*mcp.Tool, mcp.ToolHandler, error)
Types ¶
type Configuration ¶
type Configuration struct {
*config.StaticConfig
// contains filtered or unexported fields
}
func (*Configuration) ListOutput ¶
func (c *Configuration) ListOutput() output.Output
func (*Configuration) Toolsets ¶ added in v0.0.51
func (c *Configuration) Toolsets() []api.Toolset
type ContextKey ¶ added in v0.0.48
type ContextKey string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(configuration Configuration) (*Server, error)
func (*Server) GetEnabledPrompts ¶ added in v0.0.56
GetEnabledPrompts returns the names of the currently enabled prompts
func (*Server) GetEnabledTools ¶
func (*Server) GetTargetParameterName ¶ added in v0.0.53
GetTargetParameterName returns the parameter name used for target identification in MCP requests
func (*Server) ReloadConfiguration ¶ added in v0.0.56
func (s *Server) ReloadConfiguration(newConfig *config.StaticConfig) error
ReloadConfiguration reloads the configuration and reinitializes the server. This is intended to be called by the server lifecycle manager when configuration changes are detected.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP() *mcp.StreamableHTTPHandler
func (*Server) ServeSse ¶
func (s *Server) ServeSse() *mcp.SSEHandler
type ToolCallRequest ¶ added in v0.0.55
type ToolCallRequest struct {
Name string
// contains filtered or unexported fields
}
func GoSdkToolCallParamsToToolCallRequest ¶ added in v0.0.55
func GoSdkToolCallParamsToToolCallRequest(toolCallParams *mcp.CallToolParamsRaw) (*ToolCallRequest, error)
func GoSdkToolCallRequestToToolCallRequest ¶ added in v0.0.55
func GoSdkToolCallRequestToToolCallRequest(request *mcp.CallToolRequest) (*ToolCallRequest, error)
func (*ToolCallRequest) GetArguments ¶ added in v0.0.55
func (ToolCallRequest *ToolCallRequest) GetArguments() map[string]any
func (*ToolCallRequest) GetString ¶ added in v0.0.55
func (ToolCallRequest *ToolCallRequest) GetString(key, defaultValue string) string
type ToolFilter ¶ added in v0.0.53
type ToolFilter func(tool api.ServerTool) bool
ToolFilter is a function that takes a ServerTool and returns a boolean indicating whether to include the tool
func CompositeFilter ¶ added in v0.0.53
func CompositeFilter(filters ...ToolFilter) ToolFilter
func ShouldIncludeTargetListTool ¶ added in v0.0.53
func ShouldIncludeTargetListTool(targetName string, targets []string) ToolFilter
type ToolMutator ¶ added in v0.0.53
type ToolMutator func(tool api.ServerTool) api.ServerTool
func WithTargetParameter ¶ added in v0.0.53
func WithTargetParameter(defaultCluster, targetParameterName string, targets []string) ToolMutator
WithTargetParameter adds a target selection parameter to the tool's input schema if the tool is cluster-aware
Click to show internal directories.
Click to hide internal directories.