feat(mason): add code-first tool integrations - #509
Open
junchoi-db wants to merge 5 commits into
Open
Conversation
junchoi-db
force-pushed
the
feat/code-first-tool-integrations
branch
from
September 2, 2026 19:06
67003a6 to
ec62704
Compare
junchoi-db
commented
Sep 2, 2026
junchoi-db
commented
Sep 2, 2026
junchoi-db
commented
Sep 2, 2026
junchoi-db
commented
Sep 2, 2026
junchoi-db
commented
Sep 2, 2026
junchoi-db
commented
Sep 2, 2026
…integrations # Conflicts: # integrations/mason/README.md # integrations/mason/pyproject.toml # integrations/mason/src/databricks_mason/init.py # integrations/mason/src/databricks_mason/openai/__init__.py # integrations/mason/src/databricks_mason/openai/mcp.py # integrations/mason/src/databricks_mason/tools.py # integrations/mason/tests/unit_tests/init_test.py # integrations/mason/tests/unit_tests/tools_test.py
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
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.
What
agent.tomlas Mason's agent/tool source of truth and replace it with an ordinary, non-executedDATABRICKS_TOOLSPython registry.mason tools add sandbox|mcp|uc-functionandtools listfor Databricks-managed integrations, with exact definition/attachment line output and--frameworksupport for BYO projects.Runtime contract
The adapters preserve customer-authored tools and MCP servers, enforce Sandbox downscoping, propagate account-host workspace routing, and fail closed on deterministic server/tool-name collisions. The legacy
mcp_tools()API now raises migration guidance instead of silently dropping manifest selections.For a custom Python tool, the CUJ remains ordinary framework-native code:
The template's
all_tools()auto-discovers that file; there is no second registry entry ormason tools add pythonstep.Verification
Latest-main merge and review-fix verification at
5fdb7d4:highestandlowest-directdependency resolution: 260 passed each.ruff check,ruff format --check, andty check: passed.agent/databricks_tools.pyand binds once instream_handler; synchronous invocations delegate through that same path.mason tools addexposes exactlysandbox,mcp, anduc-function.Original implementation verification:
lowest-directCI command: 258 passed.highestCI command: 258 passed.Manual dual-framework E2E (2026-09-02)
Open the HTML CUJ report
Published SHA-256:
96c81ffb1ea7d6658bc524a8aee99b31abe036abdf72fad7ad99868b7d8fcbff(dogfood round trip byte-identical).init→tools add sandbox→ source verification →tools list→mason dev→ realcurl→mason deploy→ OAuthcurl.tools addchanged only each Python Databricks integration registry. Required agent-behavior edits: 0 for both Mason-owned templates; their agent construction files remained byte-identical.run_code, observed[[21932]]forsamples.nyctaxi.trips, and answered 21,932. OpenAI streams terminated with[DONE].0.1.1.dev0artifact that lacks the new integration module, and Mason does not resolve/provision the OpenAI template's namedexperimentresource fordev/deploy.Design
https://docs.google.com/document/d/10CMZsRDribahRvUoZKcyM5uvGOUW-dTapZrAZXgyNDs/edit?tab=t.0
This pull request and its description were written by Isaac.