-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
User Story
As a developer or AI agent using KSail via an MCP-compatible client (VS Code, Claude, Copilot),
I want to invoke cluster update, workload apply, and cipher encrypt/decrypt as MCP tools,
So that I can manage KSail clusters autonomously through AI assistants without switching to the terminal.
Context
The Weekly Roadmap — March 16, 2026 identifies MCP write-operation tools as the second highest unshipped "Now" priority:
MCP read-only tools are already live; write operations unlock autonomous agentic workflows. No other provisioning tool offers write-side MCP operations on local Kubernetes clusters — this is a unique differentiator.
MCP adoption continues to accelerate — VS Code, JetBrains, and Zed all have first-class MCP client support. KSail's toolgen system (pkg/toolgen/) auto-generates MCP tools from the Cobra command tree using ai.toolgen.consolidate + ai.toolgen.permission annotations. Commands annotated with these produce paired read/write tools (cluster_read/cluster_write, etc.).
The key question is whether write-side commands (cluster update, workload apply, cipher encrypt/decrypt) are currently reachable via the auto-generated write tools, or whether they require additional annotation or explicit exclusion removal.
Approach
- Audit current MCP coverage — check
pkg/toolgen/to see which commands are currently exposed as write tools and whethercluster update,workload apply,cipher encrypt/decryptare included or excluded. - Verify
ai.toolgen.consolidate+ai.toolgen.permissionannotations on the relevant command groups (cluster,workload,cipher) inpkg/cli/cmd/. - Ensure write operations are not excluded — check
toolgen.DefaultOptions()for any exclusions of write commands. - Structure tool output for AI consumption — ensure JSON/structured output mode is available for these commands.
- Validate via MCP client — confirm
cluster_write,workload_write,cipher_writetools are callable with correct arguments.
Key files:
pkg/toolgen/— tool generation logic;toolgen.DefaultOptions()for exclusionspkg/cli/cmd/cluster/,pkg/cli/cmd/workload/,pkg/cli/cmd/cipher/— command definitions and annotationspkg/cli/annotations/— annotation constants (ai.toolgen.consolidate,ai.toolgen.permission,ai.toolgen.exclude)pkg/svc/mcp/— MCP server wiring
Acceptance Criteria
-
cluster_writeMCP tool coverscluster update(and related lifecycle commands) -
workload_writeMCP tool coversworkload applyandworkload reconcile -
cipher_writeMCP tool coverscipher encryptandcipher decrypt - Tool output is structured for AI consumption (JSON or structured text)
- No regressions in existing MCP read tools
-
go build ./...andgo test ./...pass - MCP tool schema is accurate (argument types, descriptions match CLI flags)
Generated by Daily Plan · ◷
Metadata
Metadata
Assignees
Labels
Type
Projects
Status