Skip to content

refactor(databricks-devtools): replace MCP plugin with CLI-based skill - #511

Merged
baleen37 merged 2 commits into
mainfrom
refactor/databricks-devtools-to-skill-v2
Feb 20, 2026
Merged

refactor(databricks-devtools): replace MCP plugin with CLI-based skill#511
baleen37 merged 2 commits into
mainfrom
refactor/databricks-devtools-to-skill-v2

Conversation

@baleen37

@baleen37 baleen37 commented Feb 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • databricks-devtools MCP 플러그인(TypeScript 코드, 테스트, 빌드 설정 전체)을 제거하고 CLI 기반 skill로 대체
  • skills/using-databricks-explorer/SKILL.md를 MCP tool 호출 대신 databricks CLI + Statements API 직접 실행 방식으로 재작성
  • commands/databricks.explore.md slash command를 skill로 위임하도록 업데이트
  • docs/plugin-migration/databricks-devtools-README.md 제거

Changes

  • removed: plugins/databricks-devtools/ (plugin.json, .mcp.json, README, bun.lock, vitest.config)
  • removed: src/databricks-devtools/ (cli, config, sql, mcp TypeScript source)
  • removed: tests/databricks-devtools/ (all test files)
  • removed: docs/plugin-migration/databricks-devtools-README.md
  • updated: skills/using-databricks-explorer/SKILL.md — CLI-based rewrite
  • updated: commands/databricks.explore.md — delegates to skill

How it works now

Claude runs databricks CLI commands directly via Bash:

  1. Warehouse resolution: databricks warehouses list --output json --profile <name>
  2. SQL execution: databricks api post /api/2.0/sql/statements --json '...'

All 6 previous MCP tools map to SQL statements (SHOW CATALOGS, SHOW SCHEMAS, SHOW TABLES, DESCRIBE TABLE, DESCRIBE DETAIL, SELECT * LIMIT n).

Summary by CodeRabbit

  • Refactor

    • Restructured Databricks exploration workflow from MCP-based tools to Databricks CLI and Statements API approach
    • Updated documentation to reflect new warehouse resolution and SQL execution flow
  • Documentation

    • Simplified command reference and exploration guides with updated prerequisites and API workflows

@coderabbitai

coderabbitai Bot commented Feb 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@baleen37 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

This pull request deprecates the databricks-devtools MCP plugin by removing its complete implementation, configuration files, tests, and documentation. The using-databricks-explorer skill is refactored to describe executing SQL directly via Databricks CLI and Statements API instead of through MCP tools.

Changes

