Documentation
¶
Overview ¶
Package mcpserver exposes geelark-cli over the Model Context Protocol.
All GeeLark functionality is exposed through a small set of "routed" tools: each tool covers one module and dispatches on an `action` parameter that maps to a geelark-cli subcommand. Command flags are passed through the `params` object.
Each tool call forks this same binary (os.Args[0]) so the child's stdout is isolated from the MCP transport. That keeps the existing CLI print sites unchanged and avoids version skew between MCP and CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Args struct {
Action string `json:"action" jsonschema:"the subcommand to execute; must be one of the actions listed in this tool's description"`
Params map[string]any `` /* 217-byte string literal not displayed */
}
Args is the input schema shared by every routed tool.
type Options ¶
type Options struct {
// SkillsFS holds the skills reference documentation tree.
SkillsFS fs.FS
// Version is reported to MCP clients during initialization.
Version string
}
Options configures a Server.
type Outcome ¶
type Outcome struct {
Stdout string
Stderr string
ExitErr error // non-nil when the process failed
}
Outcome holds the result of one CLI invocation.
func (Outcome) FailureText ¶
FailureText returns the best error text: stderr first (cobra prints errors and usage there), then stdout, then the raw exit error.