Skip to content

refactor(skills): Replace MCP tools with CLI/SDK and add test infrastructure#464

Draft
QuentinAmbard wants to merge 27 commits intomainfrom
simplify-skills-remove-mcp
Draft

refactor(skills): Replace MCP tools with CLI/SDK and add test infrastructure#464
QuentinAmbard wants to merge 27 commits intomainfrom
simplify-skills-remove-mcp

Conversation

@QuentinAmbard
Copy link
Copy Markdown
Collaborator

Summary

This PR simplifies the databricks-skills by replacing MCP tool references with standard CLI commands and SDK patterns. This makes the skills more portable and consistent across different AI coding assistants.

Changes

MCP to CLI/SDK Migration (10 commits):

  • Replaced all MCP tool calls with Databricks CLI commands and Python SDK patterns
  • Skills now use databricks CLI commands instead of MCP tools
  • SQL queries use databricks sql execute command
  • Python SDK patterns use WorkspaceClient directly
  • Preserved legitimate MCP references for External MCP Server feature in agent-bricks

Skills Updated:

  • databricks-agent-bricks (supervisor agents)
  • databricks-aibi-dashboards (AI/BI dashboards)
  • databricks-app-python (Databricks Apps)
  • databricks-dbsql (SQL features)
  • databricks-genie (conversation API)
  • databricks-jobs (task types)
  • databricks-lakebase (Lakebase instances)
  • databricks-model-serving (all deployment patterns)
  • databricks-spark-declarative-pipelines
  • databricks-unity-catalog
  • databricks-unstructured-pdf-generation
  • databricks-vector-search
  • databricks-zerobus-ingest

Test Infrastructure (1 commit):

  • Added .tests/ folder with integration tests for Python scripts
  • Tests for databricks-agent-bricks/manager.py (MAS operations)
  • Tests for databricks-genie/conversation.py (Genie API)
  • Test runner script with HTML/XML report generation
  • All 11 unit tests pass

Test plan

  • Unit tests pass: python databricks-skills/.tests/run_tests.py --unit
  • Integration tests require Databricks connection with Agent Bricks and Genie enabled
  • Verify skill markdown files render correctly

🤖 Generated with Claude Code

Quentin Ambard and others added 19 commits April 13, 2026 09:35
…apps skills

- databricks-agent-bricks: Use CLI for KA/Genie, add manager.py for MAS operations
- databricks-aibi-dashboards: Use databricks lakeview CLI commands
- databricks-app-python: Update to use CLI-based deployment

This is part of the effort to simplify skills by removing MCP tool dependencies
and using Databricks CLI directly where possible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add conversation.py script for Genie Conversation API (ask_genie)
- Update SKILL.md to use databricks genie CLI commands
- Update spaces.md with CLI-based export/import/migration workflows
- Update conversation.md to use conversation.py script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- databricks-lakebase-autoscale: Remove MCP section, expand CLI commands
- databricks-lakebase-provisioned: Remove MCP section, expand CLI commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…and dbsql skills

- databricks-model-serving: Use databricks CLI for endpoints and workspace ops
- databricks-unity-catalog: Use databricks fs CLI for volume operations
- databricks-dbsql: Update guideline to use CLI instead of MCP

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove MCP Tools section from SKILL.md (manage_vs_endpoint, manage_vs_index, query_vs_index, manage_vs_data)
- Update Common Issues to remove MCP-specific truncation issue
- Update Notes section to reference CLI/SDK instead of MCP
- Update end-to-end-rag.md: replace MCP tools table with CLI commands
- Update troubleshooting-and-operations.md: replace MCP tool references with CLI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…mands

- Rename Option C from "MCP Tools" to "CLI" approach
- Replace references/2-mcp-approach.md with 2-cli-approach.md (full rewrite)
- Update Post-Run Validation section to use `databricks pipelines` CLI
- Update all workflow references from MCP to CLI/SDK
- Update 1-project-initialization.md reference

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- databricks-config: Rewrite to use `databricks auth` CLI commands
- databricks-docs: Update references from MCP to CLI/SDK
- databricks-metric-views: Replace MCP tools with SQL CREATE/DESCRIBE commands
- databricks-execution-compute: Replace MCP tools with CLI job commands
- databricks-unity-catalog/6-volumes: Replace MCP tools with `databricks fs` CLI
- databricks-unity-catalog/7-data-profiling: Replace MCP tools with SQL QUALITY MONITOR

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- 5-development-testing.md: Update workflow from MCP to CLI
- 8-querying-endpoints.md: Replace MCP tools section with CLI commands
- SKILL.md: Update reference table descriptions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- README.md: Update description and diagram to reference CLI/SDK
- install_skills.sh: Update comment describing skills
- databricks-app-python: Rename 6-mcp-approach.md to 6-cli-approach.md
- databricks-jobs/task-types.md: Remove MCP tool note
- databricks-model-serving: Replace MCP tools with CLI commands
  - 1-classical-ml.md: CLI for querying endpoints
  - 3-genai-agents.md: CLI for testing and querying
  - 6-logging-registration.md: CLI for running scripts
  - 7-deployment.md: CLI for job creation and management
  - 9-package-requirements.md: Notebook commands instead of MCP
- databricks-unstructured-pdf-generation: Python script pattern
- databricks-zerobus-ingest: CLI workflow instead of MCP execute_code

Note: MCP references in databricks-agent-bricks (External MCP Server
feature) and databricks-mlflow-evaluation (MLflow MCP server) are
legitimate product features and remain unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Added test infrastructure for Python scripts in databricks-skills:

