Skip to content

Epic: Port keboola-mcp-server agent tools into native kbagent commands #390

Description

@padak

Context

kbagent already embeds keboola-mcp-server as a subprocess (services/mcp_service.py) and can proxy any of its tools through kbagent tool call <name>. So none of the tools below are unreachable today. The point of porting them to native CLI commands is:

  • native --json + Rich dual output (the tool call passthrough returns the raw MCP payload),
  • no MCP subprocess spawn (faster, one less moving part),
  • discoverability in --help / kbagent context,
  • no coupling to whatever keboola-mcp-server version happens to be installed.

This epic tracks porting a selected subset of keboola-mcp-server (compared at tag agent-v1.60.0, 37 tools) into first-class kbagent commands. Relates to #152 (Modern Agentic CLI).

Decided ports

Explicitly rejected (for the record)

  • query_data (ad-hoc read-only SELECT via implicit workspace) — kbagent workspace query already covers SQL execution; we don't want the implicit-workspace ergonomics in the CLI.
  • validate_semantic_query — it is not a server endpoint but ~340 LOC of local best-effort heuristics (string-matching FQNs against SQL, no parser, no execution). Its value assumes an agent in the loop, it would drift from upstream as the MCP team tunes the heuristics, and it clashes with the existing model-validator semantic-layer validate. Deferred; revisit if there is real demand.

Cross-cutting requirement (applies to every sub-issue)

Per CONTRIBUTING.md and CLAUDE.md convention #17, each new/renamed command is not done until these silent-drift surfaces are updated in the same PR:

  • src/keboola_agent_cli/commands/context.py (AGENT_CONTEXT)
  • CLAUDE.md ## All CLI Commands
  • plugins/kbagent/agents/keboola-expert.md (mind the ~62 KB byte budget — trim an adjacent block if needed)
  • plugins/kbagent/skills/kbagent/SKILL.md
  • plugins/kbagent/skills/kbagent/references/commands-reference.md
  • plugins/kbagent/skills/kbagent/references/gotchas.md (tag new gotchas (since vX.Y.Z))
  • relevant references/<topic>-workflow.md
  • changelog.py entry (CI-enforced) + make version-sync
  • E2E test in tests/test_e2e.py (convention Close must-have gaps in explorer command #16)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestepicUmbrella issue tracking multiple sub-issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions