Documentation
¶
Overview ¶
Package server provides the MCP server context for klausctl.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONResult ¶
func JSONResult(v any) (*mcp.CallToolResult, error)
JSONResult serializes v as indented JSON and returns it as an MCP text result.
Types ¶
type ServerContext ¶
ServerContext is a lightweight dependency container passed to MCP tool handlers. It provides access to klausctl paths and runtime detection without requiring auth, federation, or instrumentation.
func (*ServerContext) DetectRuntime ¶
DetectRuntime creates a Runtime from the given config, auto-detecting when the config runtime field is empty.
func (*ServerContext) InstancePaths ¶
func (sc *ServerContext) InstancePaths(name string) *config.Paths
InstancePaths returns config paths scoped to a named instance.
func (*ServerContext) LoadInstanceConfig ¶
func (sc *ServerContext) LoadInstanceConfig(name string) (*config.Config, error)
LoadInstanceConfig loads the config for a named instance.
Click to show internal directories.
Click to hide internal directories.