- .tests/conftest.py: Pytest fixtures for Databricks connection
  - workspace_client: Session-scoped WorkspaceClient
  - warehouse_id: Finds running SQL warehouse
  - Custom markers for integration tests

- .tests/test_agent_bricks_manager.py: Tests for supervisor agent CLI
  - Unit tests for _build_agent_list helper (all agent types)
  - Integration tests for MAS lifecycle (list, find, get)

- .tests/test_genie_conversation.py: Tests for Genie conversation CLI
  - Unit tests with mocks for ask_genie function
  - Tests for timeout, failure handling, conversation tracking
  - Integration tests for live Genie Space queries

- .tests/run_tests.py: Test runner script
  - Supports --unit and --integration flags
  - HTML and JUnit XML report generation
  - Colored terminal output with summary

Tests cover the remaining Python scripts in skills:
- databricks-agent-bricks/manager.py
- databricks-genie/conversation.py

All 11 unit tests pass. Integration tests require Databricks connection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…xample queue support

Changes:
- Renamed manager.py → mas_manager.py for clearer naming
- Added example question management functions:
  - add_examples(): Add examples to ONLINE MAS
  - add_examples_queued(): Queue examples for when MAS becomes ONLINE
  - list_examples(): List all examples for a MAS
- Integrated with TileExampleQueue from databricks-tools-core
- Updated all documentation references to use mas_manager.py
- Updated test imports to use mas_manager module

This allows users to add example questions immediately after creating a MAS,
even before it finishes provisioning. Examples are automatically added when
the endpoint becomes ONLINE.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add installation section with uv (preferred) and pip fallback
for installing databricks-tools-core library.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- mas_manager.py: Inline all agent_bricks functionality, use raw HTTP
  with WorkspaceClient for auth only (no core imports)
- pdf_generator.py: New self-contained script using CLI for uploads
  (databricks fs cp) instead of SDK-based volume operations
- Update SKILL.md files to reflect self-contained scripts
- Update tests to work with new modules

Skills now only require:
- databricks-sdk (for auth in mas_manager)
- requests (for HTTP in mas_manager)
- plutoprint (for PDF generation)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Delete databricks-mcp-server/ and databricks-tools-core/ folders
- Update install.sh and install.ps1 to remove all MCP functionality
- Refactor builder-app to use standard Claude tools (Bash, Read, Write)
  instead of MCP tools
- Add centralized auth.py for Databricks authentication
- Update agent.py to pass credentials via environment variables
- Update README.md to reflect simplified architecture
- Skills now guide Claude to use databricks CLI and SDK directly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Move mas_manager.py to databricks-agent-bricks/scripts/
- Move conversation.py to databricks-genie/scripts/
- Move pdf_generator.py to databricks-unstructured-pdf-generation/scripts/
- Update all markdown references to use scripts/ path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use --json syntax for creating UC objects (catalogs, schemas, volumes)
- Document correct JSON format for each create operation
- Add SQL execution alternative for creating objects
- Fix incorrect positional args syntax in multiple skill files

The --json syntax is the most reliable across CLI versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Use --json syntax for catalogs, schemas, volumes create commands
- Remove incorrect positional argument examples
- Simplify volume example (remove external variant)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
DatabricksEnv does not exist in current databricks-connect versions.
Updated all skills to use:
- DatabricksSession.builder.serverless(True).getOrCreate()
- Local dependency installation via uv/pip

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Post-Generation Validation section with CLI SQL examples
- Update troubleshooting.md with CLI-based validation queries
- Remove in-script .show() calls from generate_synthetic_data.py
- Validate data using `databricks sql execute` instead of DataFrame API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@calreynolds calreynolds marked this pull request as draft April 13, 2026 14:14
Quentin Ambard and others added 8 commits April 13, 2026 16:45
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove Python import patterns (not usable by agent)
- Focus on CLI: write HTML to temp file, run script
- Remove redundant sections and patterns

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add field format requirements: all items need unique 32-char hex UUID id
- Document that question/sql/content fields must be arrays of strings
- Add example showing correct format
- Add trash-space command for deleting spaces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Document correct serialized_space format with ID requirements
- All items require 32-char hex UUID id field (uuid.uuid4().hex)
- Text fields (question, sql, content) must be arrays, not strings
- Fix CLI syntax: use title (not display_name), serialized_space (not table_identifiers)
- Add trash-space command documentation
- Remove redundant spaces.md file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create standalone compute.py with all logic inlined (no external deps)
- Filter clusters to UI/API sources only (interactive, human-created)
- Add page_size=100 for faster cluster listing
- Use proper SDK types (JobEnvironment, Environment, timedelta)
- Add integration tests for compute.py CLI
- Merge Genie conversation.md into SKILL.md
- Fix CLI commands in SKILL.md (databricks warehouses)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add CRITICAL widget version requirements table
- Document mandatory validation workflow (test queries before deploy)
- Fix CLI commands: discover-schema requires CATALOG.SCHEMA.TABLE format
- Fix lakeview create: use --display-name, --warehouse-id, --serialized-dashboard
- Add Genie space linking via uiSettings.genieSpace
- Add design best practices section
- Remove duplicate 3-examples.md (content in 4-examples.md)
- Update file references to match correct numbering

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Quick Reference table at top for common CLI commands
- Add Step 4 design phase with filter-to-dataset mapping
- Add filter scope rule to checklist (filters only affect datasets with field)
- Clarify percentage format (0-1 vs 0-100) with fix options
- Add data variance guidance for trend charts
- Condense expression examples using [option|option] notation
- Remove redundant ASCII workflow diagram (steps below are clearer)
- Link dataset parameters to filter widget documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Documents how to run unit and integration tests for skill scripts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant