Skip to content

Add non-interactive aitools mcp add behind a hidden group - #7544

Merged
simonfaltum merged 1 commit into
mainfrom
aitools-mcp/04-add
Nov 19, 2026
Merged

simonfaltum merged 1 commit into
mainfrom
aitools-mcp/04-add

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This pull request is part of the stack that adds the hidden databricks aitools mcp command group. It builds on #7537 and adds aitools mcp add, which installs Databricks managed MCP servers into coding agents non-interactively, bound to one CLI profile.

Changes

  • aitools mcp add --names ... --agents ... installs full names (system.ai.github) or leaf names into the named agents, or into every detected agent without --agents. Leaf names resolve in --location, which defaults to system.ai or to the one schema the full names share. A leaf next to full names outside system.ai is refused.
  • Refusals that need no request come first: flags, unknown or non-MCP agents, the binary name, a profile that is missing, has no host, or is account-level (refused before any credential is sent), a server whose profile changed, and a name held by another server or by an entry this CLI did not write, unless --force.
  • A named agent that is not installed is refused. InstalledForMCP counts an agent as installed when its config directory, skills, MCP file or a binary on PATH is present. A home variable (CODEX_HOME, COPILOT_HOME, CLAUDE_CONFIG_DIR, GEMINI_CLI_HOME, XDG_CONFIG_HOME) set away from its default leaves only the MCP file's directory to count.
  • --name and stored names over 32 characters (mcp.MaxServerNameLen) are refused, as are invalid names.
  • A name conflict refuses the run for a named agent, and fails only that agent for a detected one. An agent that already holds the server's binding under another name refuses the run either way, since a second entry would run the same server twice; the error says which entry to remove or rename.
  • Entries run databricks aitools mcp serve, with DATABRICKS_CONFIG_FILE pinned when it is set. The binary path comes from argv at run time, made absolute when possible. When PATH finds it only in the working directory (exec.ErrDot, which Windows returns), the running executable's absolute path is used. Otherwise the output notes that agents must find databricks on PATH.
  • A sole profile whose host names its workspace in ?w= is auto-detected. On Windows, a drive-relative path is refused unless it is on the working directory's drive.
  • The read-only refusal suggests --agents only for named agents. A successful add prints the service's note, if it has one.

Why

Coding agents cannot use Databricks managed MCP servers yet. The state and agent-config writers from the earlier PRs need a command that calls them. The group stays hidden until serve lands, so no release ships an entry that cannot start.

Decisions to review

  • A conflict in a detected agent skips that agent for one server, and the run continues. Cost: no top-level error for it. add still fails when a requested service reaches no agent.
  • A missing or host-less profile is refused by the check serve runs, so both commands print the same text. Without an install record it names the service and how to set it up, with no remove hint.
  • UNKNOWN_AGENT covers a known agent that is not installed. No telemetry category fits.
  • A stored name held by another state entry has no --force override.
  • An agent whose binary is on PATH counts as installed, so add creates its config directory on the first write.
  • A server whose profile changed is refused, never rebound.

How to review

Refactors, no behavior change: Bind is split into CheckBinding, BoundConfig and AuthenticateBound (libs/aitools/mcp/binding.go). The exported helpers are ResolveConfigFile and AbsoluteAsWritten (configfile.go), ErrProfileMissing (state.go), SystemAILocation (known.go), and mcpconfig.EnvKeys (mcpconfig/spec.go).

New behavior, to read closely: FindEntry (binding.go), now exported, matches services ignoring case, as Unity Catalog names do, and Bind inherits that; cmd/aitools/mcp_add.go (planAdds, chooseName, locationOf, agentFailureError), libs/aitools/agents/agents.go (InstalledForMCP, mcpHomeMoved), cmd/aitools/mcp.go (mcpWorkspaceProfile), and the drive-relative rule in AbsoluteAsWritten.

Tests

  • Unit, cmd/aitools: name planning and conflicts, refusals before any request, recording when one server fails, distinct agent failures, and which agents count as installed.
  • Unit, libs/aitools: the MCP-home presence rule, the profile check with no entry, and EntryEnv.
  • Acceptance acceptance/cmd/aitools/mcp/: two services and agents, text and JSON output, two profiles, an unparsable config, an uninstalled agent, and the hidden group.
  • go test -race on cmd/aitools and libs/aitools, the aitools acceptance tests, GOOS=windows go vet, golangci-lint and ./task checks pass.
  • Not tested: serve (a later PR), the picker, and real agent processes.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 742a896be | Workflow run

Regression test report

Selected 9 changed tests (limit=20, 0 not selected)

9 tests: regression=9 unreleased=0 coverage=0 failing=0
test branch main (a96c087) latest (v1.27.0)
TestAccept/cmd/aitools/mcp/add-agent-not-installed ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-default-config ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-name-notices ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-text ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-two-agents ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-two-profiles ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-unknown-profile ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-unparsable-config ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/hidden ✅ ❌ ❌
TestAccept/cmd/aitools/mcp/add-agent-not-installed: branch ✅ | main (a96c087) ❌ | latest (v1.27.0) ❌

main (a96c087):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed1876790167/002/output.txt
        @@ -2,40 +2,60 @@
         === An agent named with --agents that is not installed is refused; the installed agent still gets the server, and the command exits non-zero
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code,antigravity --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "antigravity",
        -          "status": "failed",
        -          "error_category": "UNKNOWN_AGENT",
        -          "message": "Antigravity is not installed; install it first or leave it out of --agents"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
         === Nothing was created for Antigravity
         
         >>> ls -A home
         .claude
        -.claude.json
        -.databricks
         
         === With no installed agent named, the command is refused before any request, and the text output says what to do
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents antigravity
        -Error: Antigravity is not installed; install it first or leave it out of --agents
        +Error: unknown flag: --names
        +
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:02.777935681Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736e-f9ee-db67-7a0e-736ef9eedc74",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-agent-not-installed/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-agent-not-installed2142432238/002/output.txt
        @@ -2,40 +2,61 @@
         === An agent named with --agents that is not installed is refused; the installed agent still gets the server, and the command exits non-zero
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code,antigravity --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "antigravity",
        -          "status": "failed",
        -          "error_category": "UNKNOWN_AGENT",
        -          "message": "Antigravity is not installed; install it first or leave it out of --agents"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
         === Nothing was created for Antigravity
         
         >>> ls -A home
         .claude
        -.claude.json
         .databricks
         
         === With no installed agent named, the command is refused before any request, and the text output says what to do
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents antigravity
        -Error: Antigravity is not installed; install it first or leave it out of --agents
        +Error: unknown flag: --names
        +
        +Usage:
        +  databricks aitools [command]
        +
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
        +
        +Flags:
        +  -h, --help[=true|false]   help for aitools
        +
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
        +
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:05.971429858Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-b847-b5e5-7a0e-736fb847b6f6",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
TestAccept/cmd/aitools/mcp/add-default-config: branch ✅ | main (a96c087) ❌ | latest (v1.27.0) ❌

main (a96c087):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-default-config/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-default-config4148955107/002/output.txt
        @@ -2,22 +2,29 @@
         === Without DATABRICKS_CONFIG_FILE the server is added for the default config file
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        +Usage:
        +  databricks aitools [command]
         
        -=== Claude Code config has no pinned variables for the server
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        ->>> gron.py home/.claude.json
        -json.mcpServers.genie_one_mcp-logfood.env = {};
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        -=== State holds the binding with no config file
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        ->>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json
        -{
        -  "name": "genie_one_mcp-logfood",
        -  "profile": "logfood",
        -  "config_file": ""
        -}
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:03.306322331Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-196d-656a-7a0e-736f196d667f",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
FAIL

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-default-config/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-default-config1411910413/002/output.txt
        @@ -2,22 +2,29 @@
         === Without DATABRICKS_CONFIG_FILE the server is added for the default config file
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp --agents claude-code
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        +Usage:
        +  databricks aitools [command]
         
        -=== Claude Code config has no pinned variables for the server
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        ->>> gron.py home/.claude.json
        -json.mcpServers.genie_one_mcp-logfood.env = {};
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        -=== State holds the binding with no config file
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        ->>> jq .mcp.servers[] | {name, profile, config_file} home/.databricks/aitools/skills/.state.json
        -{
        -  "name": "genie_one_mcp-logfood",
        -  "profile": "logfood",
        -  "config_file": ""
        -}
        +Use "databricks aitools [command] --help" for more information about a command.
        +
        +
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:06.747310235Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-e686-b2d6-7a0e-736fe686b4c6",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
TestAccept/cmd/aitools/mcp/add-name-notices: branch ✅ | main (a96c087) ❌ | latest (v1.27.0) ❌

main (a96c087):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices1784147842/002/output.txt
        @@ -2,34 +2,29 @@
         === A generated name that an entry this CLI did not write holds gets a suffix, and the output says who holds the base name
         
         >>> [CLI] aitools mcp add --profile dogfood --names genie_one_mcp --agents cursor
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-dogfood-2  system.ai.genie_one_mcp
        -  genie_one_mcp-dogfood is taken in Cursor; using genie_one_mcp-dogfood-2
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -Cursor may ask you to approve genie_one_mcp-dogfood-2. Run: cursor-agent mcp enable genie_one_mcp-dogfood-2 (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -=== --force replaces the user's own entry, and the output says so
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> [CLI] aitools mcp add --profile dogfood --names dbsql --name user-server --agents cursor --force
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        -user-server  system.ai.dbsql
        -  replaced user-server in Cursor (not written by this CLI)
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  Needs an account admin to turn on the Enhanced Unity Gateway preview.
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -Cursor may ask you to approve user-server. Run: cursor-agent mcp enable user-server (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
         
        -=== The user's entry that was not replaced is intact
        -
        ->>> jq .mcpServers["genie_one_mcp-dogfood"] home/.cursor/mcp.json
        -{
        -  "command": "users-own",
        -  "args": [
        -    "users-own"
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-dbsql-dogfood: {
        LOG.create-dbsql-dogfood:   "comment": "Query your SQL warehouses",
        LOG.create-dbsql-dogfood:   "create_time": "2026-11-19T13:14:03.235890694Z",
        LOG.create-dbsql-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "metastore_id": "7a0e736f-153a-b12b-7a0e-736f153ab253",
        LOG.create-dbsql-dogfood:   "name": "mcp-services/system.ai.dbsql",
        LOG.create-dbsql-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-dbsql-dogfood: }
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-dogfood: {
        LOG.create-genie_one_mcp-dogfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-dogfood:   "create_time": "2026-11-19T13:14:03.213969662Z",
        LOG.create-genie_one_mcp-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "metastore_id": "7a0e736f-13ec-355b-7a0e-736f13ec3677",
        LOG.create-genie_one_mcp-dogfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-dogfood: }

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-name-notices/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-name-notices3661077296/002/output.txt
        @@ -2,34 +2,29 @@
         === A generated name that an entry this CLI did not write holds gets a suffix, and the output says who holds the base name
         
         >>> [CLI] aitools mcp add --profile dogfood --names genie_one_mcp --agents cursor
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-dogfood-2  system.ai.genie_one_mcp
        -  genie_one_mcp-dogfood is taken in Cursor; using genie_one_mcp-dogfood-2
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -Cursor may ask you to approve genie_one_mcp-dogfood-2. Run: cursor-agent mcp enable genie_one_mcp-dogfood-2 (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -=== --force replaces the user's own entry, and the output says so
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> [CLI] aitools mcp add --profile dogfood --names dbsql --name user-server --agents cursor --force
        -Profile dogfood ([DATABRICKS_URL])
        -Agents (named with --agents): cursor
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        -user-server  system.ai.dbsql
        -  replaced user-server in Cursor (not written by this CLI)
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  Needs an account admin to turn on the Enhanced Unity Gateway preview.
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -Cursor may ask you to approve user-server. Run: cursor-agent mcp enable user-server (`agent` in the Cursor docs), or approve it in Cursor's MCP settings.
         
        -=== The user's entry that was not replaced is intact
        -
        ->>> jq .mcpServers["genie_one_mcp-dogfood"] home/.cursor/mcp.json
        -{
        -  "command": "users-own",
        -  "args": [
        -    "users-own"
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-dbsql-dogfood: {
        LOG.create-dbsql-dogfood:   "comment": "Query your SQL warehouses",
        LOG.create-dbsql-dogfood:   "create_time": "2026-11-19T13:14:06.779921465Z",
        LOG.create-dbsql-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-dbsql-dogfood:   "metastore_id": "7a0e736f-e878-5005-7a0e-736fe8785129",
        LOG.create-dbsql-dogfood:   "name": "mcp-services/system.ai.dbsql",
        LOG.create-dbsql-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-dbsql-dogfood: }
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-dogfood: {
        LOG.create-genie_one_mcp-dogfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-dogfood:   "create_time": "2026-11-19T13:14:06.760998869Z",
        LOG.create-genie_one_mcp-dogfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-dogfood:   "metastore_id": "7a0e736f-e757-933f-7a0e-736fe7579465",
        LOG.create-genie_one_mcp-dogfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-dogfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-dogfood: }
FAIL
TestAccept/cmd/aitools/mcp/add-text: branch ✅ | main (a96c087) ❌ | latest (v1.27.0) ❌

main (a96c087):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text2296097082/002/output.txt
        @@ -2,75 +2,29 @@
         === Text output: Cursor approval hint, and the sign-in step for github
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -github-logfood  system.ai.github
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -Cursor may ask you to approve genie_one_mcp-logfood, github-logfood. Run cursor-agent mcp enable <name> for each (`agent` in the Cursor docs), or approve them in Cursor's MCP settings.
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        -=== Running it again re-asserts the entries, and nothing is written twice
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        ->>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
         
        -github-logfood  system.ai.github
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        -
        -=== Cursor config
        -
        ->>> cat home/.cursor/mcp.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    }
        -  }
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:03.089895102Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-0c86-f9b5-7a0e-736f0c86faec",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1166: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
        LOG.create-github-logfood:   },
        LOG.create-github-logfood:   "create_time": "2026-11-19T13:14:03.115221722Z",
        LOG.create-github-logfood:   "created_by": "tester@databricks.com",
        LOG.create-github-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-github-logfood:   "metastore_id": "7a0e736f-0e09-6e23-7a0e-736f0e096fdf",
        LOG.create-github-logfood:   "name": "mcp-services/system.ai.github",
        LOG.create-github-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-github-logfood: }

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-text/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-text290235765/002/output.txt
        @@ -2,75 +2,29 @@
         === Text output: Cursor approval hint, and the sign-in step for github
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Error: unknown flag: --names
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        +Usage:
        +  databricks aitools [command]
         
        -github-logfood  system.ai.github
        -  claude-code  installed  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       installed  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -Cursor may ask you to approve genie_one_mcp-logfood, github-logfood. Run cursor-agent mcp enable <name> for each (`agent` in the Cursor docs), or approve them in Cursor's MCP settings.
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        -=== Running it again re-asserts the entries, and nothing is written twice
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        ->>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,cursor
        -Profile logfood ([DATABRICKS_URL])
        -Agents (named with --agents): claude-code, cursor
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -genie_one_mcp-logfood  system.ai.genie_one_mcp
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
         
        -github-logfood  system.ai.github
        -  claude-code  already installed, re-asserted  [TEST_TMP_DIR]/home/.claude.json
        -  cursor       already installed, re-asserted  [TEST_TMP_DIR]/home/.cursor/mcp.json
        -  system.ai.github needs sign-in. Run: databricks aitools mcp login system.ai.github --profile logfood
        -  Public repositories only until a repository owner installs https://github.com/apps/databricks-github-connector (on AWS GovCloud, https://github.com/apps/databricks-gh-connector-gov-cloud).
        -
        -=== Cursor config
        -
        ->>> cat home/.cursor/mcp.json
        -{
        -  "mcpServers": {
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "cursor"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      }
        -    }
        -  }
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:06.621705234Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-df0a-1edf-7a0e-736fdf0a208e",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1166: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
        LOG.create-github-logfood:   },
        LOG.create-github-logfood:   "create_time": "2026-11-19T13:14:06.636828686Z",
        LOG.create-github-logfood:   "created_by": "tester@databricks.com",
        LOG.create-github-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-github-logfood:   "metastore_id": "7a0e736f-dff0-e39b-7a0e-736fdff0e4af",
        LOG.create-github-logfood:   "name": "mcp-services/system.ai.github",
        LOG.create-github-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-github-logfood: }