Cohort / File(s) Summary
Plugin Configuration & Metadata
plugins/databricks-devtools/.claude-plugin/plugin.json, plugins/databricks-devtools/.mcp.json, plugins/databricks-devtools/package.json
Removed plugin manifest, MCP server configuration, and package metadata for databricks-devtools.
Plugin Documentation
plugins/databricks-devtools/README.md, docs/plugin-migration/databricks-devtools-README.md
Deleted plugin documentation covering purpose, features, prerequisites, usage, tool interfaces, and development workflow.
Skill Documentation
commands/databricks.explore.md, skills/using-databricks-explorer/SKILL.md
Updated skill documentation to describe direct Databricks CLI and Statements API execution instead of MCP tool invocation; replaced tool signatures with SQL statements and warehouse resolution logic.
CLI Implementation
src/databricks-devtools/cli/runner.ts, src/databricks-devtools/cli/parser.ts, src/databricks-devtools/cli/index.ts
Removed CLI command execution module, output parsers (JSON, table, psql), and re-exports from index.
Configuration Modules
src/databricks-devtools/config/databrickscfg.ts, src/databricks-devtools/config/profiles.ts, src/databricks-devtools/config/types.ts, src/databricks-devtools/config/index.ts
Deleted Databricks config file parsing, profile resolution, type definitions, and module re-exports.
SQL Execution & MCP Server
src/databricks-devtools/sql/executor.ts, src/databricks-devtools/mcp/server.ts
Removed SQL statement executor (warehouse resolution, profile loading, error parsing) and complete MCP server implementation (tool definitions, handlers, stdio bootstrap).
Build Configuration
src/databricks-devtools/tsconfig.json, plugins/databricks-devtools/vitest.config.ts
Deleted TypeScript and Vitest configuration files for the plugin project.
Test Suites
tests/databricks-devtools/cli/*.test.ts, tests/databricks-devtools/config/*.test.ts, tests/databricks-devtools/mcp/server.test.ts, tests/databricks-devtools/sql/executor.test.ts, tests/databricks-devtools/*.test.ts
Removed all unit tests covering CLI runners and parsers, config parsing, MCP server tools, and SQL execution.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 The MCP tools once spoke with flair,
But CLI whispers fill the air,
We trade the server for simpler ground—
Direct to Databricks, SQL-bound.
A deprecation dance, now letting go,
The explorer skill will steal the show! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: replacing an MCP plugin implementation with a CLI-based skill, which is the primary objective of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/databricks-devtools-to-skill-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 merged commit 7fd06df into main Feb 20, 2026
4 checks passed
@baleen37
baleen37 deleted the refactor/databricks-devtools-to-skill-v2 branch February 20, 2026 07:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
skills/using-databricks-explorer/SKILL.md (1)

14-14: brew install databricks is macOS/Homebrew-only.

Linux and Windows users require different installation paths. Consider noting the official installation docs link, or using a platform-neutral phrasing.

✏️ Suggested update
-- `databricks` CLI installed (`brew install databricks`)
+- `databricks` CLI installed (see [Install the Databricks CLI](https://docs.databricks.com/dev-tools/cli/install.html))
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/using-databricks-explorer/SKILL.md` at line 14, Replace the macOS-only
installation hint "`databricks` CLI installed (`brew install databricks`)" in
SKILL.md with a platform-neutral instruction: state that the Databricks CLI must
be installed and link to the official installation docs (e.g., "See Databricks
CLI installation guide") and/or list common install commands for macOS, Linux,
and Windows (Homebrew, pip, Windows installer/winget) so non-mac users have
guidance; update the single-line bullet that currently contains the brew command
to this neutral phrasing and include the official docs URL.
commands/databricks.explore.md (1)

3-3: Stale description language — "SQL explorer tools" now refers to CLI/API, not MCP tools.

✏️ Suggested update
-description: Explore Databricks Unity Catalog schema with SQL explorer tools
+description: Explore Databricks Unity Catalog schema via the Databricks CLI and Statements API
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@commands/databricks.explore.md` at line 3, Update the stale description
string in the frontmatter: replace "SQL explorer tools" with wording that
reflects the CLI/API nature (e.g., "SQL explorer CLI/API" or "SQL explorer via
CLI/API") so the description line (the description field) reads something like
"Explore Databricks Unity Catalog schema with SQL explorer CLI/API" to
accurately reflect current tooling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/using-databricks-explorer/SKILL.md`:
- Around line 43-56: The skill currently only parses immediate POST responses
and doesn't handle async responses when "wait_timeout" expires; update the
Executing SQL section to detect when the POST response has status.state ==
"RUNNING" or "PENDING" and then poll the GET endpoint
/api/2.0/sql/statements/{statement_id} (using the returned statement_id) in a
loop with a short sleep (e.g., 2s) until status.state becomes "SUCCEEDED" or
"FAILED", then parse columns from manifest.schema.columns[] and rows from
result.data_array or errors from status.error.message; ensure the documentation
shows the GET call and the polling logic and where to extract statement_id,
status.state, manifest.schema.columns[].name/type_name, result.data_array, and
status.error.message.
- Around line 27-34: Replace the inline code spans that attempt to escape
backticks with double-backtick-delimited code spans so inner backticks are
preserved (e.g., use ``SHOW SCHEMAS IN `catalog` `` instead of `SHOW SCHEMAS IN
\`catalog\``), and update the examples that use the shorthand c.s.t (DESCRIBE
TABLE c.s.t, DESCRIBE DETAIL c.s.t, SELECT * FROM c.s.t LIMIT 10) to
consistently backtick-quote each identifier level (e.g.,
`catalog`.`schema`.`table`) to obey the "Always backtick-quote identifiers"
rule.

---

Nitpick comments:
In `@commands/databricks.explore.md`:
- Line 3: Update the stale description string in the frontmatter: replace "SQL
explorer tools" with wording that reflects the CLI/API nature (e.g., "SQL
explorer CLI/API" or "SQL explorer via CLI/API") so the description line (the
description field) reads something like "Explore Databricks Unity Catalog schema
with SQL explorer CLI/API" to accurately reflect current tooling.

In `@skills/using-databricks-explorer/SKILL.md`:
- Line 14: Replace the macOS-only installation hint "`databricks` CLI installed
(`brew install databricks`)" in SKILL.md with a platform-neutral instruction:
state that the Databricks CLI must be installed and link to the official
installation docs (e.g., "See Databricks CLI installation guide") and/or list
common install commands for macOS, Linux, and Windows (Homebrew, pip, Windows
installer/winget) so non-mac users have guidance; update the single-line bullet
that currently contains the brew command to this neutral phrasing and include
the official docs URL.

Comment on lines +27 to +34
| User target | SQL |
| --- | --- |
| *(no target)* | `list_catalogs` |
| `<catalog>` | `list_schemas(catalog)` |
| `<catalog>.<schema>` | `list_tables(catalog, schema)` |
| `<catalog>.<schema>.<table>` | `describe_table(table)` → `table_metadata(table)` → `preview_data(table)` |
| *(no target)* | `SHOW CATALOGS` |
| `<catalog>` | `SHOW SCHEMAS IN \`catalog\`` |
| `<catalog>.<schema>` | `SHOW TABLES IN \`catalog\`.\`schema\`` |
| `<catalog>.<schema>.<table>` | `DESCRIBE TABLE c.s.t` → `DESCRIBE DETAIL c.s.t` → `SELECT * FROM c.s.t LIMIT 10` |

If the user explicitly asks for only one output (for example, columns only), call only the relevant table-level tool.
Always backtick-quote identifiers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Backtick escape ``` inside code spans is a CommonMark violation (lines 30–31), and line 32 uses unquoted identifiers that contradict the "Always backtick-quote identifiers" rule.

Lines 30–31 — rendering bug: Per the CommonMark spec, "inside a backtick string, all backslashes are treated literally", so \`` does not escape a backtick inside a code span — it terminates the span early. For example, `` SHOW SCHEMAS IN `catalog``` renders as code span `` SHOW SCHEMAS IN \ `` followed by plain textcatalog``. The fix is to use double-backtick delimiters so the inner single backticks are treated as literal content.

Line 32 — quoting inconsistency: The c.s.t shorthand is unquoted, directly contradicting the "Always backtick-quote identifiers" instruction two lines below. Claude may use this table as a reference template and omit backtick quoting for multi-level targets.

✏️ Proposed fix for lines 30–32
-| `<catalog>` | `SHOW SCHEMAS IN \`catalog\`` |
-| `<catalog>.<schema>` | `SHOW TABLES IN \`catalog\`.\`schema\`` |
-| `<catalog>.<schema>.<table>` | `DESCRIBE TABLE c.s.t` → `DESCRIBE DETAIL c.s.t` → `SELECT * FROM c.s.t LIMIT 10` |
+| `<catalog>` | `` SHOW SCHEMAS IN `catalog` `` |
+| `<catalog>.<schema>` | `` SHOW TABLES IN `catalog`.`schema` `` |
+| `<catalog>.<schema>.<table>` | `` DESCRIBE TABLE `c`.`s`.`t` `` → `` DESCRIBE DETAIL `c`.`s`.`t` `` → `` SELECT * FROM `c`.`s`.`t` LIMIT 10 `` |

As per coding guidelines, Markdown files should pass markdownlint validation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/using-databricks-explorer/SKILL.md` around lines 27 - 34, Replace the
inline code spans that attempt to escape backticks with
double-backtick-delimited code spans so inner backticks are preserved (e.g., use
``SHOW SCHEMAS IN `catalog` `` instead of `SHOW SCHEMAS IN \`catalog\``), and
update the examples that use the shorthand c.s.t (DESCRIBE TABLE c.s.t, DESCRIBE
DETAIL c.s.t, SELECT * FROM c.s.t LIMIT 10) to consistently backtick-quote each
identifier level (e.g., `catalog`.`schema`.`table`) to obey the "Always
backtick-quote identifiers" rule.

Comment on lines +43 to +56
```bash
databricks api post /api/2.0/sql/statements \
--profile <profile> \
--json '{
"statement": "<SQL>",
"warehouse_id": "<warehouse_id>",
"wait_timeout": "30s"
}'
```

- Treat `/databricks:explore` as the command prefix only.
- Parse the remaining token as target shape: *(none)*, `<catalog>`, `<catalog>.<schema>`, or `<catalog>.<schema>.<table>`.
- Execute MCP tools directly from target shape; do not re-invoke slash command as a skill.
Parse result from:
- columns: `manifest.schema.columns[].name`, `manifest.schema.columns[].type_name`
- rows: `result.data_array`
- error: `status.error.message` when `status.state == "FAILED"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

No handling for the async case when wait_timeout expires.

By default, after 10 seconds, if the SQL statement has not yet finished executing through the warehouse, the Databricks SQL Statement Execution API returns only the SQL statement ID and its current status, instead of the statement's result. With wait_timeout: "30s", any query that takes longer than 30s — plausible on a cold warehouse for even a simple SELECT * LIMIT 10 — will return status.state == "RUNNING" or "PENDING" with no data. The skill gives Claude no guidance for this case.

If the POST call returns a pending state, the statement_id from the JSON response should be used to make a GET call to /api/2.0/sql/statements/{statement_id} in a loop, waiting between each call, until the status returns as succeeded or failed.

Consider adding a "Polling" subsection or a note under "Executing SQL":

If `status.state` is `"RUNNING"` or `"PENDING"` after the POST, poll until complete:

```bash
databricks api get /api/2.0/sql/statements/<statement_id> --profile <profile>

Repeat with a short sleep (e.g. 2s) until status.state is "SUCCEEDED" or "FAILED".


<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @skills/using-databricks-explorer/SKILL.md around lines 43 - 56, The skill
currently only parses immediate POST responses and doesn't handle async
responses when "wait_timeout" expires; update the Executing SQL section to
detect when the POST response has status.state == "RUNNING" or "PENDING" and
then poll the GET endpoint /api/2.0/sql/statements/{statement_id} (using the
returned statement_id) in a loop with a short sleep (e.g., 2s) until
status.state becomes "SUCCEEDED" or "FAILED", then parse columns from
manifest.schema.columns[] and rows from result.data_array or errors from
status.error.message; ensure the documentation shows the GET call and the
polling logic and where to extract statement_id, status.state,
manifest.schema.columns[].name/type_name, result.data_array, and
status.error.message.


</details>

<!-- fingerprinting:phantom:triton:churro -->

<!-- This is an auto-generated comment by CodeRabbit -->

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