-
Notifications
You must be signed in to change notification settings - Fork 118
[DRAFT] Improve experimental aitools #3989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lennartkats-db
wants to merge
15
commits into
main
Choose a base branch
from
improve-aitools
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Track the upstream source of CLI invocations from the aitools MCP server by setting DATABRICKS_CLI_UPSTREAM=aitools when invoking databricks commands. This required adding WithEnv() method to libs/exec.Executor to support custom environment variables.
Make the init_project, add_project_resource, and analyze_project tools more discoverable by adding MANDATORY prefix to their descriptions. This emphasizes to AI agents that these are the primary tools for working with Databricks projects.
The 'claude mcp add' command defaults to --scope local which installs the MCP server only for the current project directory. This caused the aitools server to be unavailable in other projects. Changed to explicitly use --scope user to install globally, making the MCP server available in all projects. Also made installation reentrant by ignoring 'already exists' errors.
Clarify that Statement Execution API works synchronously for fast queries on running warehouses, but requires polling when warehouse is starting or query takes > 50 seconds. Added clear instructions for handling both SUCCEEDED and PENDING responses, with polling pattern for async queries. Kept guidance concise for context efficiency.
Problem: AI agents in plan mode weren't using init_project and add_project_resource tools. They'd manually create databricks.yml files instead, missing templates and best practices.
Root cause: Tools spoke in execution language ("Use this to create...") but plan mode requires planning language ("Include this when planning..."). The explore tool also had narrow triggers ("when user mentions workspace name").
Solution:
- Broaden explore description: "REQUIRED DURING PLAN MODE" for ANY Databricks work
- Enhance explore output with workflow patterns and keyword matching
- Add "📋 DURING PLAN MODE:" sections to tool descriptions with customer-facing triggers
- Use customer language: "Databricks project/app/pipeline" not "DAB/Asset Bundle"
Pattern matching now maps task language to tools:
- "new project" → init_project
- "SQL pipeline" → add_project_resource type='pipeline'
- "deploy to dev and prod" → init_project (multi-environment setup)
Zero-cost solution: Static guidance presented at natural checkpoints, no agent calls needed.
This reverts commit 28b691f.
…tion The check was defensive but not needed - if mcp add fails, it should fail with a clear error message rather than being silently ignored.
The explore tool now gracefully handles warehouse lookup failures by: - Continuing with nil warehouse instead of failing completely - Conditionally displaying warehouse info in template - Using placeholder in SQL examples when warehouse unavailable Also removes unused strings import from claude.go. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add workspace_info tool to get workspace details - Improve explore and analyze_project prompts - Update server to include new tool 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Collaborator
|
Commit: d16cb3d
20 failing tests:
Top 50 slowest tests (at least 2 minutes):
|
- Remove unnecessary fmt.Sprintf() calls for plain strings - Remove unused getAvailableProfiles() function - Remove unused profile import 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
workspace_infotool