TestAccept/cmd/aitools/mcp/add-two-agents: branch ✅ | main (a96c087) ❌ | latest (v1.27.0) ❌

main (a96c087):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-two-agents/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-two-agents1930669451/002/output.txt
        @@ -2,156 +2,29 @@
         === Two services for two agents, as JSON
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        }
        -      ]
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "sign_in_required": true,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== Claude Code config keeps the entries it already had and gets ours
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "my-server": {
        -      "type": "stdio",
        -      "command": "my-server",
        -      "args": []
        -    },
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    }
        -  }
        -}
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -=== Codex config
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> cat home/.codex/config.toml
        -[mcp_servers.genie_one_mcp-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.genie_one_mcp", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.genie_one_mcp-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        -[mcp_servers.github-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.github", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.github-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -=== State records the binding, without the time and CLI version
         
        ->>> jq .mcp | del(.servers[].installed_at, .servers[].cli_version) home/.databricks/aitools/skills/.state.json
        -{
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": false,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": true,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    }
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:03.156539710Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-107f-e42d-7a0e-736f107fe5f2",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1166: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
... (8 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- cmd/aitools/mcp/add-two-agents/output.txt
        +++ /tmp/TestAcceptcmdaitoolsmcpadd-two-agents1547222366/002/output.txt
        @@ -2,156 +2,29 @@
         === Two services for two agents, as JSON
         
         >>> [CLI] aitools mcp add --profile logfood --names system.ai.genie_one_mcp,system.ai.github --agents claude-code,codex --output json
        -{
        -  "profile": "logfood",
        -  "host": "[DATABRICKS_URL]",
        -  "scope": "global",
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "sign_in_required": false,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        }
        -      ]
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "sign_in_required": true,
        -      "agents": [
        -        {
        -          "name": "claude-code",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.claude.json"
        -        },
        -        {
        -          "name": "codex",
        -          "status": "installed",
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml"
        -        }
        -      ]
        -    }
        -  ]
        -}
        +Error: unknown flag: --names
         
        -=== Claude Code config keeps the entries it already had and gets ours
        +Usage:
        +  databricks aitools [command]
         
        ->>> cat home/.claude.json
        -{
        -  "mcpServers": {
        -    "my-server": {
        -      "type": "stdio",
        -      "command": "my-server",
        -      "args": []
        -    },
        -    "genie_one_mcp-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.genie_one_mcp",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    },
        -    "github-logfood": {
        -      "args": [
        -        "aitools",
        -        "mcp",
        -        "serve",
        -        "--profile",
        -        "logfood",
        -        "--service",
        -        "system.ai.github",
        -        "--agent",
        -        "claude-code"
        -      ],
        -      "command": "[CLI]",
        -      "env": {
        -        "DATABRICKS_CONFIG_FILE": "[TEST_TMP_DIR]/.databrickscfg"
        -      },
        -      "type": "stdio"
        -    }
        -  }
        -}
        +Available Commands:
        +  auto-install Turn the automatic installation of Databricks AI tools on or off
        +  install      Install Databricks skills and plugins for coding agents
        +  list         List installed skills and plugins
        +  uninstall    Uninstall Databricks skills and plugins
        +  update       Update installed skills and plugins
        +  version      Show installed skills and plugins version
         
        -=== Codex config
        +Flags:
        +  -h, --help[=true|false]   help for aitools
         
        ->>> cat home/.codex/config.toml
        -[mcp_servers.genie_one_mcp-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.genie_one_mcp", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.genie_one_mcp-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Global Flags:
        +      --debug[=true|false]   enable debug logging
        +  -o, --output type          output type: text or json (default text)
        +  -p, --profile string       ~/.databrickscfg profile
        +  -t, --target string        bundle target to use (if applicable)
         
        -[mcp_servers.github-logfood]
        -args = ["aitools", "mcp", "serve", "--profile", "logfood", "--service", "system.ai.github", "--agent", "codex"]
        -command = "[CLI]"
        -[mcp_servers.github-logfood.env]
        -DATABRICKS_CONFIG_FILE = "[TEST_TMP_DIR]/.databrickscfg"
        +Use "databricks aitools [command] --help" for more information about a command.
         
        -=== State records the binding, without the time and CLI version
         
        ->>> jq .mcp | del(.servers[].installed_at, .servers[].cli_version) home/.databricks/aitools/skills/.state.json
        -{
        -  "servers": [
        -    {
        -      "name": "genie_one_mcp-logfood",
        -      "service": "system.ai.genie_one_mcp",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": false,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    },
        -    {
        -      "name": "github-logfood",
        -      "service": "system.ai.github",
        -      "profile": "logfood",
        -      "host": "[DATABRICKS_URL]",
        -      "workspace_id": "[WORKSPACE_ID]",
        -      "sign_in_required": true,
        -      "command": "[CLI]",
        -      "config_file": "[TEST_TMP_DIR]/.databrickscfg",
        -      "agents": {
        -        "claude-code": {
        -          "path": "[TEST_TMP_DIR]/home/.claude.json",
        -          "scope": "user"
        -        },
        -        "codex": {
        -          "path": "[TEST_TMP_DIR]/home/.codex/config.toml",
        -          "scope": "user"
        -        }
        -      }
        -    }
        -  ]
        -}
        +Exit code: 1
        
    acceptance_test.go:1166: 
        LOG.create-genie_one_mcp-logfood: {
        LOG.create-genie_one_mcp-logfood:   "comment": "Ask questions about your data",
        LOG.create-genie_one_mcp-logfood:   "create_time": "2026-11-19T13:14:06.355155132Z",
        LOG.create-genie_one_mcp-logfood:   "created_by": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "effective_owner": "tester@databricks.com",
        LOG.create-genie_one_mcp-logfood:   "metastore_id": "7a0e736f-cf26-e403-7a0e-736fcf26e55b",
        LOG.create-genie_one_mcp-logfood:   "name": "mcp-services/system.ai.genie_one_mcp",
        LOG.create-genie_one_mcp-logfood:   "updated_by": "tester@databricks.com"
        LOG.create-genie_one_mcp-logfood: }
    acceptance_test.go:1166: 
        LOG.create-github-logfood: {
        LOG.create-github-logfood:   "comment": "Repositories, issues, pull requests",
        LOG.create-github-logfood:   "config": {
        LOG.create-github-logfood:     "source_connection": {
        LOG.create-github-logfood:       "name": "connections/github",
        LOG.create-github-logfood:       "options": {
        LOG.create-github-logfood:         "oauth_provider": "OAUTH_PROVIDER_GITHUB_MCP"
        LOG.create-github-logfood:       }
        LOG.create-github-logfood:     }
... (8 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

4 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 742a896

Run: 44530391244

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 28 9:57
💚​ aws-windows-latest-4core-16gb 1 274 26 6:31
💚​ azure linux-2core-8gb 1 271 28 10:15
💚​ azure-windows-latest-4core-16gb 1 273 26 6:21
💚​ gcp linux-2core-8gb 1 272 28 10:15
💚​ gcp-windows-latest-4core-16gb 1 274 26 6:39
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 11 slowest tests (at least 2 minutes):
duration env testname
4:26 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
3:53 gcp-windows-latest-4core-16gb TestAccept
3:37 aws-windows-latest-4core-16gb TestAccept
3:30 azure-windows-latest-4core-16gb TestAccept
2:23 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:20 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:17 azure-windows-latest-4core-16gb TestSyncIncrementalFileSync
2:16 gcp-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
2:14 aws linux-2core-8gb TestImportDirDoesNotOverwrite
2:10 azure linux-2core-8gb TestSyncFullFileSync
2:08 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir

@simonfaltum
simonfaltum force-pushed the aitools-mcp/04-add branch 3 times, most recently from f3c3d22 to 182ccf9 Compare November 12, 2026 19:33
@pietern pietern added the aitools AI tools (databricks aitools) related changes label Nov 16, 2026
@simonfaltum
simonfaltum force-pushed the aitools-mcp/04-add branch 2 times, most recently from 113a0d4 to 2ad5e5b Compare November 17, 2026 10:52
@simonfaltum
simonfaltum marked this pull request as ready for review November 18, 2026 16:20
@simonfaltum
simonfaltum requested review from a team and lennartkats-db as code owners November 18, 2026 16:20

@review-oss-bot review-oss-bot 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.

Looks good to me — no issues found.

@anton-107 anton-107 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving. Nothing blocking in what this PR adds on top of aitools-mcp/03-state. I read the diff and ran the unit tests and the aitools acceptance tests on 2c5b663; both pass. I also tried a few extra cases with a built binary: the state file deleted, an entry renamed by hand, detected agents, and a missing default config file.

Non-blocking notes:

  1. The description puts FindEntry under "Refactors, no behavior change", but it now compares services with strings.EqualFold (libs/aitools/mcp/binding.go), and Bind inherits that. It belongs under new behavior.
  2. "A conflict in a detected agent fails only that agent" doesn't cover agents that hold the binding under two names. That case still refuses the whole run without --agents. I tried it: renamed the Cursor entry, deleted the state, ran with detected agents. The message says what to do, so this may be intended. If so, the description could say so.
  3. In detected mode, a binary on PATH is enough for a config to be written. A stub gemini on PATH created ~/.gemini/settings.json, and the codex on my own PATH was picked up too. It's a listed decision, but it's the one I'd look at again before the group is unhidden.
  4. Windows, not verified: exec.LookPath returns ErrDot for a binary found only in the working directory. So running databricks from the folder of an unzipped databricks.exe writes the bare name, and the agent can't start it unless databricks is on PATH. The note is printed. An os.Executable() fallback for just that case might be worth it.

@simonfaltum

Copy link
Copy Markdown
Member Author

Thanks!

  1. The description lists FindEntry under new behavior now, with the case-insensitive match that Bind inherits.
  2. Yes, that's intended: an agent that already holds the binding under another name refuses the run even when it was detected, since a second entry would run the same server twice. The description says so now.
  3. Agreed, that's the decision to revisit before the group is unhidden.
  4. 3a2b3bf: when PATH finds the binary only in the working directory (exec.ErrDot), the entry gets the running executable's absolute path from os.Executable(). Other paths are unchanged, and the PATH note still prints only when the entry keeps the bare name.

@simonfaltum
simonfaltum force-pushed the aitools-mcp/03-state branch 2 times, most recently from 5191786 to 01d1905 Compare November 19, 2026 12:33
@simonfaltum
simonfaltum requested a review from a team as a code owner November 19, 2026 12:33
Base automatically changed from aitools-mcp/03-state to main November 19, 2026 13:05
One commit for the restack onto main. The individual commits, up to 3a2b3bf, are in the pull request's history.

Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 70d24e3 Nov 19, 2026
28 checks passed
@simonfaltum
simonfaltum deleted the aitools-mcp/04-add branch November 19, 2026 13:38
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: 70d24e3

Run: 44535513876

Env 💥​PANIC ❌​FAIL 🟨​KNOWN 🤯​MISS 💚​RECOVERED ✅​pass 🙈​skip Time
🤯​ aws linux-2core-8gb 647 20 963 1401 320:00
💥​ aws-windows-latest-4core-16gb 1 2 564 18 961 1429 320:03
💥​ azure linux-2core-8gb 1 873 18 718 1409 320:00
💥​ azure-windows-latest-4core-16gb 1 8 657 15 845 1437 320:03
💥​ gcp linux-2core-8gb 1 2 633 20 961 1407 320:00
💥​ gcp-windows-latest-4core-16gb 1 739 20 773 1435 320:03
1240 interesting tests: 1210 MISS, 13 RECOVERED, 10 FAIL, 5 PANIC, 2 KNOWN
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
🤯​ TestAccept 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/apps/job_permissions/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_doesnot_exist/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/artifacts/artifact_path_with_volume/volume_not_deployed/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cli_defaults/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_permissions/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/config_edits 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/config_edits/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/config_edits/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/dashboard_etag/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/external_cluster_policy_cross_target/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/flushed_cache/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/formatting_preserved/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_fields 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_fields/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_fields/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_multiple_tasks/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_params_variables/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/job_pipeline_task/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/json_status_missing_state/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/json_status_selectors/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/multiple_files 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/multiple_files/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/multiple_files/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/output_json 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/output_json/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/output_json/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/output_no_changes/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/pipeline_fields/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/resolve_variables/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/select_basic 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/select_basic/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/select_basic/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/select_multiple 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/select_multiple/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/select_multiple/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/skip_deployment/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/skip_permissions/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/target_override 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/target_override/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/target_override/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert 🤯​M 🙈​s 🤯​M 🙈​s 🤯​M 🙈​s
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert/DMS= 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/config-remote-sync/task_rename_revert/DMS=true 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/debug/fetch-repository-info 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/debug/fetch-repository-info/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/debug/fetch-repository-info/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=true/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_YAML_SYNC=true/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/files/no-snapshot-sync/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/basic 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/basic/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/breakglass 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/breakglass/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/can-manage 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/can-manage/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/destroy-redeploy 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/destroy-redeploy/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/dev-mode 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/dev-mode/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/legacy-state 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/legacy-state/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/missing-snapshot 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/missing-snapshot/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts/DMS=/READPLAN= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/no-artifacts/DMS=/READPLAN=1 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/permissions-change 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/permissions-change/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/select 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/immutable/select/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/mlops-stacks/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deploy/spark-jar-task/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/alert 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/alert/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/alert/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/catalog/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster/DMS= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/cluster/DMS=true 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=/READPLAN= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=/READPLAN=1 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=true/READPLAN= 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/DMS=true/READPLAN=1 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M 🤯​M
🤯​ TestAccept/bundle/deployment/bind/dashboard/recreation 🤯​M 🤯​M 🤯​M 🤯​M ✅​p 🤯​M
Top 50 slowest tests (at least 2 minutes):
duration env testname
19:21 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
16:02 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
13:32 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
13:08 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
12:47 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=true
12:44 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
12:40 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
12:38 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=true
12:15 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
12:12 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
12:10 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/batch/DMS=true
12:05 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
11:54 gcp-windows-latest-4core-16gb TestAccept/bundle/quiet-levels/DMS=
11:45 azure linux-2core-8gb TestAccept/bundle/quiet-levels/DMS=
11:37 azure linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
11:19 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=
11:09 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
11:06 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
10:51 aws linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=true
10:48 gcp-windows-latest-4core-16gb TestAccept/bundle/quiet-levels/DMS=true
10:45 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
10:37 azure-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/immutable/DMS=true
10:30 aws-windows-latest-4core-16gb TestAccept/bundle/quiet-levels/DMS=
10:27 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:21 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
10:20 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=experiment.yml.tmpl/READPLAN=1
10:14 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
10:13 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true
10:00 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:53 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/data_security_mode/DMS=
9:49 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true
9:43 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
9:30 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
9:30 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true
9:28 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
9:23 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
9:20 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
9:16 aws linux-2core-8gb TestAccept/bundle/templates/default-python/integration_classic/DMS=/UV_PYTHON=3.11
9:13 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
9:11 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:48 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=job_permission_ref.yml.tmpl/READPLAN=1
8:47 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:38 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
8:35 azure linux-2core-8gb TestAccept/bundle/invariant/continue_293/DMS=/INPUT_CONFIG=secret_scope_default_backend_type.yml.tmpl
8:35 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=schema_uppercase_name.yml.tmpl/READPLAN=1
8:35 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=secret_scope_default_backend_type.yml.tmpl/READPLAN=1
8:35 gcp linux-2core-8gb TestAccept/bundle/resources/schemas/rename_then_change/DMS=
8:33 azure linux-2core-8gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=app.yml.tmpl/READPLAN=
8:29 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=
8:25 aws-windows-latest-4core-16gb TestAccept/bundle/resources/materialization_sets/batch/DMS=
(1093 table rows omitted to keep the report under 60000 bytes)

idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 20, 2026
This pull request is part of a stack that adds the hidden `databricks
aitools mcp` command group, on top of databricks#7544 (`aitools mcp add`). It adds
`list`, which shows installed servers and their drift, and `remove`,
which deletes only the entries this CLI wrote.

## Changes
- `aitools mcp list` groups servers by profile and shows each agent
entry as `installed`, `changed` (`add` would write it differently),
`missing_on_disk`, `modified`, `path_changed`, or `unknown` (the entry
or its config could not be read). Profile drift is `profile_missing` or
`host_changed`. Entries this CLI did not write are listed as unmanaged.
It makes no network calls.
- `aitools mcp remove` chooses servers with `--names`, `--profile` or
`--all`, and narrows agents with `--agents`. It deletes an entry only
when it is the one this CLI wrote.
- An entry of the same name that this CLI did not write, and that is not
a Databricks entry, is left in place and reported. The install record
for that agent is dropped, in the recorded file, the file the agent
reads now, or both. The run is not refused. `list` and `remove` offer no
delete or `add --force` hint for such an entry.
- A changed Databricks entry is left in place and reported. A `--names`
run that names its server is refused.
- With `--names`, a run refuses before anything is written when a named
server has a changed Databricks entry, when its records are all for
agents this CLI does not know, or when `--agents` narrows it to no
agent. It removes nothing and exits 1. The reason is in `skipped`, or in
`error` for the `--agents` case. Records for an unknown agent are kept
and reported as skipped, so an older CLI does not drop a newer CLI's
records.
- When an agent's config directory moved, `remove` takes the entry from
the file the agent now reads, if the record's file lost it.
- `add` records absolute config paths, so `remove` run from another
directory finds the same file.
- `serve` hints name `databricks aitools mcp remove --names <server>`.
An empty `[DEFAULT]` section reads as "no longer exists" instead of "has
no host".

## Why
After `add`, nothing shows which servers are installed, whether their
profile still exists, or whether an agent config changed under them.
`remove` deletes only what this CLI wrote, so an entry a user wrote
under the same name is never touched.

## Decisions to review
- Moved config: `remove` edits the file the agent now reads, rather than
refusing. Cost: it edits a file the record does not name, under the same
ownership check.
- A same-name entry this CLI did not write, which is not a Databricks
entry, is left alone and its record is dropped, rather than refusing the
run. Cost: the server no longer shows in `list` for that agent, while
the entry stays in the agent config.
- `--names` matches a server name exactly, then without case. A service
name applies to every profile unless `--profile` narrows it.
- An unreadable agent config is a warning, and its servers are
`unknown`, rather than failing `list` and hiding the other agents. Cost:
a broken file leaves its servers unchecked until fixed.
- A `--names` run refuses when a named server has a changed Databricks
entry, rather than removing the others and exiting 0. Cost: the user
reruns without that name to remove the rest.
- A changed Databricks entry keeps its state record, so `list` keeps
showing it. Its hint says to delete the entry by hand, and never offers
`add --force`, because `add` refuses a Databricks entry for another
binding whatever `--force` says.

## Tests
- `TestBuildMcpListAndRemoveAgreeAfterConfigMoved` covers both
moved-config cases. `TestSelectInstallsExactServerNameWins` covers name
matching. `TestRenderMcpListLeavesOtherEntryAlone` covers the `list`
hint for a non-Databricks entry.
- `TestMcpRemoveDropsRecordOfEntryThisCLIDidNotWrite`,
`TestMcpRemoveDropsRecordWhenMovedConfigHasOtherEntry` and
`TestMcpRemoveLeavesOtherSameNameEntryWhenAgentConfigMoved` cover the
record drop without a refusal, and leave the other entry untouched.
- `TestMcpRemoveRefusesWhenNamedEntryIsKept`,
`TestMcpRemoveKeepsServerWhenMovedConfigHasChangedDatabricksEntry` and
`TestMcpRemoveRefusesNamedEntryWithOnlyUnknownAgent` cover the refusals.
`TestMcpRemoveRefusesNamedServerThatAgentsNarrowsToNothing` covers the
`--agents` refusal. `TestMcpRemoveKeepsRecordOfUnknownAgent` covers the
kept record.
- Acceptance `list-and-remove`, `drift-profile-missing` and
`repair-and-warnings` cover text and JSON output.
- `go test ./cmd/aitools/` and `go test ./acceptance -run
TestAccept/cmd/aitools/mcp` pass.
- Not tested: the Windows and macOS acceptance goldens. CI runs them.

## How to review
Refactors that keep behavior: the agent-config reader and ownership
check in `libs/aitools/mcp/agentconfig/` (`unmanaged.go`, `writer.go`),
`AbsoluteAsWritten` moved to `libs/aitools/mcpconfig/abspath.go`, and
the helpers in `cmd/aitools/mcp_entries.go` that list and remove share.
Read closely: `cmd/aitools/mcp_list.go` for statuses and warnings, and
`cmd/aitools/mcp_remove.go` for selection, the per-copy plan in
`planRemoval`, and the moved-config path.

This pull request and its description were written by Isaac.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aitools AI tools (databricks aitools) related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants